biome: 1.9.2 -> 1.9.3
[NixPkgs.git] / pkgs / tools / video / tsduck / default.nix
blob0da53e2e96ea9de5d3ea73d00f86ca39e400f4ed
1 { lib
2 , stdenv
3 , fetchFromGitHub
4 , curl
5 , jdk
6 , libedit
7 , srt
8 }:
10 stdenv.mkDerivation rec {
11   pname = "tsduck";
12   version = "3.31-2761";
14   src = fetchFromGitHub {
15     owner = "tsduck";
16     repo = pname;
17     rev = "v${version}";
18     sha256 = "sha256-268TKCh3naebbw+sOQ6d4N/zl7UEVtc3l3flFAYHDU4=";
19   };
21   buildInputs = [
22     curl
23     libedit
24     srt
25     jdk
26   ];
28   # remove tests which call out to https://tsduck.io/download/test/...
29   postPatch = ''
30     sed -i"" \
31       -e '/TSUNIT_TEST(testMasterPlaylist);/ d' \
32       -e '/TSUNIT_TEST(testMasterPlaylistWithAlternate);/ d' \
33       -e '/TSUNIT_TEST(testMediaPlaylist);/ d' \
34       src/utest/utestHLS.cpp
36     sed -i"" \
37       -e '/TSUNIT_TEST(testBetterSystemRandomGenerator);/ d' \
38       src/utest/utestSystemRandomGenerator.cpp
40     sed -i"" \
41       -e '/TSUNIT_ASSERT(request.downloadBinaryContent/ d' \
42       -e '/TSUNIT_ASSERT(!request.downloadBinaryContent/ d' \
43       -e '/TSUNIT_TEST(testGitHub);/ d' \
44       -e '/TSUNIT_TEST(testGoogle);/ d' \
45       -e '/TSUNIT_TEST(testNoRedirection);/ d' \
46       -e '/TSUNIT_TEST(testReadMeFile);/ d' \
47       src/utest/utestWebRequest.cpp
49     sed -i"" \
50       -e '/TSUNIT_TEST(testHomeDirectory);/ d' \
51       src/utest/utestSysUtils.cpp
53     sed -i"" \
54       -e '/TSUNIT_TEST(testIPv4Address);/ d' \
55       -e '/TSUNIT_TEST(testIPv4AddressConstructors);/ d' \
56       -e '/TSUNIT_TEST(testIPv4SocketAddressConstructors);/ d' \
57       -e '/TSUNIT_TEST(testTCPSocket);/ d' \
58       -e '/TSUNIT_TEST(testUDPSocket);/ d' \
59       src/utest/utestNetworking.cpp
60   '';
62   enableParallelBuilding = true;
63   makeFlags = [
64     "NODEKTEC=1"
65     "NOHIDES=1"
66     "NOPCSC=1"
67     "NORIST=1"
68     "NOVATEK=1"
69   ] ++ installFlags;
71   checkTarget = "test";
72   doCheck = true;
74   installFlags = [
75     "SYSROOT=${placeholder "out"}"
76     "SYSPREFIX=/"
77     "USRLIBDIR=/lib"
78   ];
79   installTargets = [
80     "install-tools"
81     "install-devel"
82   ];
84   meta = with lib; {
85     description = "MPEG Transport Stream Toolkit";
86     homepage    = "https://github.com/tsduck/tsduck";
87     license     = licenses.bsd2;
88     maintainers = with maintainers; [ siriobalmelli ];
89     platforms   = platforms.all;
90     # never built on aarch64-darwin, x86_64-darwin since first introduction in nixpkgs
91     broken = stdenv.hostPlatform.isDarwin;
92   };