1 { lib, mkDerivation, backintime-common, python3, polkit, which, su, coreutils, util-linux }:
4 python' = python3.withPackages (ps: with ps; [ pyqt5 backintime-common packaging ]);
7 inherit (backintime-common)
8 version src installFlags meta dontAddPrefix nativeBuildInputs;
10 pname = "backintime-qt";
12 buildInputs = [ python' backintime-common ];
16 substituteInPlace configure \
17 --replace '"/../etc' '"/etc'
18 substituteInPlace qttools.py \
19 --replace "__file__, os.pardir, os.pardir" '"${backintime-common}/${python'.sitePackages}/backintime"'
23 wrapQtApp "$out/bin/backintime-qt" \
24 --prefix PATH : "${lib.getBin backintime-common}/bin:$PATH"
26 substituteInPlace "$out/share/polkit-1/actions/net.launchpad.backintime.policy" \
27 --replace "/usr/bin/backintime-qt" "$out/bin/backintime-qt"
29 substituteInPlace "$out/share/applications/backintime-qt-root.desktop" \
30 --replace "/usr/bin/backintime-qt" "backintime-qt"
32 substituteInPlace "$out/share/backintime/qt/serviceHelper.py" \
33 --replace "'which'" "'${lib.getBin which}/bin/which'" \
34 --replace "/bin/su" "${lib.getBin su}/bin/su" \
35 --replace "/usr/bin/backintime" "${lib.getBin backintime-common}/bin/backintime" \
36 --replace "/usr/bin/nice" "${lib.getBin coreutils}/bin/nice" \
37 --replace "/usr/bin/ionice" "${lib.getBin util-linux}/bin/ionice"
39 substituteInPlace "$out/share/dbus-1/system-services/net.launchpad.backintime.serviceHelper.service" \
40 --replace "/usr/bin/python3" "${lib.getBin python'}/bin/python3" \
41 --replace "/usr/share/backintime" "$out/share/backintime"
43 substituteInPlace "$out/bin/backintime-qt_polkit" \
44 --replace "/usr/bin/backintime-qt" "$out/bin/backintime-qt"
46 wrapProgram "$out/bin/backintime-qt_polkit" \
47 --prefix PATH : "${lib.getBin polkit}/bin:$PATH"