about summary refs log tree commit diff
path: root/pkgs/applications/misc/kupfer/default.nix
blob: bb55fc2d4a8b7d38bb7602a23c3174a17ee99db5 (plain) (blame)
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
{ stdenv
, makeWrapper
, fetchurl
, intltool
, python3Packages
, gobjectIntrospection
, gtk3
, dbus
, libwnck3
, keybinder3
, hicolor-icon-theme
, wrapGAppsHook
}:

with python3Packages;

buildPythonApplication rec {
  name = "kupfer-${version}";
  version = "319";

  src = fetchurl {
    url = "https://github.com/kupferlauncher/kupfer/releases/download/v${version}/kupfer-v${version}.tar.xz";
    sha256 = "0c9xjx13r8ckfr4az116bhxsd3pk78v04c3lz6lqhraak0rp4d92";
  };

  nativeBuildInputs = [
    wrapGAppsHook intltool
    # For setup hook
    gobjectIntrospection
  ];
  buildInputs = [ hicolor-icon-theme docutils libwnck3 keybinder3 ];
  propagatedBuildInputs = [ pygobject3 gtk3 pyxdg dbus-python pycairo ];

  configurePhase = ''
    runHook preConfigure
    python ./waf configure --prefix=$prefix
    runHook postConfigure
  '';

  buildPhase = ''
    runHook preBuild
    python ./waf
    runHook postBuild
  '';

  installPhase = let
    pythonPath = (stdenv.lib.concatMapStringsSep ":"
      (m: "${m}/lib/${python.libPrefix}/site-packages")
      propagatedBuildInputs);
  in ''
    runHook preInstall
    python ./waf install

    gappsWrapperArgs+=(
      "--prefix" "PYTHONPATH" : "${pythonPath}"
      "--set" "PYTHONNOUSERSITE" "1"
    )

    runHook postInstall
  '';

  doCheck = false; # no tests

  meta = with stdenv.lib; {
    description = "A smart, quick launcher";
    homepage    = "https://kupferlauncher.github.io/";
    license     = licenses.gpl3;
    maintainers = with maintainers; [ cobbal ];
    platforms   = platforms.linux;
  };
}