Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 replaceVars,
6 appstream-glib,
7 desktop-file-utils,
8 meson,
9 ninja,
10 pkg-config,
11 python3,
12 rustPlatform,
13 rustc,
14 cargo,
15 wrapGAppsHook3,
16 glib,
17 gtk4,
18 libadwaita,
19 wayland,
20 gocryptfs,
21 cryfs,
22 fuse,
23 util-linux,
24}:
25
26stdenv.mkDerivation (finalAttrs: {
27 pname = "vaults";
28 version = "0.10.0";
29
30 src = fetchFromGitHub {
31 owner = "mpobaschnig";
32 repo = "vaults";
33 tag = finalAttrs.version;
34 hash = "sha256-B4CNEghMfP+r0poyhE102zC1Yd2U5ocV1MCMEVEMjEY=";
35 };
36
37 cargoDeps = rustPlatform.fetchCargoVendor {
38 inherit (finalAttrs) pname version src;
39 hash = "sha256-my4CxFIEN19juo/ya2vlkejQTaZsyoYLtFTR7iCT9s0=";
40 };
41
42 patches = [
43 (replaceVars ./remove_flatpak_dependency.patch {
44 cryfs = lib.getExe' cryfs "cryfs";
45 gocryptfs = lib.getExe' gocryptfs "gocryptfs";
46 fusermount = lib.getExe' fuse "fusermount";
47 umount = lib.getExe' util-linux "umount";
48 })
49 ];
50
51 postPatch = ''
52 patchShebangs build-aux
53 '';
54
55 nativeBuildInputs = [
56 desktop-file-utils
57 meson
58 ninja
59 pkg-config
60 wrapGAppsHook3
61 cargo
62 rustc
63 rustPlatform.cargoSetupHook
64 ];
65
66 buildInputs = [
67 appstream-glib
68 gtk4
69 python3
70 glib
71 libadwaita
72 wayland
73 gocryptfs
74 cryfs
75 ];
76
77 meta = {
78 description = "GTK frontend for encrypted vaults supporting gocryptfs and CryFS for encryption";
79 homepage = "https://mpobaschnig.github.io/vaults/";
80 changelog = "https://github.com/mpobaschnig/vaults/releases/tag/${finalAttrs.version}";
81 license = lib.licenses.gpl3Plus;
82 maintainers = with lib.maintainers; [
83 benneti
84 aleksana
85 ];
86 mainProgram = "vaults";
87 platforms = lib.platforms.linux;
88 };
89})