-
Notifications
You must be signed in to change notification settings - Fork 0
/
default.nix
56 lines (50 loc) · 1.41 KB
/
default.nix
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
{ lib, nix-gitignore, python3Packages, wrapGAppsHook, gobject-introspection, restic }:
let
cleanSources = { src }:
let
nixFilter = name: type: ! (
(type == "regular" && lib.strings.hasSuffix ".nix" name)
);
in lib.cleanSourceWith {
filter = lib.cleanSourceFilter;
src = lib.cleanSourceWith {
filter = nix-gitignore.gitignoreFilterPure nixFilter [ ./.gitignore ] src;
inherit src;
};
};
in
python3Packages.buildPythonApplication {
name = "igotchuu";
version = "0.1.0";
src = cleanSources {
src = ./.;
};
buildInputs = [ gobject-introspection ];
nativeBuildInputs = [ wrapGAppsHook ];
propagatedBuildInputs = with python3Packages; [
pygobject3 btrfsutil python-unshare click
];
# There are no tests for now
doCheck = false;
# No double-wrapping
dontWrapGApps = true;
postInstall = ''
install -Dm644 ./dbus-policy.conf $out/share/dbus-1/system.d/com.nyantec.IGotChuu.conf
'';
preFixup = ''
makeWrapperArgs+=(
--prefix PATH ":" "${lib.makeBinPath [ restic ]}"
"''${gappsWrapperArgs[@]}"
)
'';
meta = with lib; {
mainProgram = "igotchuu";
homepage = "https://github.com/nyantec/igotchuu";
description = "Backup script wrapping Restic with btrfs snapshots and other goodies";
maintainers = with maintainers; [
vikanezrimaya
];
license = licenses.miros;
platforms = platforms.linux;
};
}