1{
2 lib,
3 stdenv,
4 fetchurl,
5 popt,
6}:
7
8stdenv.mkDerivation rec {
9 pname = "libdv";
10 version = "1.0.0";
11
12 src = fetchurl {
13 url = "mirror://sourceforge/libdv/libdv-${version}.tar.gz";
14 sha256 = "1fl96f2xh2slkv1i1ix7kqk576a0ak1d33cylm0mbhm96d0761d3";
15 };
16
17 # Disable priority scheduling on Darwin because it doesn’t support sched_setscheduler.
18 postPatch = lib.optionalString stdenv.hostPlatform.isDarwin ''
19 substituteInPlace encodedv/dvconnect.c \
20 --replace '#ifdef _SC_PRIORITY_SCHEDULING' '#if 0'
21 '';
22
23 configureFlags = [
24 "--disable-asm"
25 "--disable-sdl"
26 "--disable-gtk"
27 "--disable-xv"
28 "--disable-gprof"
29 ];
30
31 buildInputs = [ popt ];
32
33 meta = with lib; {
34 description = "Software decoder for DV format video, as defined by the IEC 61834 and SMPTE 314M standards";
35 homepage = "https://sourceforge.net/projects/libdv/";
36 license = licenses.lgpl21Plus;
37 platforms = platforms.unix;
38 };
39}