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:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
51
pkgs/applications/networking/nym/default.nix
Normal file
51
pkgs/applications/networking/nym/default.nix
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
{ stdenv
|
||||
, lib
|
||||
, rustPlatform
|
||||
, fetchFromGitHub
|
||||
, pkg-config
|
||||
, openssl
|
||||
, Security
|
||||
, libiconv
|
||||
}:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "nym";
|
||||
version = "0.11.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "nymtech";
|
||||
repo = "nym";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-bZXbteryXkOxft63zUMWdpBgbDSvrBHQY3f70/+mBtI=";
|
||||
};
|
||||
|
||||
cargoSha256 = "0xwa114fs4h6y2a3nrl2dp0rv0k336xy9y330g9yix4g34qmrynq";
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
|
||||
buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [ Security libiconv ];
|
||||
|
||||
checkType = "debug";
|
||||
|
||||
passthru.updateScript = ./update.sh;
|
||||
|
||||
checkFlags = [
|
||||
"--skip commands::upgrade::upgrade_tests"
|
||||
"--skip allowed_hosts::tests::creating_a_new_host_store"
|
||||
"--skip allowed_hosts::tests::getting_the_domain_root"
|
||||
"--skip allowed_hosts::tests::requests_to_allowed_hosts"
|
||||
"--skip allowed_hosts::tests::requests_to_unknown_hosts"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "A mixnet providing IP-level privacy";
|
||||
longDescription = ''
|
||||
Nym routes IP packets through other participating nodes to hide their source and destination.
|
||||
In contrast with Tor, it prevents timing attacks at the cost of latency.
|
||||
'';
|
||||
homepage = "https://nymtech.net";
|
||||
license = licenses.asl20;
|
||||
maintainers = [ maintainers.ehmry ];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
||||
37
pkgs/applications/networking/nym/update.sh
Executable file
37
pkgs/applications/networking/nym/update.sh
Executable file
|
|
@ -0,0 +1,37 @@
|
|||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell -i bash -p curl jq nix-prefetch
|
||||
|
||||
# adapted from rust-analyzer
|
||||
|
||||
set -euo pipefail
|
||||
cd "$(dirname "$0")"
|
||||
nixpkgs=../../../..
|
||||
|
||||
owner=$(sed -nE 's/.*\bowner = "(.*)".*/\1/p' ./default.nix)
|
||||
repo=$(sed -nE 's/.*\brepo = "(.*)".*/\1/p' ./default.nix)
|
||||
rev=$(
|
||||
curl -s "https://api.github.com/repos/$owner/$repo/releases" |
|
||||
jq 'map(select(.prerelease | not)) | .[0].tag_name' --raw-output
|
||||
)
|
||||
version=${rev:1}
|
||||
old_version=$(sed -nE 's/.*\bversion = "(.*)".*/\1/p' ./default.nix)
|
||||
if grep -q 'cargoSha256 = ""' ./default.nix; then
|
||||
old_version='broken'
|
||||
fi
|
||||
if [[ "$version" == "$old_version" ]]; then
|
||||
echo "Up to date: $version"
|
||||
exit
|
||||
fi
|
||||
echo "$old_version -> $version"
|
||||
|
||||
sha256=$(nix-prefetch -f "$nixpkgs" nym.src --rev "$rev")
|
||||
# Clear cargoSha256 to avoid inconsistency.
|
||||
sed -e "s/version = \".*\"/version = \"$version\"/" \
|
||||
-e "s/sha256 = \".*\"/sha256 = \"$sha256\"/" \
|
||||
-e "s/cargoSha256 = \".*\"/cargoSha256 = \"\"/" \
|
||||
--in-place ./default.nix
|
||||
|
||||
echo "Prebuilding for cargoSha256"
|
||||
cargo_sha256=$(nix-prefetch "{ sha256 }: (import $nixpkgs {}).nym.cargoDeps.overrideAttrs (_: { outputHash = sha256; })")
|
||||
sed "s/cargoSha256 = \".*\"/cargoSha256 = \"$cargo_sha256\"/" \
|
||||
--in-place ./default.nix
|
||||
Loading…
Add table
Add a link
Reference in a new issue