summary refs log tree commit diff
path: root/pkgs/development/libraries/libdv/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/libraries/libdv/default.nix')
-rw-r--r--pkgs/development/libraries/libdv/default.nix37
1 files changed, 20 insertions, 17 deletions
diff --git a/pkgs/development/libraries/libdv/default.nix b/pkgs/development/libraries/libdv/default.nix
index 3213c0634ba..e8c374297d3 100644
--- a/pkgs/development/libraries/libdv/default.nix
+++ b/pkgs/development/libraries/libdv/default.nix
@@ -1,28 +1,31 @@
-{ composableDerivation, fetchurl }:
-
-let inherit (composableDerivation) edf; in
-
-composableDerivation.composableDerivation {} {
-
-  flags = { }
-    # TODO! implement flags
-    # I want to get kino and cinelerra working. That's why I don't spend more time on this now
-    // edf { name = "libtool_lock"; } #avoid locking (might break parallel builds)
-    // edf { name ="asm"; } #disable use of architecture specific assembly code
-    // edf { name ="sdl"; } #enable use of SDL for display
-    // edf { name ="gtk"; } #disable use of gtk for display
-    // edf { name ="xv"; } #disable use of XVideo extension for display
-    // edf { name ="gprof"; }; #enable compiler options for gprof profiling
+{ stdenv, fetchurl, popt }:
 
+stdenv.mkDerivation rec {
   name = "libdv-1.0.0";
 
   src = fetchurl {
-    url = mirror://sourceforge/libdv/libdv-1.0.0.tar.gz;
+    url = "mirror://sourceforge/libdv/${name}.tar.gz";
     sha256 = "1fl96f2xh2slkv1i1ix7kqk576a0ak1d33cylm0mbhm96d0761d3";
   };
 
-  meta = {
+  # This fixes an undefined symbol: _sched_setscheduler error on compile.
+  # See the apple docs: http://cl.ly/2HeF bottom of the "Finding Imported Symbols" section
+  LDFLAGS = stdenv.lib.optionalString stdenv.isDarwin "-undefined dynamic_lookup";
+
+  configureFlags = [
+    "--disable-asm"
+    "--disable-sdl"
+    "--disable-gtk"
+    "--disable-xv"
+    "--disable-gprof"
+  ];
+
+  buildInputs = [ popt ];
+
+  meta = with stdenv.lib; {
     description = "Software decoder for DV format video, as defined by the IEC 61834 and SMPTE 314M standards";
     homepage = http://sourceforge.net/projects/libdv/;
+    license = licenses.lgpl21Plus;
+    platforms = platforms.unix;
   };
 }