mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-26 07:34:11 +00:00
46 lines
905 B
Nix
46 lines
905 B
Nix
{ stdenvNoCC
|
|
, lib
|
|
, wrapGAppsHook
|
|
, gdk-pixbuf
|
|
, librsvg
|
|
, xorg
|
|
, shared-mime-info
|
|
}:
|
|
|
|
timeshift-unwrapped:
|
|
runtimeDeps:
|
|
stdenvNoCC.mkDerivation {
|
|
inherit (timeshift-unwrapped) pname version;
|
|
|
|
dontUnpack = true;
|
|
|
|
nativeBuildInputs = [
|
|
xorg.lndir
|
|
wrapGAppsHook
|
|
];
|
|
|
|
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[@]}"
|
|
'';
|
|
|
|
inherit (timeshift-unwrapped) meta;
|
|
}
|