blob: 784920712c94bf46093645fe4d93296816f8d3fd (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
{ lib
, stdenv
, fetchFromGitHub
, slurp
, grim
, gnome
, wl-clipboard
, imagemagick
, makeWrapper
}:
stdenv.mkDerivation rec {
pname = "wl-color-picker";
version = "1.3";
src = fetchFromGitHub {
owner = "jgmdev";
repo = "wl-color-picker";
rev = "v${version}";
sha256 = "sha256-lvhpXy4Sd1boYNGhbPoZTJlBhlW5obltDOrEzB1Gq0A=";
};
nativeBuildInputs = [ makeWrapper ];
patchPhase = ''
substituteInPlace Makefile \
--replace 'which' 'ls' \
--replace 'grim' "${grim}/bin/grim" \
--replace 'slurp' "${slurp}/bin/slurp" \
--replace 'convert' "${imagemagick}/bin/convert" \
--replace 'zenity' "${gnome.zenity}/bin/zenity" \
--replace 'wl-copy' "${wl-clipboard}/bin/wl-copy"
'';
installFlags = [
"DESTDIR=${placeholder "out"}"
];
postInstall = ''
wrapProgram $out/usr/bin/wl-color-picker \
--prefix PATH : ${lib.makeBinPath [
grim
slurp
imagemagick
gnome.zenity
wl-clipboard
]}
mkdir -p $out/bin
ln -s $out/usr/bin/wl-color-picker $out/bin/wl-color-picker
'';
meta = with lib; {
description = "Wayland color picker that also works on wlroots";
homepage = "https://github.com/jgmdev/wl-color-picker";
license = licenses.mit;
maintainers = with maintainers; [ onny ];
platforms = platforms.linux;
};
}
|