nixpkgs/pkgs/applications/graphics/pick-colour-picker/default.nix
Jan Tojnar eb04659fc2 treewide: wrapGAppsHook → wrapGAppsHook3
This was achieved using the following command:

    sd 'wrapGAppsHook\b' wrapGAppsHook3 (rg -l 'wrapGAppsHook\b')

And then manually reverted the following changes:

- alias in top-level.nix
- function name in wrap-gapps-hook.sh
- comment in postFixup of at-spi2-core
- comment in gtk4
- comment in preFixup of 1password-gui/linux.nix
- comment in postFixup of qgis/unwrapped-ltr.nix and qgis/unwrapped.nix
- comment in postFixup of telegram-desktop
- comment in postFixup of fwupd
- buildCommand of mongodb-compass
- postFixup of xflux-gui
- comment in a patch in kdePackages.kde-gtk-config and plasma5Packages.kde-gtk-config
- description of programs.sway.wrapperFeatures.gtk NixOS option (manual rebuild)
2024-04-27 02:23:22 +02:00

59 lines
1.5 KiB
Nix

{ lib
, fetchFromGitHub
, buildPythonPackage
, pygobject3
, pycairo
, glib
, gtk3
, gobject-introspection
, wrapGAppsHook3
, python
}:
buildPythonPackage rec {
pname = "pick-colour-picker";
version = "unstable-2022-05-08";
src = fetchFromGitHub {
owner = "stuartlangridge";
repo = "ColourPicker";
rev = "e3e4c2bcec5d7285425582b92bb564c74be2cf77";
hash = "sha256-vW8mZiB3JFQtbOCWauhJGfZMlGsA/nNcljNNPtJtgGw=";
};
postPatch = ''
sed "s|sys\.prefix|'\.'|g" -i setup.py
sed "s|os.environ.get(\"SNAP\")|'$out'|g" -i pick/__main__.py
sed "s|os.environ.get('SNAP'), \"usr\"|'$out'|g" -i pick/__main__.py
'';
nativeBuildInputs = [
gobject-introspection
wrapGAppsHook3
];
pythonPath = [
pygobject3
pycairo
];
buildInputs = [
glib
gtk3
];
meta = with lib; {
homepage = "https://kryogenix.org/code/pick/";
license = licenses.mit;
platforms = platforms.linux;
description = "A colour picker that remembers where you picked colours from";
mainProgram = "pick-colour-picker";
maintainers = [ maintainers.mkg20001 ];
longDescription = ''
Pick lets you pick colours from anywhere on your screen. Choose the colour you want and Pick remembers it, names it, and shows you a screenshot so you can remember where you got it from.
Zoom all the way in to pixels to pick just the right one. Show your colours in your choice of format: rgba() or hex, CSS or Gdk or Qt, whichever you prefer. Copy to the clipboard ready for pasting into code or graphics apps.
'';
};
}