about summary refs log tree commit diff
path: root/pkgs/by-name/cr/cryptor/package.nix
blob: b47edbbab5722ef5ce8b2460c9c2d9d64dfa9093 (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
{ lib
, stdenv
, fetchFromGitHub
, makeBinaryWrapper
, meson
, ninja
, pkg-config
, vala
, wrapGAppsHook
, gocryptfs
, gtk3
, json-glib
, libgee
}:

stdenv.mkDerivation (finalAttrs: {
  pname = "cryptor";
  version = "1.1.0";

  src = fetchFromGitHub {
    owner = "moson-mo";
    repo = "cryptor";
    rev = "v${finalAttrs.version}";
    hash = "sha256-EqiaWgwhSLwZnovqYQ9rfHwvhWucmK0ujSsOhMJEJ1A=";
  };

  nativeBuildInputs = [
    makeBinaryWrapper
    meson
    ninja
    pkg-config
    vala
    wrapGAppsHook
  ];

  buildInputs = [
    gtk3
    json-glib
    libgee
  ];

  postInstall = ''
    wrapProgram $out/bin/cryptor \
      --prefix PATH : "${lib.makeBinPath [ gocryptfs ]}"
  '';

  meta = {
    description = "Simple gocryptfs GUI";
    homepage = "https://github.com/moson-mo/cryptor";
    license = lib.licenses.bsd3;
    mainProgram = "cryptor";
    maintainers = with lib.maintainers; [ fgaz ];
    platforms = lib.platforms.all;
  };
})