tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
quirc: 2016-08-16 -> 2020-04-06
rnhmjoj
4 years ago
4dfcc530
326f86d8
+28
-24
1 changed file
expand all
collapse all
unified
split
pkgs
tools
graphics
quirc
default.nix
+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
14
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;
0
22
};
23
-
NIX_CFLAGS_COMPILE="-I${SDL.dev}/include/SDL -I${SDL_gfx}/include/SDL";
0
0
0
0
0
0
24
configurePhase = ''
0
0
0
25
sed -e 's/-[og] root//g' -i Makefile
0
0
26
'';
27
preInstall = ''
28
mkdir -p "$out"/{bin,lib,include}
29
-
find . -maxdepth 1 -type f -perm -0100 -exec cp '{}' "$out"/bin ';'
0
0
30
'';
31
-
makeFlags = [ "PREFIX=$(out)" ];
32
meta = {
33
-
inherit (s) version;
34
description = "A small QR code decoding library";
35
license = lib.licenses.isc;
36
maintainers = [lib.maintainers.raskin];
···
1
+
{ lib, stdenv, fetchFromGitHub
2
+
, SDL_gfx, SDL, libjpeg, libpng, pkg-config
3
+
}:
4
+
0
0
0
0
0
0
0
0
0
5
stdenv.mkDerivation {
6
+
pname = "quirc";
7
+
version = "2020-04-16";
8
+
9
+
src = fetchFromGitHub {
10
+
owner = "dlbeer";
11
+
repo = "quirc";
12
+
rev = "ed455904f35270888bc902b9e8c0c9b3184a8302";
13
+
sha256 = "1kqqvcnxcaxdgls9sibw5pqjz3g1gys2v64i4kfqp8wfcgd9771q";
14
};
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
+
22
configurePhase = ''
23
+
runHook preConfigure
24
+
25
+
# don't try to change ownership
26
sed -e 's/-[og] root//g' -i Makefile
27
+
28
+
runHook postConfigure
29
'';
30
preInstall = ''
31
mkdir -p "$out"/{bin,lib,include}
32
+
33
+
# install all binaries
34
+
find -maxdepth 1 -type f -executable ! -name '*.so.*' | xargs cp -t "$out"/bin
35
'';
36
+
37
meta = {
0
38
description = "A small QR code decoding library";
39
license = lib.licenses.isc;
40
maintainers = [lib.maintainers.raskin];