-
-
Save cleverca22/5b916fb9ef58b220e7b9ce4b2796767b to your computer and use it in GitHub Desktop.
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
let | |
rawfunc = import <nixpkgs>; | |
in | |
with rawfunc {}; | |
rec { | |
imagemagick1 = pkgs.callPackage ./imagemagick-old.nix { }; | |
imagemagick2 = pkgs.callPackage ./imagemagick-new.nix { }; | |
env1 = pkgs.runCommand "env1" { buildInputs = [ imagemagick1 ]; } "exit 1"; | |
env2 = pkgs.runCommand "env2" { buildInputs = [ imagemagick2 ]; } "exit 1"; | |
yourscript = pkgs.substituteAll { src = ./yourscript.sh; inherit imagemagick1 imagemagick2; }; | |
} |
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
{ stdenv, fetchurl, python, pkgconfig, zlib, glib, flex, bison, makeStaticLibraries, glibc, libtool, bzip2, libX11, libXext, libXt, fontconfig, freetype, ghostscript, libjpeg, lcms2, openexr, libpng, lib\ | |
rsvg, libtiff, libxml2, openjpeg, libwebp }: | |
let | |
cfg = { | |
version = "6.9.4-10"; | |
sha256 = "a2c981ea80de0ed95135591d0e504a2427187594a5cb2342474f50d97e626a2d"; | |
}; | |
in | |
stdenv.mkDerivation rec { | |
name = "imagemagicknew"; | |
buildInputs = [ python pkgconfig zlib.static myglib flex bison glibc.static zlib fontconfig freetype ghostscript libpng libtiff libxml2 ]; | |
inherit (cfg) version; | |
src = fetchurl { | |
urls = [ | |
"mirror://imagemagick/releases/ImageMagick-${version}.tar.xz" | |
# the original source above removes tarballs quickly | |
"http://distfiles.macports.org/ImageMagick/ImageMagick-${version}.tar.xz" | |
"https://bintray.com/homebrew/mirror/download_file?file_path=imagemagick-${version}.tar.xz" | |
]; | |
sha256 = "a2c981ea80de0ed95135591d0e504a2427187594a5cb2342474f50d97e626a2d"; | |
}; | |
} | |
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
{ stdenv, fetchurl, python, pkgconfig, zlib, glib, flex, bison, makeStaticLibraries, glibc, libtool, bzip2, libX11, libXext, libXt, fontconfig, freetype, ghostscript, libjpeg, lcms2, openexr, libpng, lib\ | |
rsvg, libtiff, libxml2, openjpeg, libwebp }: | |
let | |
cfg = { | |
version = "6.9.3-10"; | |
sha256 = "e33f021c879f31703f9e620f578ccf7d221a34941589da4bbe967b16a814336a"; | |
}; | |
in | |
stdenv.mkDerivation rec { | |
name = "imagemagickold"; | |
buildInputs = [ python pkgconfig zlib.static myglib flex bison glibc.static zlib fontconfig freetype ghostscript libpng libtiff libxml2 ]; | |
inherit (cfg) version; | |
src = fetchurl { | |
urls = [ | |
"mirror://imagemagick/releases/ImageMagick-${version}.tar.xz" | |
# the original source above removes tarballs quickly | |
"http://distfiles.macports.org/ImageMagick/ImageMagick-${version}.tar.xz" | |
"https://bintray.com/homebrew/mirror/download_file?file_path=imagemagick-${version}.tar.xz" | |
]; | |
sha256 = "e33f021c879f31703f9e620f578ccf7d221a34941589da4bbe967b16a814336a"; | |
}; | |
} |
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
#!/bin/sh | |
if [ "$version" == "2.0.0" ]; then | |
base=@imagemagick1@ | |
else | |
base=@imagemagick2@ | |
fi | |
$base/bin/convert --version |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment