From 06e701af4d16cbc0dce6a70f4a113119c07e7ae8 Mon Sep 17 00:00:00 2001 From: Taeer Bar-Yam Date: Sun, 9 Jul 2017 15:20:38 -0400 Subject: [PATCH 1/3] maintainers: added olynch --- lib/maintainers.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/maintainers.nix b/lib/maintainers.nix index 142e7ff78698..cde9598b6fbe 100644 --- a/lib/maintainers.nix +++ b/lib/maintainers.nix @@ -409,6 +409,7 @@ okasu = "Okasu "; olcai = "Erik Timan "; olejorgenb = "Ole Jørgen Brønner "; + olynch = "Owen Lynch "; orbekk = "KJ Ørbekk "; orbitz = "Malcolm Matalka "; orivej = "Orivej Desh "; From 5160ae5d5c3ff17919f21ac3be41ab5e1115a747 Mon Sep 17 00:00:00 2001 From: Taeer Bar-Yam Date: Sun, 9 Jul 2017 15:22:57 -0400 Subject: [PATCH 2/3] libargon2: init at 20161029 --- .../libraries/libargon2/default.nix | 38 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 40 insertions(+) create mode 100644 pkgs/development/libraries/libargon2/default.nix diff --git a/pkgs/development/libraries/libargon2/default.nix b/pkgs/development/libraries/libargon2/default.nix new file mode 100644 index 000000000000..68df0a288fc8 --- /dev/null +++ b/pkgs/development/libraries/libargon2/default.nix @@ -0,0 +1,38 @@ +{ stdenv, fetchFromGitHub }: + +stdenv.mkDerivation rec { + name = "libargon2-${version}"; + version = "20161029"; + src = fetchFromGitHub { + owner = "P-H-C"; + repo = "phc-winner-argon2"; + rev = "${version}"; + sha256 = "021g8wi4g67ywm8zf3yncqwrmfz7ypgm1ih9wcmnxip5n75rymh5"; + }; + + installPhase = '' + mkdir -p $out + make install PREFIX=$out + mkdir -p $out/lib/pkgconfig + substitute libargon2.pc $out/lib/pkgconfig/libargon2.pc \ + --replace @UPSTREAM_VER@ "${version}" \ + --replace @HOST_MULTIARCH@ "" \ + --replace 'prefix=/usr' "prefix=$out" + ln -s $out/lib/libargon2.so $out/lib/libargon2.so.0 + ''; + + meta = with stdenv.lib; { + description = "A key derivation function that was selected as the winner of the Password Hashing Competition in July 2015"; + longDescription = '' + A password-hashing function created by by Alex Biryukov, Daniel Dinu, and + Dmitry Khovratovich. Argon2 was declared the winner of the Password + Hashing Competition (PHC). There were 24 submissions and 9 finalists. + Catena, Lyra2, Makwa and yescrypt were given special recognition. The PHC + recommends using Argon2 rather than legacy algorithms. + ''; + homepage = https://www.argon2.com/; + license = with licenses; [ asl20 cc0 ]; + maintainers = with maintainers; [ taeer olynch ]; + platforms = platforms.linux; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index b62908e2798b..d7976644cfd2 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -11889,6 +11889,8 @@ with pkgs; libaio = callPackage ../os-specific/linux/libaio { }; + libargon2 = callPackage ../development/libraries/libargon2 { }; + libatasmart = callPackage ../os-specific/linux/libatasmart { }; libcgroup = callPackage ../os-specific/linux/libcgroup { }; From b6d0c1eb18e2d7704989029b77ce3e6074a72b35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Mon, 10 Jul 2017 08:51:15 +0100 Subject: [PATCH 3/3] libargon2: do not override pre/postInstall hook --- pkgs/development/libraries/libargon2/default.nix | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/libargon2/default.nix b/pkgs/development/libraries/libargon2/default.nix index 68df0a288fc8..79cbf09317cf 100644 --- a/pkgs/development/libraries/libargon2/default.nix +++ b/pkgs/development/libraries/libargon2/default.nix @@ -3,6 +3,7 @@ stdenv.mkDerivation rec { name = "libargon2-${version}"; version = "20161029"; + src = fetchFromGitHub { owner = "P-H-C"; repo = "phc-winner-argon2"; @@ -11,14 +12,16 @@ stdenv.mkDerivation rec { }; installPhase = '' - mkdir -p $out - make install PREFIX=$out + runHook preInstall mkdir -p $out/lib/pkgconfig substitute libargon2.pc $out/lib/pkgconfig/libargon2.pc \ --replace @UPSTREAM_VER@ "${version}" \ --replace @HOST_MULTIARCH@ "" \ --replace 'prefix=/usr' "prefix=$out" + + make install PREFIX=$out ln -s $out/lib/libargon2.so $out/lib/libargon2.so.0 + runHook postInstall ''; meta = with stdenv.lib; {