From ca0c6289d7a394d97a801f111aff75907afedd81 Mon Sep 17 00:00:00 2001 From: nixbitcoin Date: Wed, 7 Apr 2021 10:02:19 +0000 Subject: [PATCH 1/3] update nixpkgs-unstable btcpayserver: 1.0.7.0 -> 1.0.7.2 clightning: 0.9.3 -> 0.10.0 --- pkgs/nixpkgs-pinned.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/nixpkgs-pinned.nix b/pkgs/nixpkgs-pinned.nix index 4c4b72a..a818bc6 100644 --- a/pkgs/nixpkgs-pinned.nix +++ b/pkgs/nixpkgs-pinned.nix @@ -12,7 +12,7 @@ in sha256 = "0aj4xfkwk8gf96ypjp0rcap3hxrqg5qdwgwgx55zk0mlvq9z3h68"; }; nixpkgs-unstable = fetch { - rev = "c7d0dbe094c988209edac801eb2a0cc21aa498d8"; - sha256 = "1rwjfjwwaic56n778fvrmv1s1vzw565gqywrpqv72zrrzmavhyrx"; + rev = "3d1a7716d7f1fccbd7d30ab3b2ed3db831f43bde"; + sha256 = "14r8qa6lnzp78c3amzi5r8n11l1kcxcx1gjhnc1kmn4indd43649"; }; } From c5f67629e6b725ac143e752a53a90d21310578d2 Mon Sep 17 00:00:00 2001 From: Erik Arvstedt Date: Wed, 7 Apr 2021 19:05:40 +0200 Subject: [PATCH 2/3] joinmarket: add copy of cryptography 3.3.2 --- pkgs/python-packages/cryptography/default.nix | 83 +++++++++++++++++++ pkgs/python-packages/cryptography/vectors.nix | 25 ++++++ pkgs/python-packages/default.nix | 4 +- 3 files changed, 110 insertions(+), 2 deletions(-) create mode 100644 pkgs/python-packages/cryptography/default.nix create mode 100644 pkgs/python-packages/cryptography/vectors.nix diff --git a/pkgs/python-packages/cryptography/default.nix b/pkgs/python-packages/cryptography/default.nix new file mode 100644 index 0000000..a852fcd --- /dev/null +++ b/pkgs/python-packages/cryptography/default.nix @@ -0,0 +1,83 @@ +# Copied from nixpkgs rev c7d0dbe094c988209edac801eb2a0cc21aa498d8 + +{ lib, stdenv +, buildPythonPackage +, fetchPypi +, fetchpatch +, isPy27 +, ipaddress +, openssl +, cryptography_vectors +, darwin +, packaging +, six +, pythonOlder +, isPyPy +, cffi +, pytest +, pretend +, iso8601 +, pytz +, hypothesis +, enum34 +}: + +buildPythonPackage rec { + pname = "cryptography"; + version = "3.3.2"; # Also update the hash in vectors.nix + + src = fetchPypi { + inherit pname version; + sha256 = "1vcvw4lkw1spiq322pm1256kail8nck6bbgpdxx3pqa905wd6q2s"; + }; + + outputs = [ "out" "dev" ]; + + nativeBuildInputs = lib.optionals (!isPyPy) [ + cffi + ]; + + buildInputs = [ openssl ] + ++ lib.optional stdenv.isDarwin darwin.apple_sdk.frameworks.Security; + propagatedBuildInputs = [ + packaging + six + ] ++ lib.optionals (!isPyPy) [ + cffi + ] ++ lib.optionals isPy27 [ + ipaddress enum34 + ]; + + checkInputs = [ + cryptography_vectors + hypothesis + iso8601 + pretend + pytest + pytz + ]; + + checkPhase = '' + py.test --disable-pytest-warnings tests + ''; + + # IOKit's dependencies are inconsistent between OSX versions, so this is the best we + # can do until nix 1.11's release + __impureHostDeps = [ "/usr/lib" ]; + + meta = with lib; { + description = "A package which provides cryptographic recipes and primitives"; + longDescription = '' + Cryptography includes both high level recipes and low level interfaces to + common cryptographic algorithms such as symmetric ciphers, message + digests, and key derivation functions. + Our goal is for it to be your "cryptographic standard library". It + supports Python 2.7, Python 3.5+, and PyPy 5.4+. + ''; + homepage = "https://github.com/pyca/cryptography"; + changelog = "https://cryptography.io/en/latest/changelog/#v" + + replaceStrings [ "." ] [ "-" ] version; + license = with licenses; [ asl20 bsd3 psfl ]; + maintainers = with maintainers; [ primeos ]; + }; +} diff --git a/pkgs/python-packages/cryptography/vectors.nix b/pkgs/python-packages/cryptography/vectors.nix new file mode 100644 index 0000000..e7f78e5 --- /dev/null +++ b/pkgs/python-packages/cryptography/vectors.nix @@ -0,0 +1,25 @@ +# Copied from nixpkgs rev c7d0dbe094c988209edac801eb2a0cc21aa498d8 + +{ buildPythonPackage, fetchPypi, lib, cryptography }: + +buildPythonPackage rec { + pname = "cryptography_vectors"; + # The test vectors must have the same version as the cryptography package: + version = cryptography.version; + + src = fetchPypi { + inherit pname version; + sha256 = "1yhaps0f3h2yjb6lmz953z1l1d84y9swk4k3gj9nqyk4vbx5m7cc"; + }; + + # No tests included + doCheck = false; + + meta = with lib; { + description = "Test vectors for the cryptography package"; + homepage = "https://cryptography.io/en/latest/development/test-vectors/"; + # Source: https://github.com/pyca/cryptography/tree/master/vectors; + license = with licenses; [ asl20 bsd3 ]; + maintainers = with maintainers; [ primeos ]; + }; +} diff --git a/pkgs/python-packages/default.nix b/pkgs/python-packages/default.nix index 8587bb2..21e875e 100644 --- a/pkgs/python-packages/default.nix +++ b/pkgs/python-packages/default.nix @@ -16,8 +16,8 @@ in { txzmq = callPackage ./txzmq {}; # cryptography 3.3.2, required by joinmarketdaemon - cryptography = callPackage "${unstable}/pkgs/development/python-modules/cryptography" {}; - cryptography_vectors = callPackage "${unstable}/pkgs/development/python-modules/cryptography/vectors.nix" {}; + cryptography = callPackage ./cryptography {}; + cryptography_vectors = callPackage ./cryptography/vectors.nix {}; joinmarketbase = joinmarketPkg ./jmbase; joinmarketclient = joinmarketPkg ./jmclient; From daeedda8251d8ad8c0bd75c594460b51df21a15c Mon Sep 17 00:00:00 2001 From: nixbitcoin Date: Wed, 7 Apr 2021 10:51:14 +0000 Subject: [PATCH 3/3] clightning-plugins: update rev and dependencies --- pkgs/clightning-plugins/default.nix | 4 ++-- pkgs/default.nix | 2 +- pkgs/python-packages/default.nix | 4 ++-- pkgs/python-packages/pylightning/default.nix | 6 +----- pkgs/python-packages/pyln-client/default.nix | 2 +- pkgs/python-packages/pyln-proto/default.nix | 8 +------- pkgs/python-packages/recommonmark/default.nix | 12 ++++++++++++ 7 files changed, 20 insertions(+), 18 deletions(-) create mode 100644 pkgs/python-packages/recommonmark/default.nix diff --git a/pkgs/clightning-plugins/default.nix b/pkgs/clightning-plugins/default.nix index 28561af..7b57908 100644 --- a/pkgs/clightning-plugins/default.nix +++ b/pkgs/clightning-plugins/default.nix @@ -6,8 +6,8 @@ let src = pkgs.fetchFromGitHub { owner = "lightningd"; repo = "plugins"; - rev = "6cd472636926f05a9c472139fabe1ff11c90aa6a"; - sha256 = "1lisx85vzsfzjhdc6zdz0l6bcrdgg6rp5xbc5jmx93mv8qqg2cns"; + rev = "6f2b8fb6374600f9e1e06e57884bde99d85383bf"; + sha256 = "0hibkwdljpja9974zwbcpvpdhb4c96vda57qfj7cbinvfswj5bi0"; }; version = builtins.substring 0 7 src.rev; diff --git a/pkgs/default.nix b/pkgs/default.nix index 4275100..5fa33df 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -18,7 +18,7 @@ let self = { secp256k1 = pkgs.callPackage ./secp256k1 { }; nbPython3Packages = (pkgs.python3.override { - packageOverrides = pySelf: super: import ./python-packages self pySelf; + packageOverrides = import ./python-packages self; }).pkgs; pinned = import ./pinned.nix; diff --git a/pkgs/python-packages/default.nix b/pkgs/python-packages/default.nix index 21e875e..d8cbc5b 100644 --- a/pkgs/python-packages/default.nix +++ b/pkgs/python-packages/default.nix @@ -1,5 +1,4 @@ -nbPkgs: -self: +nbPkgs: self: super: let inherit (self) callPackage; @@ -14,6 +13,7 @@ in { urldecode = callPackage ./urldecode {}; chromalog = callPackage ./chromalog {}; txzmq = callPackage ./txzmq {}; + recommonmark = callPackage ./recommonmark { inherit (super) recommonmark; }; # cryptography 3.3.2, required by joinmarketdaemon cryptography = callPackage ./cryptography {}; diff --git a/pkgs/python-packages/pylightning/default.nix b/pkgs/python-packages/pylightning/default.nix index c9dc340..5659dbf 100644 --- a/pkgs/python-packages/pylightning/default.nix +++ b/pkgs/python-packages/pylightning/default.nix @@ -2,7 +2,7 @@ buildPythonPackage rec { pname = "pylightning"; - version = "0.8.0"; # defined in ${src}/contrib/pyln-client/pyln/client/__init__.py + version = "0.9.3"; # defined in ${src}/contrib/pyln-client/pyln/client/__init__.py inherit (clightning) src; @@ -10,8 +10,4 @@ buildPythonPackage rec { postUnpack = "sourceRoot=$sourceRoot/contrib/${pname}"; - # The clightning source contains pyln-client 0.8.0 - postPatch = '' - substituteInPlace requirements.txt --replace pyln-client==0.7.3 pyln-client==0.8.0 - ''; } diff --git a/pkgs/python-packages/pyln-client/default.nix b/pkgs/python-packages/pyln-client/default.nix index ea8a392..f306f11 100644 --- a/pkgs/python-packages/pyln-client/default.nix +++ b/pkgs/python-packages/pyln-client/default.nix @@ -2,7 +2,7 @@ buildPythonPackage rec { pname = "pyln-client"; - version = "0.8.0"; # defined in ${src}/contrib/pyln-client/pyln/client/__init__.py + version = "0.9.3"; # defined in ${src}/contrib/pyln-client/pyln/client/__init__.py inherit (clightning) src; diff --git a/pkgs/python-packages/pyln-proto/default.nix b/pkgs/python-packages/pyln-proto/default.nix index f924a48..2b35bdd 100644 --- a/pkgs/python-packages/pyln-proto/default.nix +++ b/pkgs/python-packages/pyln-proto/default.nix @@ -8,7 +8,7 @@ buildPythonPackage rec { pname = "pyln-proto"; - version = "0.8.4"; # defined in ${src}/contrib/pyln-proto/setup.py + version = "0.9.3"; # defined in ${src}/contrib/pyln-proto/setup.py inherit (clightning) src; @@ -22,10 +22,4 @@ buildPythonPackage rec { postUnpack = "sourceRoot=$sourceRoot/contrib/${pname}"; - postPatch = '' - substituteInPlace requirements.txt \ - --replace base58==1.0.2 base58==2.0.1 \ - --replace bitstring==3.1.6 bitstring==3.1.5 \ - --replace cryptography==2.8 cryptography==3.1 - ''; } diff --git a/pkgs/python-packages/recommonmark/default.nix b/pkgs/python-packages/recommonmark/default.nix new file mode 100644 index 0000000..1fba1c1 --- /dev/null +++ b/pkgs/python-packages/recommonmark/default.nix @@ -0,0 +1,12 @@ +{ recommonmark, fetchFromGitHub }: + +recommonmark.overridePythonAttrs (old: rec { + version = "0.7.1"; + + src = fetchFromGitHub { + owner = "rtfd"; + repo = old.pname; + rev = version; + sha256 = "0kwm4smxbgq0c0ybkxfvlgrfb3gq9amdw94141jyykk9mmz38379"; + }; +})