aboutsummaryrefslogtreecommitdiff
path: root/infra/libkookie/nixpkgs/pkgs/applications/networking/sync/backintime/qt.nix
blob: a48d6d8804fe00e94ab48f3c560def570d6b493c (plain)
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
{ mkDerivation, backintime-common, python3 }:

let
  python' = python3.withPackages (ps: with ps; [ pyqt5 backintime-common ]);
in
mkDerivation {
  inherit (backintime-common)
    version src installFlags meta dontAddPrefix nativeBuildInputs;

  pname = "backintime-qt";

  buildInputs = [ python' backintime-common ];

  preConfigure = ''
    cd qt
    substituteInPlace configure \
      --replace '"/../etc' '"/etc'
    substituteInPlace qttools.py \
      --replace "__file__, os.pardir, os.pardir" '"${backintime-common}/${python'.sitePackages}/backintime"'
  '';

  preFixup = ''
    wrapQtApp "$out/bin/backintime-qt" \
      --prefix PATH : "${backintime-common}/bin:$PATH"
  '';
}