tangled
alpha
login
or
join now
tjh.dev
/
nixpkgs
Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
0
fork
atom
overview
issues
pulls
pipelines
timeshift: format expressions
Yueh-Shun Li
1 year ago
c6a09301
5c8a2cab
+68
-51
4 changed files
expand all
collapse all
unified
split
pkgs
applications
backup
timeshift
default.nix
minimal.nix
unwrapped.nix
wrapper.nix
+23
-19
pkgs/applications/backup/timeshift/default.nix
···
1
1
-
{ callPackage
2
2
-
, timeshift-unwrapped
3
3
-
, rsync
4
4
-
, coreutils
5
5
-
, mount
6
6
-
, umount
7
7
-
, psmisc
8
8
-
, cron
9
9
-
, btrfs-progs
10
10
-
, grubPackage
1
1
+
{
2
2
+
callPackage,
3
3
+
timeshift-unwrapped,
4
4
+
rsync,
5
5
+
coreutils,
6
6
+
mount,
7
7
+
umount,
8
8
+
psmisc,
9
9
+
cron,
10
10
+
btrfs-progs,
11
11
+
grubPackage,
11
12
}:
12
13
let
13
14
timeshift-wrapper = callPackage ./wrapper.nix { };
···
21
22
cron
22
23
btrfs-progs
23
24
grubPackage
24
24
-
])).overrideAttrs (oldAttrs: {
25
25
-
meta = oldAttrs.meta // {
26
26
-
description = oldAttrs.meta.description;
27
27
-
longDescription = oldAttrs.meta.longDescription + ''
28
28
-
This package comes with runtime dependencies of command utilities provided by rsync, coreutils, mount, umount, psmisc, cron and btrfs.
29
29
-
If you want to use the commands provided by the system, use timeshift-minimal instead.
30
30
-
'';
31
31
-
};
32
32
-
})
25
25
+
])).overrideAttrs
26
26
+
(oldAttrs: {
27
27
+
meta = oldAttrs.meta // {
28
28
+
description = oldAttrs.meta.description;
29
29
+
longDescription =
30
30
+
oldAttrs.meta.longDescription
31
31
+
+ ''
32
32
+
This package comes with runtime dependencies of command utilities provided by rsync, coreutils, mount, umount, psmisc, cron and btrfs.
33
33
+
If you want to use the commands provided by the system, use timeshift-minimal instead.
34
34
+
'';
35
35
+
};
36
36
+
})
+9
-6
pkgs/applications/backup/timeshift/minimal.nix
···
1
1
-
{ callPackage
2
2
-
, timeshift-unwrapped
1
1
+
{
2
2
+
callPackage,
3
3
+
timeshift-unwrapped,
3
4
}:
4
5
let
5
6
timeshift-wrapper = callPackage ./wrapper.nix { };
···
7
8
(timeshift-wrapper timeshift-unwrapped [ ]).overrideAttrs (oldAttrs: {
8
9
meta = oldAttrs.meta // {
9
10
description = oldAttrs.meta.description + " (without runtime dependencies)";
10
10
-
longDescription = oldAttrs.meta.longDescription + ''
11
11
-
This package is a wrapped version of timeshift-unwrapped
12
12
-
without runtime dependencies of command utilities.
13
13
-
'';
11
11
+
longDescription =
12
12
+
oldAttrs.meta.longDescription
13
13
+
+ ''
14
14
+
This package is a wrapped version of timeshift-unwrapped
15
15
+
without runtime dependencies of command utilities.
16
16
+
'';
14
17
};
15
18
})
+20
-16
pkgs/applications/backup/timeshift/unwrapped.nix
···
1
1
-
{ lib
2
2
-
, stdenv
3
3
-
, fetchFromGitHub
4
4
-
, gettext
5
5
-
, help2man
6
6
-
, meson
7
7
-
, ninja
8
8
-
, pkg-config
9
9
-
, vala
10
10
-
, gtk3
11
11
-
, json-glib
12
12
-
, libgee
13
13
-
, util-linux
14
14
-
, vte
15
15
-
, xapp
1
1
+
{
2
2
+
lib,
3
3
+
stdenv,
4
4
+
fetchFromGitHub,
5
5
+
gettext,
6
6
+
help2man,
7
7
+
meson,
8
8
+
ninja,
9
9
+
pkg-config,
10
10
+
vala,
11
11
+
gtk3,
12
12
+
json-glib,
13
13
+
libgee,
14
14
+
util-linux,
15
15
+
vte,
16
16
+
xapp,
16
17
}:
17
18
18
19
stdenv.mkDerivation rec {
···
65
66
homepage = "https://github.com/linuxmint/timeshift";
66
67
license = licenses.gpl2Plus;
67
68
platforms = platforms.linux;
68
68
-
maintainers = with maintainers; [ ShamrockLee bobby285271 ];
69
69
+
maintainers = with maintainers; [
70
70
+
ShamrockLee
71
71
+
bobby285271
72
72
+
];
69
73
};
70
74
}
+16
-10
pkgs/applications/backup/timeshift/wrapper.nix
···
1
1
-
{ stdenvNoCC
2
2
-
, lib
3
3
-
, wrapGAppsHook3
4
4
-
, gdk-pixbuf
5
5
-
, librsvg
6
6
-
, xorg
7
7
-
, shared-mime-info
1
1
+
{
2
2
+
stdenvNoCC,
3
3
+
lib,
4
4
+
wrapGAppsHook3,
5
5
+
gdk-pixbuf,
6
6
+
librsvg,
7
7
+
xorg,
8
8
+
shared-mime-info,
8
9
}:
9
10
10
10
-
timeshift-unwrapped:
11
11
-
runtimeDeps:
11
11
+
timeshift-unwrapped: runtimeDeps:
12
12
stdenvNoCC.mkDerivation {
13
13
inherit (timeshift-unwrapped) pname version;
14
14
···
34
34
)
35
35
gappsWrapperArgs+=(
36
36
# Thumbnailers
37
37
-
--prefix XDG_DATA_DIRS : "${lib.makeSearchPath "share" [ gdk-pixbuf librsvg shared-mime-info ]}"
37
37
+
--prefix XDG_DATA_DIRS : "${
38
38
+
lib.makeSearchPath "share" [
39
39
+
gdk-pixbuf
40
40
+
librsvg
41
41
+
shared-mime-info
42
42
+
]
43
43
+
}"
38
44
"''${makeWrapperArgs[@]}"
39
45
)
40
46
wrapProgram "$out/bin/timeshift" "''${makeWrapperArgs[@]}"