From c66aaf1995cacafc123466496db6b8a74a934182 Mon Sep 17 00:00:00 2001 From: sternenseemann <0rpkxez4ksa01gb3typccl0i@systemli.org> Date: Tue, 15 Sep 2020 19:48:10 +0200 Subject: [PATCH 1/2] =?UTF-8?q?scrypt:=201.3.0=20=E2=86=92=201.3.1,=20buil?= =?UTF-8?q?d=20library,=20enable=20tests?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * update scrypt * enable running of tests * build development library libscrypt-kdf, install to lib output, headers to dev * default output remains untouched: contains binary plus man pages --- pkgs/tools/security/scrypt/default.nix | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/pkgs/tools/security/scrypt/default.nix b/pkgs/tools/security/scrypt/default.nix index 018bc44b144..d834e4acd9c 100644 --- a/pkgs/tools/security/scrypt/default.nix +++ b/pkgs/tools/security/scrypt/default.nix @@ -1,22 +1,32 @@ -{ stdenv, fetchurl, openssl }: +{ stdenv, fetchurl, openssl, utillinux }: stdenv.mkDerivation rec { pname = "scrypt"; - version = "1.3.0"; + version = "1.3.1"; src = fetchurl { url = "https://www.tarsnap.com/scrypt/${pname}-${version}.tgz"; - sha256 = "0j17yfrpi2bk5cawb4a4mzpv1vadqxh956hx0pa1gqfisknk8c16"; + sha256 = "1hnl0r6pmyxiy4dmafmqk1db7wpc0x9rqpzqcwr9d2cmghcj6byz"; }; + outputs = [ "out" "lib" "dev" ]; + + configureFlags = [ "--enable-libscrypt-kdf" ]; + buildInputs = [ openssl ]; patchPhase = '' - for f in Makefile.in autotools/Makefile.am libcperciva/cpusupport/Build/cpusupport.sh ; do + for f in Makefile.in autotools/Makefile.am libcperciva/cpusupport/Build/cpusupport.sh configure ; do substituteInPlace $f --replace "command -p " "" done + + patchShebangs tests/test_scrypt.sh ''; + doCheck = true; + checkTarget = "test"; + checkInputs = [ utillinux ]; + meta = with stdenv.lib; { description = "Encryption utility"; homepage = "https://www.tarsnap.com/scrypt.html"; From ac4d46972dfe2fca5308e262e019b7bdbb847bec Mon Sep 17 00:00:00 2001 From: sternenseemann <0rpkxez4ksa01gb3typccl0i@systemli.org> Date: Fri, 18 Sep 2020 11:17:00 +0200 Subject: [PATCH 2/2] scrypt: fix build of pkgsStatic.scrypt The getconf input defaults to the glibc one if it is being used and uses the netbsd version in all other cases. This fixes the build when building with musl, since it doesn't ship a version of getconf. --- pkgs/tools/security/scrypt/default.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/tools/security/scrypt/default.nix b/pkgs/tools/security/scrypt/default.nix index d834e4acd9c..66b5afc9a9b 100644 --- a/pkgs/tools/security/scrypt/default.nix +++ b/pkgs/tools/security/scrypt/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, openssl, utillinux }: +{ stdenv, fetchurl, openssl, utillinux, getconf }: stdenv.mkDerivation rec { pname = "scrypt"; @@ -15,6 +15,8 @@ stdenv.mkDerivation rec { buildInputs = [ openssl ]; + nativeBuildInputs = [ getconf ]; + patchPhase = '' for f in Makefile.in autotools/Makefile.am libcperciva/cpusupport/Build/cpusupport.sh configure ; do substituteInPlace $f --replace "command -p " ""