nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 fetchFromGitHub,
4 fetchpatch,
5 python311,
6 python311Packages,
7 glibcLocales,
8 gobject-introspection,
9 wrapGAppsHook3,
10 gtk3,
11 keybinder3,
12 libnotify,
13 libutempter,
14 vte,
15 libwnck,
16 dconf,
17 nixosTests,
18}:
19
20python311Packages.buildPythonApplication rec {
21 pname = "guake";
22 version = "3.10.1";
23
24 pyproject = false;
25
26 src = fetchFromGitHub {
27 owner = "Guake";
28 repo = "guake";
29 tag = version;
30 hash = "sha256-TTDVJeM37SbpWucJGYoeYX9t4r1k3ldru9Cd02hBrU4=";
31 };
32
33 patches = [
34 # Avoid trying to recompile schema at runtime,
35 # the package should be responsible for ensuring it is up to date.
36 # Without this, the package will try to run glib-compile-schemas
37 # on every update, which is pointless and will crash
38 # unless user has it installed.
39 ./no-compile-schemas.patch
40
41 # Avoid using pip since it fails on not being able to find setuptools.
42 # Note: This is not a long-term solution, setup.py is deprecated.
43 (fetchpatch {
44 url = "https://github.com/Guake/guake/commit/14abaa0c69cfab64fe3467fbbea211d830042de8.patch";
45 hash = "sha256-RjGRFJDTQX2meAaw3UZi/3OxAtIHbRZVpXTbcJk/scY= ";
46 revert = true;
47 })
48
49 # Revert switch to FHS.
50 (fetchpatch {
51 url = "https://github.com/Guake/guake/commit/8c7a23ba62ee262c033dfa5b0b18d3df71361ff4.patch";
52 hash = "sha256-0asXI08XITkFc73EUenV9qxY/Eak+TzygRRK7GvhQUc=";
53 revert = true;
54 })
55 ];
56
57 nativeBuildInputs = [
58 gobject-introspection
59 wrapGAppsHook3
60 python311Packages.pip
61 ];
62
63 buildInputs = [
64 glibcLocales
65 gtk3
66 keybinder3
67 libnotify
68 libwnck
69 python311
70 vte
71 ];
72
73 makeWrapperArgs = [ "--set LOCALE_ARCHIVE ${glibcLocales}/lib/locale/locale-archive" ];
74
75 propagatedBuildInputs = with python311Packages; [
76 dbus-python
77 pycairo
78 pygobject3
79 setuptools-scm
80 pyyaml
81 ];
82
83 makeFlags = [
84 "PREFIX=${placeholder "out"}"
85 ];
86
87 preFixup = ''
88 gappsWrapperArgs+=(
89 --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ libutempter ]}"
90 # For settings migration.
91 --prefix PATH : "${lib.makeBinPath [ dconf ]}"
92 )
93 '';
94
95 passthru.tests.test = nixosTests.terminal-emulators.guake;
96
97 meta = {
98 description = "Drop-down terminal for GNOME";
99 homepage = "http://guake-project.org";
100 license = lib.licenses.gpl2Plus;
101 maintainers = [
102 lib.maintainers.msteen
103 lib.maintainers.heywoodlh
104 ];
105 platforms = lib.platforms.linux;
106 };
107}