mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-01 19:33:03 +00:00
755b915a15
nix run nixpkgs#silver-searcher -- -G '\.nix$' -0l 'description.*"[Aa]n?' pkgs \ | xargs -0 nix run nixpkgs#gnused -- -i '' -Ee 's/(description.*")[Aa]n? (.)/\1\U\2/'
49 lines
1.1 KiB
Nix
49 lines
1.1 KiB
Nix
{ lib
|
|
, graphicsmagick
|
|
, stdenvNoCC
|
|
}:
|
|
|
|
stdenvNoCC.mkDerivation {
|
|
pname = "graphicsmagick-imagemagick-compat";
|
|
inherit (graphicsmagick) version;
|
|
|
|
outputs = [ "out" "man" ];
|
|
|
|
dontUnpack = true;
|
|
dontBuild = true;
|
|
|
|
# TODO: symlink libraries?
|
|
installPhase = let
|
|
utilities = [
|
|
"animate"
|
|
"composite"
|
|
"conjure"
|
|
"convert"
|
|
"display"
|
|
"identify"
|
|
"import"
|
|
"mogrify"
|
|
"montage"
|
|
];
|
|
linkUtilityBin = utility: ''
|
|
ln -s ${lib.getExe graphicsmagick} "$out/bin/${utility}"
|
|
'';
|
|
linkUtilityMan = utility: ''
|
|
ln -s ${lib.getMan graphicsmagick}/share/man/man1/gm.1.gz "$man/share/man/man1/${utility}.1.gz"
|
|
'';
|
|
in ''
|
|
runHook preInstall
|
|
|
|
mkdir -p "$out"/bin
|
|
${lib.concatStringsSep "\n" (map linkUtilityBin utilities)}
|
|
mkdir -p "$man"/share/man/man1
|
|
${lib.concatStringsSep "\n" (map linkUtilityMan utilities)}
|
|
|
|
runHook postInstall
|
|
'';
|
|
|
|
meta = graphicsmagick.meta // {
|
|
description = "Repack of GraphicsMagick that provides compatibility with ImageMagick interfaces";
|
|
};
|
|
}
|