1{ stdenv, fetchurl, libiconv }:
2
3stdenv.mkDerivation rec {
4 version = "3.13";
5 name = "aescrypt-${version}";
6
7 src = fetchurl {
8 url = "https://www.aescrypt.com/download/v3/linux/${name}.tgz";
9 sha256 = "1a1rs7xmbxh355qg3v02rln3gshvy3j6wkx4g9ir72l22mp6zkc7";
10 };
11
12 preBuild = ''
13 cd src
14 '';
15
16 installPhase= ''
17 mkdir -p $out/bin
18 cp aescrypt $out/bin
19 cp aescrypt_keygen $out/bin
20 '';
21
22 buildInputs = [ libiconv ];
23
24 NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isDarwin "-liconv";
25
26 meta = with stdenv.lib; {
27 description = "Encrypt files with Advanced Encryption Standard (AES)";
28 homepage = https://www.aescrypt.com/;
29 license = licenses.gpl2;
30 maintainers = with maintainers; [ lovek323 qknight ];
31 platforms = stdenv.lib.platforms.all;
32 hydraPlatforms = stdenv.lib.platforms.linux;
33 };
34}