nixpkgs/pkgs/by-name/fa/farge/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

61 lines
1.3 KiB
Nix
Raw Normal View History

{ lib
2024-02-04 17:39:46 +00:00
, stdenvNoCC
, fetchFromGitHub
2023-07-31 22:01:50 +00:00
, makeBinaryWrapper
, bc
2023-07-31 22:01:50 +00:00
, libnotify
, feh
, grim
, imagemagick
, slurp
, wl-clipboard
, xcolor
2024-02-04 17:39:46 +00:00
, waylandSupport ? true
, x11Support ? true
}:
2024-02-04 17:39:46 +00:00
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "farge";
version = "1.0.9";
src = fetchFromGitHub {
owner = "sdushantha";
repo = "farge";
rev = "2ff6669e2350644d4f0b1bd84526efe5eae3c302";
hash = "sha256-vCMuFMGcI4D4EzbSsXeNGKNS6nBFkfTcAmSzb9UMArc=";
};
2023-07-31 22:01:50 +00:00
nativeBuildInputs = [ makeBinaryWrapper ];
# Ensure the following programs are found within $PATH
wrapperPath = lib.makeBinPath ([
bc
feh
2024-02-04 17:39:46 +00:00
libnotify # notify-send
# Needed to fix font rendering issue in imagemagick
(imagemagick.override { ghostscriptSupport = true; })
] ++ lib.optionals waylandSupport [
grim
slurp
wl-clipboard
] ++ lib.optional x11Support xcolor);
installPhase = ''
runHook preInstall
2024-02-04 17:39:46 +00:00
install -Dm755 farge $out/bin/farge
2023-07-31 22:01:50 +00:00
wrapProgram $out/bin/farge \
2024-02-04 17:39:46 +00:00
--prefix PATH : "${finalAttrs.wrapperPath}"
runHook postInstall
'';
meta = with lib; {
2024-02-04 17:39:46 +00:00
description = "View the color value of a specific pixel on your screen";
homepage = "https://github.com/sdushantha/farge";
license = licenses.mit;
2024-02-04 17:39:46 +00:00
platforms = platforms.unix;
2023-07-31 22:01:50 +00:00
maintainers = with maintainers; [ jtbx justinlime ];
mainProgram = "farge";
};
})