2016-08-26 15:07:54 +02:00
|
|
|
{stdenv, fetchgit, SDL_gfx, SDL, libjpeg, libpng, pkgconfig}:
|
2014-11-27 21:20:09 +01:00
|
|
|
let
|
|
|
|
s =
|
|
|
|
rec {
|
2016-08-26 15:07:54 +02:00
|
|
|
date = "2016-08-16";
|
2014-11-27 21:20:09 +01:00
|
|
|
version = "git-${date}";
|
|
|
|
baseName = "quirc";
|
|
|
|
name = "${baseName}-${version}";
|
|
|
|
url = "https://github.com/dlbeer/quirc";
|
2016-08-26 15:07:54 +02:00
|
|
|
rev = "5b262480091d5f84a67a4a56c728fc8b39844339";
|
|
|
|
sha256 = "1w5qvjafn14s6jjs7kiwsqirlsqbgv0p152hrsq463pm34hp0lzy";
|
2014-11-27 21:20:09 +01:00
|
|
|
};
|
|
|
|
buildInputs = [
|
2016-08-26 15:07:54 +02:00
|
|
|
SDL SDL_gfx libjpeg pkgconfig libpng
|
2014-11-27 21:20:09 +01:00
|
|
|
];
|
|
|
|
in
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
inherit (s) name version;
|
|
|
|
inherit buildInputs;
|
|
|
|
src = fetchgit {
|
|
|
|
inherit (s) url sha256 rev;
|
|
|
|
};
|
2016-08-26 15:07:54 +02:00
|
|
|
NIX_CFLAGS_COMPILE="-I${SDL.dev}/include/SDL -I${SDL_gfx}/include/SDL";
|
2014-11-27 21:20:09 +01:00
|
|
|
configurePhase = ''
|
|
|
|
sed -e 's/-[og] root//g' -i Makefile
|
|
|
|
'';
|
|
|
|
preInstall = ''
|
|
|
|
mkdir -p "$out"/{bin,lib,include}
|
2015-09-06 10:21:43 +02:00
|
|
|
find . -maxdepth 1 -type f -perm -0100 -exec cp '{}' "$out"/bin ';'
|
2014-11-27 21:20:09 +01: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;
|
|
|
|
};
|
|
|
|
}
|