nixpkgs/pkgs/by-name/gu/guake/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

104 lines
2.4 KiB
Nix

{ lib
, fetchFromGitHub
, fetchpatch
, python311
, python311Packages
, glibcLocales
, gobject-introspection
, wrapGAppsHook3
, gtk3
, keybinder3
, libnotify
, libutempter
, vte
, libwnck
, dconf
, nixosTests
}:
python311Packages.buildPythonApplication rec {
pname = "guake";
version = "3.10";
pyproject = false;
src = fetchFromGitHub {
owner = "Guake";
repo = "guake";
rev = "refs/tags/${version}";
hash = "sha256-e6Bf4HDftHBxFPcw9z02CqgZhSIvt6wlLF6dnIh9fEc=";
};
patches = [
# Avoid trying to recompile schema at runtime,
# the package should be responsible for ensuring it is up to date.
# Without this, the package will try to run glib-compile-schemas
# on every update, which is pointless and will crash
# unless user has it installed.
./no-compile-schemas.patch
# Avoid using pip since it fails on not being able to find setuptools.
# Note: This is not a long-term solution, setup.py is deprecated.
(fetchpatch {
url = "https://github.com/Guake/guake/commit/14abaa0c69cfab64fe3467fbbea211d830042de8.patch";
hash = "sha256-RjGRFJDTQX2meAaw3UZi/3OxAtIHbRZVpXTbcJk/scY= ";
revert = true;
})
# Revert switch to FHS.
(fetchpatch {
url = "https://github.com/Guake/guake/commit/8c7a23ba62ee262c033dfa5b0b18d3df71361ff4.patch";
hash = "sha256-0asXI08XITkFc73EUenV9qxY/Eak+TzygRRK7GvhQUc=";
revert = true;
})
];
nativeBuildInputs = [
gobject-introspection
wrapGAppsHook3
python311Packages.pip
];
buildInputs = [
glibcLocales
gtk3
keybinder3
libnotify
libwnck
python311
vte
];
makeWrapperArgs = [ "--set LOCALE_ARCHIVE ${glibcLocales}/lib/locale/locale-archive" ];
propagatedBuildInputs = with python311Packages; [
dbus-python
pycairo
pygobject3
setuptools-scm
pyyaml
];
makeFlags = [
"PREFIX=${placeholder "out"}"
];
preFixup = ''
gappsWrapperArgs+=(
--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ libutempter ]}"
# For settings migration.
--prefix PATH : "${lib.makeBinPath [ dconf ]}"
)
'';
passthru.tests.test = nixosTests.terminal-emulators.guake;
meta = with lib; {
description = "Drop-down terminal for GNOME";
homepage = "http://guake-project.org";
license = licenses.gpl2Plus;
maintainers = [ maintainers.msteen maintainers.heywoodlh ];
platforms = platforms.linux;
};
}