1{
2 lib,
3 stdenv,
4 fetchurl,
5 libiconv,
6}:
7
8stdenv.mkDerivation rec {
9 version = "3.16";
10 pname = "aescrypt";
11
12 src = fetchurl {
13 url = "https://www.aescrypt.com/download/v3/linux/aescrypt-${version}.tgz";
14 sha256 = "sha256-4uGS0LReq5dI7+Wel7ZWzFXx+utZWi93q4TUSw7AhNI=";
15 };
16
17 NIX_LDFLAGS = lib.optionalString stdenv.hostPlatform.isDarwin "-liconv";
18
19 preBuild = ''
20 substituteInPlace src/Makefile --replace "CC=gcc" "CC?=gcc"
21 cd src
22 '';
23
24 installPhase = ''
25 mkdir -p $out/bin
26 cp aescrypt $out/bin
27 cp aescrypt_keygen $out/bin
28 '';
29
30 buildInputs = [ libiconv ];
31
32 meta = with lib; {
33 description = "Encrypt files with Advanced Encryption Standard (AES)";
34 homepage = "https://www.aescrypt.com/";
35 license = licenses.gpl2Only;
36 maintainers = with maintainers; [
37 lovek323
38 qknight
39 ];
40 platforms = lib.platforms.all;
41 hydraPlatforms = with platforms; unix;
42 };
43}