From f00f4b59b0cd743db10bf0a9c89aba404841c14e Mon Sep 17 00:00:00 2001 From: Lorenzo Manacorda Date: Mon, 21 Nov 2016 21:02:47 +0100 Subject: [PATCH] magic-wormhole: init at 0.8.1 --- lib/maintainers.nix | 1 + pkgs/tools/misc/magic-wormhole/default.nix | 24 +++++++++++ pkgs/top-level/all-packages.nix | 1 + pkgs/top-level/python-packages.nix | 47 +++++++++++++++++++++- 4 files changed, 72 insertions(+), 1 deletion(-) create mode 100644 pkgs/tools/misc/magic-wormhole/default.nix diff --git a/lib/maintainers.nix b/lib/maintainers.nix index 7e4a7168effb..b908a261b1fa 100644 --- a/lib/maintainers.nix +++ b/lib/maintainers.nix @@ -48,6 +48,7 @@ aske = "Kirill Boltaev "; asppsa = "Alastair Pharo "; astsmtl = "Alexander Tsamutali "; + asymmetric = "Lorenzo Manacorda "; aszlig = "aszlig "; auntie = "Jonathan Glines "; avnik = "Alexander V. Nikolaev "; diff --git a/pkgs/tools/misc/magic-wormhole/default.nix b/pkgs/tools/misc/magic-wormhole/default.nix new file mode 100644 index 000000000000..c35d3b666acb --- /dev/null +++ b/pkgs/tools/misc/magic-wormhole/default.nix @@ -0,0 +1,24 @@ +{ stdenv, fetchurl, pythonPackages }: + +with stdenv.lib; + +pythonPackages.buildPythonApplication rec { + name = "magic-wormhole-${version}"; + version = "0.8.1"; + + src = fetchurl { + url = "mirror://pypi/m/magic-wormhole/${name}.tar.gz"; + sha256 = "1yh5nbhh9z1am2pqnb5qqyq1zjl1m7z6jnkmvry2q14qwspw9had"; + }; + checkPhase = '' + ${pythonPackages.python.interpreter} -m wormhole.test.run_trial wormhole + ''; + + propagatedBuildInputs = with pythonPackages; [ autobahn cffi click hkdf pynacl spake2 tqdm ]; + meta = { + description = "Securely transfer data between computers"; + homepage = "https://github.com/warner/magic-wormhole"; + license = licenses.mit; + maintainers = with maintainers; [ asymmetric ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index d014e4e87f0a..ecb48fd70887 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -920,6 +920,7 @@ in long-shebang = callPackage ../misc/long-shebang {}; + magic-wormhole = callPackage ../tools/misc/magic-wormhole {}; mathics = pythonPackages.mathics; meson = callPackage ../development/tools/build-managers/meson { }; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 172e942ff575..452ca3205410 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -12472,6 +12472,28 @@ in { }; }; + hkdf = buildPythonPackage rec { + name = "hkdf-${version}"; + version = "0.0.3"; + + src = pkgs.fetchurl { + url = "mirror://pypi/h/hkdf/${name}.tar.gz"; + sha256 = "1jhxk5vhxmxxjp3zj526ry521v9inzzl8jqaaf0ma65w6k332ak2"; + }; + + buildInputs = with self; [ nose ]; + + checkPhase = '' + nosetests + ''; + + meta = { + description = "HMAC-based Extract-and-Expand Key Derivation Function (HKDF)"; + homepage = "https://github.com/casebeer/python-hkdf"; + license = licenses.bsd2; + }; + }; + httpretty = buildPythonPackage rec { name = "httpretty-${version}"; version = "0.8.10"; @@ -13784,7 +13806,6 @@ in { }; }; - m2crypto = buildPythonPackage rec { version = "0.24.0"; name = "m2crypto-${version}"; @@ -23129,6 +23150,30 @@ in { }; }; + spake2 = buildPythonPackage rec { + name = "spake2-${version}"; + version = "0.7"; + + src = pkgs.fetchurl { + url = "mirror://pypi/s/spake2/${name}.tar.gz"; + sha256 = "0rmplicbbid41qrvwc1ckyp211ban01ardms5yqqq16ixrc18a6j"; + }; + + buildInputs = with self; [ pytest ]; + + propagatedBuildInputs = with self; [ hkdf ]; + + checkPhase = '' + py.test $out + ''; + + meta = { + description = "SPAKE2 password-authenticated key exchange library"; + homepage = "http://github.com/warner/python-spake2"; + license = licenses.mit; + }; + }; + sqlite3dbm = buildPythonPackage rec { name = "sqlite3dbm-0.1.4"; disabled = isPy3k;