summary refs log tree commit diff
path: root/pkgs/tools/security/scrypt/default.nix
blob: 893b7b3190006870bd66bb83e52b84d4f22924ab (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
{ stdenv, fetchurl, openssl }:

stdenv.mkDerivation rec {
  name = "scrypt-${version}";
  version = "1.2.0";

  src = fetchurl {
    url = "https://www.tarsnap.com/scrypt/${name}.tgz";
    sha256 = "1m39hpfby0fdjam842773i5w7pa0qaj7f0r22jnchxsj824vqm0p";
  };

  buildInputs = [ openssl ];

  patchPhase = ''
    substituteInPlace Makefile \
      --replace "command -p mv" "mv"
    substituteInPlace Makefile.in \
      --replace "command -p mv" "mv"
    substituteInPlace autocrap/Makefile.am \
      --replace "command -p mv" "mv"
  '';

  meta = {
    description = "Encryption utility";
    homepage    = https://www.tarsnap.com/scrypt.html;
    license     = stdenv.lib.licenses.bsd2;
    platforms   = stdenv.lib.platforms.all;
    maintainers = [ stdenv.lib.maintainers.thoughtpolice ];
  };
}