nixos-config/pkgs/adwcustomizer/default.nix

84 lines
1.5 KiB
Nix
Raw Normal View History

{ stdenv
, lib
, fetchFromGitHub
, wrapGAppsHook4
, meson
, ninja
, pkg-config
, glib
, desktop-file-utils
, gettext
, blueprint-compiler
, python3Packages
, appstream-glib
, gtk4
, libadwaita
, libportal
, libportal-gtk4
, gobject-introspection
}:
# Not all parts of the application works with the current nixpkgs version of
# libadwaita.
python3Packages.buildPythonApplication rec {
pname = "adwcustomizer";
2022-08-13 14:24:55 +00:00
version = "0.1.0";
src = fetchFromGitHub {
2022-08-13 14:24:55 +00:00
owner = "AdwCustomizerTeam";
repo = "AdwCustomizer";
2022-08-13 14:24:55 +00:00
rev = version;
sha256 = "sha256-3VHGk27MIgu+15OQeEmX8zfTCj/TtFtVv3Cf/iXxb/c=";
};
patches = [
./patches/update-non-flatpak-env.patch
];
format = "other";
dontWrapGApps = true;
2022-08-13 14:24:55 +00:00
postInstall = ''
python -m pip install $src/monet/*.whl --no-cache --no-index --no-warn-script-location --prefix="$out" $pipInstallFlags
'';
nativeBuildInputs = [
wrapGAppsHook4
meson
ninja
pkg-config
desktop-file-utils
gettext
blueprint-compiler
gtk4
];
2022-08-13 14:24:55 +00:00
propagatedNativeBuildInputs = [
gobject-introspection
appstream-glib
glib
2022-08-13 14:24:55 +00:00
];
propagatedBuildInputs = [
libadwaita
libportal
libportal-gtk4
] ++ (with python3Packages; [
pygobject3
anyascii
2022-08-13 14:24:55 +00:00
pillow
pip
regex
]);
preFixup = ''
makeWrapperArgs+=("''${gappsWrapperArgs[@]}")
'';
meta = with lib; {
2022-08-13 14:24:55 +00:00
homepage = "https://github.com/AdwCustomizerTeam/AdwCustomizer";
description = "Customize libadwaita and GTK3 apps (with adw-gtk3)";
license = licenses.mit;
};
}