2014-11-27 23:20:09 +03:00
|
|
|
{stdenv, fetchgit, SDL_gfx, SDL, libjpeg, pkgconfig}:
|
|
|
|
let
|
|
|
|
s =
|
|
|
|
rec {
|
|
|
|
date = "2014-11-01";
|
|
|
|
version = "git-${date}";
|
|
|
|
baseName = "quirc";
|
|
|
|
name = "${baseName}-${version}";
|
|
|
|
url = "https://github.com/dlbeer/quirc";
|
|
|
|
rev = "3a3df0d1d6adc59fdc2cadecfaed91650b84cacb";
|
2016-06-02 14:26:44 +03:00
|
|
|
sha256 = "1r7jzxl4j93dmky8p5szpcxq7i5f7p1kfrklnzhazlizjc7a2844";
|
2014-11-27 23:20:09 +03:00
|
|
|
};
|
|
|
|
buildInputs = [
|
|
|
|
SDL SDL_gfx libjpeg pkgconfig
|
|
|
|
];
|
|
|
|
in
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
inherit (s) name version;
|
|
|
|
inherit buildInputs;
|
|
|
|
src = fetchgit {
|
|
|
|
inherit (s) url sha256 rev;
|
|
|
|
};
|
2015-10-11 17:21:43 +03:00
|
|
|
NIX_CFLAGS_COMPILE="-I${SDL.dev}/include/SDL";
|
2014-11-27 23:20:09 +03:00
|
|
|
configurePhase = ''
|
|
|
|
sed -e 's/-[og] root//g' -i Makefile
|
|
|
|
'';
|
|
|
|
preInstall = ''
|
|
|
|
mkdir -p "$out"/{bin,lib,include}
|
2015-09-06 11:21:43 +03:00
|
|
|
find . -maxdepth 1 -type f -perm -0100 -exec cp '{}' "$out"/bin ';'
|
2014-11-27 23:20:09 +03:00
|
|
|
'';
|
|
|
|
makeFlags = "PREFIX=$(out)";
|
|
|
|
meta = {
|
|
|
|
inherit (s) version;
|
|
|
|
description = ''A small QR code decoding library'';
|
|
|
|
license = stdenv.lib.licenses.isc;
|
|
|
|
maintainers = [stdenv.lib.maintainers.raskin];
|
|
|
|
platforms = stdenv.lib.platforms.linux;
|
|
|
|
};
|
|
|
|
}
|