Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
57 lines
1.3 KiB
Nix
57 lines
1.3 KiB
Nix
{
|
|
stdenvNoCC,
|
|
lib,
|
|
wrapGAppsHook3,
|
|
gdk-pixbuf,
|
|
librsvg,
|
|
xorg,
|
|
shared-mime-info,
|
|
}:
|
|
|
|
timeshift-unwrapped: runtimeDeps:
|
|
stdenvNoCC.mkDerivation {
|
|
inherit (timeshift-unwrapped) pname version;
|
|
|
|
dontUnpack = true;
|
|
|
|
nativeBuildInputs = [
|
|
wrapGAppsHook3
|
|
xorg.lndir
|
|
];
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
mkdir -p "$out"
|
|
lndir "${timeshift-unwrapped}" "$out"
|
|
runHook postInstall
|
|
'';
|
|
|
|
dontWrapGApps = true;
|
|
|
|
preFixup = ''
|
|
makeWrapperArgs=(
|
|
--prefix PATH : "${lib.makeBinPath runtimeDeps}"
|
|
)
|
|
gappsWrapperArgs+=(
|
|
# Thumbnailers
|
|
--prefix XDG_DATA_DIRS : "${
|
|
lib.makeSearchPath "share" [
|
|
gdk-pixbuf
|
|
librsvg
|
|
shared-mime-info
|
|
]
|
|
}"
|
|
"''${makeWrapperArgs[@]}"
|
|
)
|
|
wrapProgram "$out/bin/timeshift" "''${makeWrapperArgs[@]}"
|
|
wrapProgram "$out/bin/timeshift-gtk" "''${gappsWrapperArgs[@]}"
|
|
# Substitute app_command to look for the `timeshift-gtk` in $out.
|
|
unlink "$out/bin/timeshift-launcher"
|
|
substitute ${lib.getExe' timeshift-unwrapped "timeshift-launcher"} "$out/bin/timeshift-launcher" \
|
|
--replace-fail "app_command=${lib.getExe' timeshift-unwrapped "timeshift-gtk"}" "app_command=$out/bin/timeshift-gtk"
|
|
chmod +x "$out/bin/timeshift-launcher"
|
|
'';
|
|
|
|
inherit (timeshift-unwrapped) meta;
|
|
}
|