Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 stdenv, 4 fetchurl, 5 openssl, 6 getconf, 7 util-linux, 8}: 9 10stdenv.mkDerivation rec { 11 pname = "scrypt"; 12 version = "1.3.3"; 13 14 src = fetchurl { 15 url = "https://www.tarsnap.com/scrypt/${pname}-${version}.tgz"; 16 sha256 = "sha256-HCcQUX6ZjqrC6X2xHwkuNxOeaYhrIaGyZh9k4TAhWuk="; 17 }; 18 19 outputs = [ 20 "out" 21 "lib" 22 "dev" 23 ]; 24 25 configureFlags = [ "--enable-libscrypt-kdf" ]; 26 27 buildInputs = [ openssl ]; 28 29 nativeBuildInputs = [ getconf ]; 30 31 patchPhase = '' 32 for f in Makefile.in autotools/Makefile.am libcperciva/cpusupport/Build/cpusupport.sh configure ; do 33 substituteInPlace $f --replace "command -p " "" 34 done 35 36 patchShebangs tests/test_scrypt.sh 37 ''; 38 39 doCheck = true; 40 checkTarget = "test"; 41 nativeCheckInputs = lib.optionals stdenv.hostPlatform.isLinux [ util-linux ]; 42 43 meta = with lib; { 44 description = "Encryption utility"; 45 mainProgram = "scrypt"; 46 homepage = "https://www.tarsnap.com/scrypt.html"; 47 license = licenses.bsd2; 48 platforms = platforms.all; 49 maintainers = with maintainers; [ thoughtpolice ]; 50 }; 51}