uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead

https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948
this can do it nicely.

Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
Anton Arapov 2021-04-03 12:58:10 +02:00 committed by Alan Daniels
commit 56de2bcd43
30691 changed files with 3076956 additions and 0 deletions

View file

@ -0,0 +1,47 @@
{ lib, stdenv, fetchurl }:
with lib;
let versions = lib.importJSON ./versions.json;
arch = if stdenv.isi686 then "386"
else if stdenv.isx86_64 then "amd64"
else if stdenv.isAarch32 then "arm"
else if stdenv.isAarch64 then "arm64"
else throw "Unsupported architecture";
os = if stdenv.isLinux then "linux"
else if stdenv.isDarwin then "darwin"
else throw "Unsupported os";
versionInfo = versions."${os}-${arch}";
inherit (versionInfo) version sha256 url;
in
stdenv.mkDerivation {
pname = "ngrok";
inherit version;
# run ./update
src = fetchurl { inherit sha256 url; };
sourceRoot = ".";
unpackPhase = "cp $src ngrok";
buildPhase = "chmod a+x ngrok";
installPhase = ''
install -D ngrok $out/bin/ngrok
'';
passthru.updateScript = ./update.sh;
# Stripping causes SEGFAULT on x86_64-darwin
dontStrip = true;
meta = {
description = "Allows you to expose a web server running on your local machine to the internet";
homepage = "https://ngrok.com/";
license = licenses.unfree;
platforms = [ "i686-linux" "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];
maintainers = [ maintainers.bobvanderlinden ];
};
}

View file

@ -0,0 +1,34 @@
#!/usr/bin/env nix-shell
#!nix-shell -p httpie
#!nix-shell -p jq
#!nix-shell -i bash
set -eu -o pipefail
get_download_info() {
http --body \
https://update.equinox.io/check \
'Accept:application/json; q=1; version=1; charset=utf-8' \
'Content-Type:application/json; charset=utf-8' \
app_id=app_goVRodbMVm \
channel=stable \
os=$1 \
goarm= \
arch=$2 \
| jq --arg sys "$1-$2" '{
sys: $sys,
url: .download_url,
sha256: .checksum,
version: .release.version
}'
}
(
get_download_info linux 386
get_download_info linux amd64
get_download_info linux arm
get_download_info linux arm64
get_download_info darwin amd64
get_download_info darwin arm64
) | jq --slurp 'map ({ (.sys): . }) | add' \
> pkgs/tools/networking/ngrok-2/versions.json

View file

@ -0,0 +1,38 @@
{
"linux-386": {
"sys": "linux-386",
"url": "https://bin.equinox.io/a/c4ZY6f7svn7/ngrok-2.3.40-linux-386",
"sha256": "1b645ff0abbb28ca7c0f6a2109653be2dc281860b582b4de6927fde12c99da26",
"version": "2.3.40"
},
"linux-amd64": {
"sys": "linux-amd64",
"url": "https://bin.equinox.io/a/b5PAmc6L9z2/ngrok-2.3.40-linux-amd64",
"sha256": "218d267cd1195334718bafac14bfdf1c19dc95dcf8a24aaa6a1383c21dc86e76",
"version": "2.3.40"
},
"linux-arm": {
"sys": "linux-arm",
"url": "https://bin.equinox.io/a/aRh9rdUAJyf/ngrok-2.3.40-linux-arm",
"sha256": "538a7431df141a929a250eaf6ed7afdcce817bcd8cfe60b61f4c6d7a289b1d1c",
"version": "2.3.40"
},
"linux-arm64": {
"sys": "linux-arm64",
"url": "https://bin.equinox.io/a/2gpRjDRBpJv/ngrok-2.3.40-linux-arm64",
"sha256": "dc7b4465ef95f6d04d1b1996111b3a2631e5f464d7dca7f4994f59ea4edbe21f",
"version": "2.3.40"
},
"darwin-amd64": {
"sys": "darwin-amd64",
"url": "https://bin.equinox.io/a/fcZQXtHSDgM/ngrok-2.3.40-darwin-amd64",
"sha256": "80c8fb121d6c93350d84351d9516674f4e20a3e003cdd7dcb4c3e7c48b9c5b07",
"version": "2.3.40"
},
"darwin-arm64": {
"sys": "darwin-arm64",
"url": "https://bin.equinox.io/a/3TEKdZeyAnt/ngrok-2.3.40-darwin-arm64",
"sha256": "c9e6dfec454f9faec92a13dfd3f3857de982007e3b85987bb875aa0d74ca8101",
"version": "2.3.40"
}
}