quirc: 2016-08-16 -> 2020-04-06

rnhmjoj 4dfcc530 326f86d8

+28 -24
+28 -24
pkgs/tools/graphics/quirc/default.nix
··· 1 - {lib, stdenv, fetchgit, SDL_gfx, SDL, libjpeg, libpng, pkg-config}: 2 - let 3 - s = 4 - rec { 5 - date = "2016-08-16"; 6 - version = "git-${date}"; 7 - baseName = "quirc"; 8 - name = "${baseName}-${version}"; 9 - url = "https://github.com/dlbeer/quirc"; 10 - rev = "5b262480091d5f84a67a4a56c728fc8b39844339"; 11 - sha256 = "1w5qvjafn14s6jjs7kiwsqirlsqbgv0p152hrsq463pm34hp0lzy"; 12 - }; 13 - in 1 + { lib, stdenv, fetchFromGitHub 2 + , SDL_gfx, SDL, libjpeg, libpng, pkg-config 3 + }: 4 + 14 5 stdenv.mkDerivation { 15 - inherit (s) name version; 16 - nativeBuildInputs = [ pkg-config ]; 17 - buildInputs = [ 18 - SDL SDL_gfx libjpeg libpng 19 - ]; 20 - src = fetchgit { 21 - inherit (s) url sha256 rev; 6 + pname = "quirc"; 7 + version = "2020-04-16"; 8 + 9 + src = fetchFromGitHub { 10 + owner = "dlbeer"; 11 + repo = "quirc"; 12 + rev = "ed455904f35270888bc902b9e8c0c9b3184a8302"; 13 + sha256 = "1kqqvcnxcaxdgls9sibw5pqjz3g1gys2v64i4kfqp8wfcgd9771q"; 22 14 }; 23 - NIX_CFLAGS_COMPILE="-I${SDL.dev}/include/SDL -I${SDL_gfx}/include/SDL"; 15 + 16 + nativeBuildInputs = [ pkg-config ]; 17 + buildInputs = [ SDL SDL_gfx libjpeg libpng ]; 18 + 19 + makeFlags = [ "PREFIX=$(out)" ]; 20 + NIX_CFLAGS_COMPILE = "-I${SDL.dev}/include/SDL -I${SDL_gfx}/include/SDL"; 21 + 24 22 configurePhase = '' 23 + runHook preConfigure 24 + 25 + # don't try to change ownership 25 26 sed -e 's/-[og] root//g' -i Makefile 27 + 28 + runHook postConfigure 26 29 ''; 27 30 preInstall = '' 28 31 mkdir -p "$out"/{bin,lib,include} 29 - find . -maxdepth 1 -type f -perm -0100 -exec cp '{}' "$out"/bin ';' 32 + 33 + # install all binaries 34 + find -maxdepth 1 -type f -executable ! -name '*.so.*' | xargs cp -t "$out"/bin 30 35 ''; 31 - makeFlags = [ "PREFIX=$(out)" ]; 36 + 32 37 meta = { 33 - inherit (s) version; 34 38 description = "A small QR code decoding library"; 35 39 license = lib.licenses.isc; 36 40 maintainers = [lib.maintainers.raskin];