nagiosPlugins.check_ssl_cert: 2.85.1 -> 2.86.0 (#379244)
[NixPkgs.git] / pkgs / by-name / fa / farge / package.nix
blobfbef65d5b0e5ad2041657bed5ae4fb957fd7821e
2   lib,
3   stdenvNoCC,
4   fetchFromGitHub,
5   makeBinaryWrapper,
6   bc,
7   libnotify,
8   feh,
9   grim,
10   imagemagick,
11   slurp,
12   wl-clipboard,
13   xcolor,
15   waylandSupport ? true,
16   x11Support ? true,
19 stdenvNoCC.mkDerivation (finalAttrs: {
20   pname = "farge";
21   version = "1.0.9";
23   src = fetchFromGitHub {
24     owner = "sdushantha";
25     repo = "farge";
26     rev = "2ff6669e2350644d4f0b1bd84526efe5eae3c302";
27     hash = "sha256-vCMuFMGcI4D4EzbSsXeNGKNS6nBFkfTcAmSzb9UMArc=";
28   };
30   nativeBuildInputs = [ makeBinaryWrapper ];
32   # Ensure the following programs are found within $PATH
33   wrapperPath = lib.makeBinPath (
34     [
35       bc
36       feh
37       libnotify # notify-send
38       # Needed to fix font rendering issue in imagemagick
39       (imagemagick.override { ghostscriptSupport = true; })
40     ]
41     ++ lib.optionals waylandSupport [
42       grim
43       slurp
44       wl-clipboard
45     ]
46     ++ lib.optional x11Support xcolor
47   );
49   installPhase = ''
50     runHook preInstall
51     install -Dm755 farge $out/bin/farge
52     wrapProgram $out/bin/farge \
53       --prefix PATH : "${finalAttrs.wrapperPath}"
54     runHook postInstall
55   '';
57   meta = with lib; {
58     description = "View the color value of a specific pixel on your screen";
59     homepage = "https://github.com/sdushantha/farge";
60     license = licenses.mit;
61     platforms = platforms.unix;
62     maintainers = with maintainers; [
63       jtbx
64       justinlime
65     ];
66     mainProgram = "farge";
67   };