Merge pull request #286331 from jtbx/farge-style

farge: use stdenvNoCC, fix style
This commit is contained in:
Weijia Wang 2024-02-05 01:11:34 +01:00 committed by GitHub
commit 24cbb630b9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 15 additions and 14 deletions

View file

@ -1,5 +1,5 @@
{ lib
, stdenv
, stdenvNoCC
, fetchFromGitHub
, makeBinaryWrapper
, bc
@ -10,11 +10,12 @@
, slurp
, wl-clipboard
, xcolor
, waylandSupport ? true
, x11Support ? true
}:
stdenv.mkDerivation (finalAttrs: {
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "farge";
version = "1.0.9";
@ -31,26 +32,28 @@ stdenv.mkDerivation (finalAttrs: {
wrapperPath = lib.makeBinPath ([
bc
feh
#Needed to fix convert: unable to read font `(null)' @ error/annotate.c/RenderFreetype issue
(imagemagick.override { ghostscriptSupport = true;})
libnotify #Needed for the notify-send function call from the script
] ++ lib.optionals waylandSupport [ grim slurp wl-clipboard ]
++ lib.optionals x11Support [ xcolor ]);
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
mkdir -p $out/bin
install -m755 farge $out/bin
install -Dm755 farge $out/bin/farge
wrapProgram $out/bin/farge \
--prefix PATH : "${finalAttrs.wrapperPath}"
--prefix PATH : "${finalAttrs.wrapperPath}"
runHook postInstall
'';
meta = with lib; {
description = "A tool that shows the color value of a given pixel on your screen";
description = "View the color value of a specific pixel on your screen";
homepage = "https://github.com/sdushantha/farge";
license = licenses.mit;
platforms = platforms.all;
platforms = platforms.unix;
maintainers = with maintainers; [ jtbx justinlime ];
mainProgram = "farge";
};

View file

@ -8241,8 +8241,6 @@ with pkgs;
faraday-cli = callPackage ../tools/security/faraday-cli { };
farge = callPackage ../tools/misc/farge { };
fastlane = callPackage ../tools/admin/fastlane { };
fatresize = callPackage ../tools/filesystems/fatresize { };