mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-21 13:44:50 +00:00
40 lines
1.1 KiB
Nix
40 lines
1.1 KiB
Nix
{stdenv, fetchgit, SDL_gfx, SDL, libjpeg, libpng, pkgconfig}:
|
|
let
|
|
s =
|
|
rec {
|
|
date = "2016-08-16";
|
|
version = "git-${date}";
|
|
baseName = "quirc";
|
|
name = "${baseName}-${version}";
|
|
url = "https://github.com/dlbeer/quirc";
|
|
rev = "5b262480091d5f84a67a4a56c728fc8b39844339";
|
|
sha256 = "1w5qvjafn14s6jjs7kiwsqirlsqbgv0p152hrsq463pm34hp0lzy";
|
|
};
|
|
in
|
|
stdenv.mkDerivation {
|
|
inherit (s) name version;
|
|
nativeBuildInputs = [ pkgconfig ];
|
|
buildInputs = [
|
|
SDL SDL_gfx libjpeg libpng
|
|
];
|
|
src = fetchgit {
|
|
inherit (s) url sha256 rev;
|
|
};
|
|
NIX_CFLAGS_COMPILE="-I${SDL.dev}/include/SDL -I${SDL_gfx}/include/SDL";
|
|
configurePhase = ''
|
|
sed -e 's/-[og] root//g' -i Makefile
|
|
'';
|
|
preInstall = ''
|
|
mkdir -p "$out"/{bin,lib,include}
|
|
find . -maxdepth 1 -type f -perm -0100 -exec cp '{}' "$out"/bin ';'
|
|
'';
|
|
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;
|
|
};
|
|
}
|