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