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