4 , subproject ? "library" # one of "library", "reader" or "writer"
11 subdir = lib.getAttr subproject {
12 "library" = "jabcode";
13 "reader" = "jabcodeReader";
14 "writer" = "jabcodeWriter";
17 stdenv.mkDerivation rec {
18 pname = "jabcode-${subproject}";
19 version = "unstable-2021-02-16";
20 src = fetchFromGitHub {
23 rev = "e342b647525fa294127930d836b54a6b21957cdc";
24 sha256 = "04ngw5aa43q7kxfn1v8drmir2i2qakvq0ni0lgf0zw8150mww52x";
28 [ zlib libpng libtiff ]
29 ++ lib.optionals (subproject != "library") [ jabcode ];
31 preConfigure = "cd src/${subdir}";
34 if subproject == "library" then ''
43 description = "A high-capacity 2D color bar code (${subproject})";
44 longDescription = "JAB Code (Just Another Bar Code) is a high-capacity 2D color bar code, which can encode more data than traditional black/white (QR) codes. This is the ${subproject} part.";
45 homepage = "https://jabcode.org/";
46 license = licenses.lgpl21;
47 maintainers = [ maintainers.xaverdh ];
48 platforms = platforms.unix;
49 broken = stdenv.isDarwin; # never built on Hydra https://hydra.nixos.org/job/nixpkgs/trunk/jabcode.x86_64-darwin