diff options
author | Alyssa Ross <hi@alyssa.is> | 2021-01-15 10:30:44 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2021-01-15 10:30:44 +0000 |
commit | e0794be8a0d11e90461e5a9c85012a36b93ec976 (patch) | |
tree | efd9cbc55ea3322867bf601c4d536758a3dd5fcc /nixpkgs/pkgs/desktops/mate/mate-tweak/default.nix | |
parent | 3538874082ded7647b1ccec0343c7c1e882cfef3 (diff) | |
parent | 1a57d96edd156958b12782e8c8b6a374142a7248 (diff) | |
download | nixlib-e0794be8a0d11e90461e5a9c85012a36b93ec976.tar nixlib-e0794be8a0d11e90461e5a9c85012a36b93ec976.tar.gz nixlib-e0794be8a0d11e90461e5a9c85012a36b93ec976.tar.bz2 nixlib-e0794be8a0d11e90461e5a9c85012a36b93ec976.tar.lz nixlib-e0794be8a0d11e90461e5a9c85012a36b93ec976.tar.xz nixlib-e0794be8a0d11e90461e5a9c85012a36b93ec976.tar.zst nixlib-e0794be8a0d11e90461e5a9c85012a36b93ec976.zip |
Merge commit '1a57d96edd156958b12782e8c8b6a374142a7248'
Diffstat (limited to 'nixpkgs/pkgs/desktops/mate/mate-tweak/default.nix')
-rw-r--r-- | nixpkgs/pkgs/desktops/mate/mate-tweak/default.nix | 83 |
1 files changed, 83 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/desktops/mate/mate-tweak/default.nix b/nixpkgs/pkgs/desktops/mate/mate-tweak/default.nix new file mode 100644 index 000000000000..9609d832f6b1 --- /dev/null +++ b/nixpkgs/pkgs/desktops/mate/mate-tweak/default.nix @@ -0,0 +1,83 @@ +{ stdenv +, fetchFromGitHub +, python3Packages +, intltool +, mate +, libnotify +, gtk3 +, gdk-pixbuf +, gobject-introspection +, wrapGAppsHook +, glib +}: + +python3Packages.buildPythonApplication rec { + pname = "mate-tweak"; + version = "20.10.0"; + + src = fetchFromGitHub { + owner = "ubuntu-mate"; + repo = pname; + rev = version; + sha256 = "08gw5i5wjxmzn92h9fv6g7q9i00n8shv1wlpy6cb31xy9wbmjph6"; + }; + + nativeBuildInputs = [ + wrapGAppsHook + intltool + python3Packages.distutils_extra + gobject-introspection + ]; + + buildInputs = [ + gtk3 + gdk-pixbuf + libnotify + glib + mate.mate-applets + mate.mate-panel + mate.marco + mate.libmatekbd + mate.mate-session-manager + ]; + + propagatedBuildInputs = with python3Packages; [ + distro + pygobject3 + psutil + setproctitle + ]; + + strictDeps = false; + + dontWrapGApps = true; + + postPatch = '' + # mate-tweak hardcodes absolute paths everywhere. Nuke from orbit. + find . -type f -exec sed -i \ + -e s,/usr/lib/mate-tweak,$out/lib/mate-tweak,g \ + {} + + + sed -i 's,{prefix}/,,g' setup.py + ''; + + # Arguments to be passed to `makeWrapper`, only used by buildPython* + preFixup = '' + makeWrapperArgs+=("''${gappsWrapperArgs[@]}") + ''; + + postFixup = '' + for i in bin/.mate-tweak-wrapped lib/mate-tweak/mate-tweak-helper; do + sed -i "s,usr,run/current-system/sw,g" $out/$i + done + ''; + + meta = with stdenv.lib; { + description = "Tweak tool for the MATE Desktop"; + homepage = "https://github.com/ubuntu-mate/mate-tweak"; + changelog = "https://github.com/ubuntu-mate/mate-tweak/releases/tag/${version}"; + license = [ licenses.gpl2Plus ]; + platforms = platforms.linux; + maintainers = with maintainers; [ luc65r ]; + }; +} |