Merge: zmap: 4.2.0 -> 4.3.1 (#364578)
[NixPkgs.git] / pkgs / development / libraries / aribb25 / default.nix
blob2a0601a8875edc7778e8bd2a42a2d62d469cc15a
2   stdenv,
3   lib,
4   fetchFromGitLab,
5   fetchpatch,
6   autoreconfHook,
7   pkg-config,
8   pcsclite,
9   PCSC,
12 stdenv.mkDerivation rec {
13   pname = "aribb25";
14   # FIXME: change the rev for fetchFromGitLab in next release
15   version = "0.2.7";
17   src = fetchFromGitLab {
18     domain = "code.videolan.org";
19     owner = "videolan";
20     repo = pname;
21     # rev = version; FIXME: uncomment in next release
22     rev = "c14938692b313b5ba953543fd94fd1cad0eeef18"; # 0.2.7 with build fixes
23     sha256 = "1kb9crfqib0npiyjk4zb63zqlzbhqm35nz8nafsvdjd71qbd2amp";
24   };
26   nativeBuildInputs = [
27     autoreconfHook
28     pkg-config
29   ];
31   buildInputs =
32     lib.optionals stdenv.hostPlatform.isDarwin [ PCSC ]
33     ++ lib.optionals stdenv.hostPlatform.isLinux [ pcsclite ];
35   env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang "-Wno-deprecated-non-prototype";
37   patches =
38     let
39       url = commit: "https://code.videolan.org/videolan/${pname}/-/commit/${commit}.diff";
40     in
41     [
42       (fetchpatch {
43         name = "make-cli-pipes-work-1.patch";
44         url = url "0425184dbf3fdaf59854af5f530da88b2196a57b";
45         sha256 = "0ysm2jivpnqxz71vw1102616qxww2gx005i0c5lhi6jbajqsa1cd";
46       })
47       (fetchpatch {
48         name = "make-cli-pipes-work-2.patch";
49         url = url "cebabeab2bda065dca1c9f033b42d391be866d86";
50         sha256 = "1283kqv1r4rbaba0sv2hphkhcxgjkmh8ndlcd24fhx43nn63hd28";
51       })
52     ];
54   meta = with lib; {
55     description = "Sample implementation of the ARIB STD-B25 standard";
56     homepage = "https://code.videolan.org/videolan/aribb25";
57     license = licenses.isc;
58     maintainers = with maintainers; [ midchildan ];
59     mainProgram = "b25";
60     platforms = platforms.all;
61   };