Skip to content

Instantly share code, notes, and snippets.

@vcunat
Created July 26, 2016 18:20
Show Gist options
  • Save vcunat/f7ebf5cd796e1d54fd13b45c8cb9c352 to your computer and use it in GitHub Desktop.
Save vcunat/f7ebf5cd796e1d54fd13b45c8cb9c352 to your computer and use it in GitHub Desktop.
Zbar: nix expression for linux->mingw cross-compilation, both 32 and 64-bit.
{stdenv, fetchurl, pkgconfig, xmlto, imagemagick, libiconv}:
stdenv.mkDerivation rec {
name = "zbar-0-10";
src = fetchurl {
url = http://downloads.sourceforge.net/project/zbar/zbar/0.10/zbar-0.10.tar.bz2;
sha256 = "1imdvf5k34g1x2zr6975basczkz3zdxg6xnci50yyp5yvcwznki3";
};
nativeBuildInputs = [pkgconfig];
buildInputs = [imagemagick libiconv];
configureFlags = [
"--disable-video"
"--without-gtk"
"--without-qt"
"--without-x"
"--without-python"
#"--without-imagemagick"
"--enable-pthread=no"
"--enable-shared=no"
#"CFLAGS=-DNDEBUG"
]
++ stdenv.lib.optional (stdenv.cross.libc or null == "msvcrt") "--without-jpeg"
;
#doCheck = true;
meta = {
homepage = http://zbar.sourceforge.net/;
description = "ZBar bar code reader";
#license = stdenv.lib.licenses.lgpl2-1;
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment