about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/libdv
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/libdv')
-rw-r--r--nixpkgs/pkgs/development/libraries/libdv/default.nix34
1 files changed, 34 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/libdv/default.nix b/nixpkgs/pkgs/development/libraries/libdv/default.nix
new file mode 100644
index 000000000000..49c2ab1bdfa7
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libdv/default.nix
@@ -0,0 +1,34 @@
+{ lib, stdenv, fetchurl, popt }:
+
+stdenv.mkDerivation rec {
+  pname = "libdv";
+  version = "1.0.0";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/libdv/libdv-${version}.tar.gz";
+    sha256 = "1fl96f2xh2slkv1i1ix7kqk576a0ak1d33cylm0mbhm96d0761d3";
+  };
+
+  # Disable priority scheduling on Darwin because it doesn’t support sched_setscheduler.
+  postPatch = lib.optionalString stdenv.isDarwin ''
+    substituteInPlace encodedv/dvconnect.c \
+      --replace '#ifdef _SC_PRIORITY_SCHEDULING' '#if 0'
+  '';
+
+  configureFlags = [
+    "--disable-asm"
+    "--disable-sdl"
+    "--disable-gtk"
+    "--disable-xv"
+    "--disable-gprof"
+  ];
+
+  buildInputs = [ popt ];
+
+  meta = with lib; {
+    description = "Software decoder for DV format video, as defined by the IEC 61834 and SMPTE 314M standards";
+    homepage = "https://sourceforge.net/projects/libdv/";
+    license = licenses.lgpl21Plus;
+    platforms = platforms.unix;
+  };
+}