forked from NixOS/nixpkgs
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
94a5246
commit 4dec0e1
Showing
3 changed files
with
116 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,22 @@ | ||
{ lib, stdenv, fetchurl, bzip2, freetype, graphviz, ghostscript | ||
, libjpeg, libpng, libtiff, libxml2, zlib, libtool, xz, libX11 | ||
, libwebp, quantumdepth ? 8, fixDarwinDylibNames }: | ||
{ lib | ||
, stdenv | ||
, fetchurl | ||
, bzip2 | ||
, freetype | ||
, graphviz | ||
, ghostscript | ||
, libjpeg | ||
, libpng | ||
, libtiff | ||
, libxml2 | ||
, zlib | ||
, libtool | ||
, xz | ||
, libX11 | ||
, libwebp | ||
, quantumdepth ? 8 | ||
, fixDarwinDylibNames | ||
}: | ||
|
||
stdenv.mkDerivation rec { | ||
pname = "graphicsmagick"; | ||
|
@@ -15,23 +31,50 @@ stdenv.mkDerivation rec { | |
./disable-popen.patch | ||
]; | ||
|
||
outputs = [ "out" "dev" ]; | ||
|
||
enableParallelBuilding = true; | ||
|
||
configureFlags = [ | ||
"--enable-shared" | ||
"--with-frozenpaths" | ||
"--with-modules" | ||
"--with-perl" | ||
"--with-quantum-depth=${toString quantumdepth}" | ||
"--with-gslib=yes" | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
Stunkymonkey
Author
Owner
|
||
"--with-threads" | ||
This comment has been minimized.
Sorry, something went wrong.
dschrempf
|
||
]; | ||
|
||
buildInputs = | ||
[ bzip2 freetype ghostscript graphviz libjpeg libpng libtiff libX11 libxml2 | ||
zlib libtool libwebp | ||
[ | ||
bzip2 | ||
freetype | ||
ghostscript | ||
graphviz | ||
libjpeg | ||
libpng | ||
libtiff | ||
libX11 | ||
libxml2 | ||
zlib | ||
libtool | ||
libwebp | ||
]; | ||
|
||
nativeBuildInputs = [ xz ] | ||
++ lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames; | ||
|
||
postInstall = '' | ||
sed -i 's/-ltiff.*'\'/\'/ $out/bin/* | ||
moveToOutput "PerlMagick" "$dev" # why not doing anything? | ||
mv "PerlMagick" "$dev" | ||
#moveToOutput "magick" "$dev" # why not doing anything? | ||
#mv "magick/*" "$dev/include/GraphicsMagick/" | ||
moveToOutput "bin/*-config" "$dev" | ||
moveToOutput "lib/libGraphicsMagick.so.*" "$dev" # includes configure params | ||
moveToOutput "lib/GraphicsMagick-*/config*" "$dev" # includes configure params | ||
''; | ||
|
||
meta = { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
{ lib, stdenv, fetchFromGitHub, makeWrapper, perlPackages, PerlGMagick, DBFile, FileMimeInfo, FileBaseDir, FileTemp, MIMEBase64, PodUsage }: | ||
|
||
stdenv.mkDerivation rec { | ||
pname = "findimagedupes"; | ||
version = "2.19.1"; | ||
|
||
src = fetchFromGitHub { | ||
owner = "jhnc"; | ||
repo = "${pname}"; | ||
rev = "${version}"; | ||
sha256 = "19hchaxzzq7kwrcnm3m2zyigq38kdc9l0jp6pz6cm9hfxna58518"; | ||
}; | ||
|
||
nativeBuildInputs = with perlPackages; [ makeWrapper PodMarkdown ]; | ||
|
||
propagatedBuildInputs = with perlPackages; [ perl ]; | ||
|
||
preBuild = '' | ||
sed -i -e "s:DIRECTORY => '/usr/local/lib/findimagedupes':DIRECTORY => '/tmp':" findimagedupes | ||
''; | ||
|
||
buildPhase = " | ||
pod2man findimagedupes > findimagedupes.1 | ||
"; | ||
|
||
installPhase = '' | ||
install -D -m 755 findimagedupes $out/bin/findimagedupes | ||
wrapProgram $out/bin/findimagedupes --set PERL5LIB ${with perlPackages; makeFullPerlPath [ DBFile FileMimeInfo FileBaseDir FileTemp MIMEBase64 PerlGMagick PodUsage ]} | ||
install -D -m 644 findimagedupes.1 $out/share/man/man1/findimagedupes.1 | ||
''; | ||
|
||
meta = with lib; { | ||
homepage = "http://www.jhnc.org/findimagedupes/"; | ||
description = "Finds visually similar or duplicate images"; | ||
license = licenses.gpl3; | ||
maintainers = with maintainers; [ stunkymonkey dschrempf ]; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The ghost script flag is not anymore supported and should be removed.
See release notes of 1.3.31 (November 17, 2018).