summary refs log tree commit diff
path: root/pkgs/tools/security/sirikali/default.nix
blob: a3e67a2b76a5ee90c25dd0fa3a7b52edcf6469e9 (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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
{ lib
, stdenv
, qtbase
, libpwquality
, hicolor-icon-theme
, fetchFromGitHub
, wrapQtAppsHook
, cmake
, pkg-config
, libgcrypt
, cryfs
, encfs
, fscrypt-experimental
, gocryptfs
, securefs
, sshfs
, libsecret
, kwallet
, withKWallet ? true
, withLibsecret ? true
}:

stdenv.mkDerivation rec {
  pname = "sirikali";
  version = "1.5.1";

  src = fetchFromGitHub {
    owner = "mhogomchungu";
    repo = "sirikali";
    rev = version;
    hash = "sha256-1bY8cCMMK4Jie4+9c7eUEBrPEYDaOqFHZ5252TPSotA=";
  };

  buildInputs = [
    qtbase
    libpwquality
    hicolor-icon-theme
    libgcrypt
    cryfs
    encfs
    fscrypt-experimental
    gocryptfs
    securefs
    sshfs
  ]
  ++ lib.optionals withKWallet [ libsecret ]
  ++ lib.optionals withLibsecret [ kwallet ]
  ;

  nativeBuildInputs = [
    wrapQtAppsHook
    cmake
    pkg-config
  ];

  qtWrapperArgs = [
    ''--prefix PATH : ${lib.makeBinPath [
      cryfs
      encfs
      fscrypt-experimental
      gocryptfs
      securefs
      sshfs
    ]}''
  ];

  postPatch = ''
    substituteInPlace "src/engines.cpp" --replace "/sbin/" "/run/wrappers/bin/"
  '';

  doCheck = true;

  cmakeFlags = [
    "-DCMAKE_BUILD_TYPE=RELEASE"
    "-DINTERNAL_LXQT_WALLET=false"
    "-DNOKDESUPPORT=${if withKWallet then "false" else "true"}"
    "-DNOSECRETSUPPORT=${if withLibsecret then "false" else "true"}"
    "-DQT5=true"
  ];

  meta = with lib; {
    description = "A Qt/C++ GUI front end to sshfs, ecryptfs-simple, cryfs, gocryptfs, securefs, fscrypt and encfs";
    homepage = "https://github.com/mhogomchungu/sirikali";
    changelog = "https://github.com/mhogomchungu/sirikali/blob/${src.rev}/changelog";
    license = licenses.gpl3Only;
    maintainers = with maintainers; [ linuxissuper ];
  };
}