Skip to content

Instantly share code, notes, and snippets.

@LnL7
Created May 18, 2017 18:34
Show Gist options
  • Save LnL7/8b3e2d62ca9ec348645571774a27ad98 to your computer and use it in GitHub Desktop.
Save LnL7/8b3e2d62ca9ec348645571774a27ad98 to your computer and use it in GitHub Desktop.
imagemagic version wrapper
{ pkgs ? import <nixpkgs> {} }:
let
inherit (pkgs) stdenv writeScriptBin;
in
writeScriptBin "convert" ''
#! ${stdenv.shell}
if test "$1" == "2"; then
${pkgs.imagemagick7}/bin/convert --version
else
${pkgs.imagemagick}/bin/convert --version
fi
''
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment