2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
2020-04-24 23:36:52 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, buildPythonPackage
|
|
|
|
, pygobject3
|
|
|
|
, pycairo
|
|
|
|
, glib
|
|
|
|
, gtk3
|
|
|
|
, gobject-introspection
|
2024-05-15 15:35:15 +00:00
|
|
|
, wrapGAppsHook3
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pick-colour-picker";
|
2023-10-09 19:29:22 +00:00
|
|
|
version = "unstable-2022-05-08";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "stuartlangridge";
|
|
|
|
repo = "ColourPicker";
|
2023-10-09 19:29:22 +00:00
|
|
|
rev = "e3e4c2bcec5d7285425582b92bb564c74be2cf77";
|
|
|
|
hash = "sha256-vW8mZiB3JFQtbOCWauhJGfZMlGsA/nNcljNNPtJtgGw=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-03-24 00:07:29 +00:00
|
|
|
postPatch = ''
|
|
|
|
sed "s|sys\.prefix|'\.'|g" -i setup.py
|
2023-10-09 19:29:22 +00:00
|
|
|
sed "s|os.environ.get(\"SNAP\")|'$out'|g" -i pick/__main__.py
|
2023-03-24 00:07:29 +00:00
|
|
|
sed "s|os.environ.get('SNAP'), \"usr\"|'$out'|g" -i pick/__main__.py
|
|
|
|
'';
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
gobject-introspection
|
2024-05-15 15:35:15 +00:00
|
|
|
wrapGAppsHook3
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
pythonPath = [
|
|
|
|
pygobject3
|
|
|
|
pycairo
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
glib
|
|
|
|
gtk3
|
|
|
|
];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://kryogenix.org/code/pick/";
|
|
|
|
license = licenses.mit;
|
|
|
|
platforms = platforms.linux;
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Colour picker that remembers where you picked colours from";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "pick-colour-picker";
|
2020-04-24 23:36:52 +00:00
|
|
|
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.
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
}
|