Author: viric
Date: Tue May 22 14:30:12 2012
New Revision: 34208
URL: https://nixos.org/websvn/nix/?rev=34208&sc=1

Log:
Updating libv4l (part of v4l-utils). I moved v4l-utils to stdenv.mkDerivation 
style,
and it's used to build either libv4l or the utils (with qt4).

Deleted:
   nixpkgs/trunk/pkgs/development/libraries/libv4l/
Modified:
   nixpkgs/trunk/pkgs/os-specific/linux/v4l-utils/default.nix
   nixpkgs/trunk/pkgs/top-level/all-packages.nix

Modified: nixpkgs/trunk/pkgs/os-specific/linux/v4l-utils/default.nix
==============================================================================
--- nixpkgs/trunk/pkgs/os-specific/linux/v4l-utils/default.nix  Tue May 22 
12:31:31 2012        (r34207)
+++ nixpkgs/trunk/pkgs/os-specific/linux/v4l-utils/default.nix  Tue May 22 
14:30:12 2012        (r34208)
@@ -1,50 +1,34 @@
-x@{builderDefsPackage
-  , libv4l, libjpeg, qt4
-  , ...}:
-builderDefsPackage
-(a :  
-let 
-  helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++ 
-    [];
-
-  buildInputs = map (n: builtins.getAttr n x)
-    (builtins.attrNames (builtins.removeAttrs x helperArgNames));
-  sourceInfo = rec {
-    baseName="v4l-utils";
-    version="0.8.5";
-    name="${baseName}-${version}";
-    url="http://www.linuxtv.org/downloads/v4l-utils/${name}.tar.bz2";;
-    hash="0k2rkra8lyimj6bwm8khq6xrhjdy67d09blxa6brnj7kpa7q81f2";
-  };
-in
-rec {
-  src = a.fetchurl {
-    url = sourceInfo.url;
-    sha256 = sourceInfo.hash;
+{stdenv, fetchurl, which, libjpeg
+, withQt4 ? false, qt4 ? null}:
+
+assert withQt4 -> qt4 != null;
+
+stdenv.mkDerivation rec {
+  name = "v4l-utils-0.8.8";
+
+  src = fetchurl {
+    url = "http://linuxtv.org/downloads/v4l-utils/${name}.tar.bz2";;
+    sha256 = "0zx8f1npsl6g5vjah1gwydg1j5azl74kr83ifbjhshgmnvscd92z";
   };
 
-  inherit (sourceInfo) name version;
-  inherit buildInputs;
+  buildInputs = [ libjpeg which ] ++ stdenv.lib.optional withQt4 qt4;
 
-  /* doConfigure should be removed if not needed */
-  phaseNames = ["doUnpack" "doMakeInstall"];
+  # The keytable wants to touch /etc files and udev scripts in /lib.
+  # I skip it.
+  patchPhase = ''
+    sed -i s/keytable// utils/Makefile
+  '';
+
+  installPhase = ''
+    make PREFIX=$out install
+  '';
 
-  makeFlags = [''PREFIX="" DESTDIR="$out"''];
-      
   meta = {
-    description = "Video-4-Linux utilities";
-    maintainers = with a.lib.maintainers;
-    [
-      raskin
-    ];
-    platforms = with a.lib.platforms;
-      linux;
-    license = a.lib.licenses.gpl2;
-  };
-  passthru = {
-    updateInfo = {
-      downloadPage = "http://www.linuxtv.org/downloads/v4l-utils/";;
-    };
+    homepage = http://linuxtv.org/projects.php;
+    description = "V4L utils and libv4l, that provides common image formats 
regardless of the v4l device";
+    # (The libs are of LGPLv2.1+, some other pieces are GPL)
+    license = "free";
+    maintainers = with stdenv.lib.maintainers; [viric];
+    platforms = with stdenv.lib.platforms; linux;
   };
-}) x
-
+}

Modified: nixpkgs/trunk/pkgs/top-level/all-packages.nix
==============================================================================
--- nixpkgs/trunk/pkgs/top-level/all-packages.nix       Tue May 22 12:31:31 
2012        (r34207)
+++ nixpkgs/trunk/pkgs/top-level/all-packages.nix       Tue May 22 14:30:12 
2012        (r34208)
@@ -4184,7 +4184,9 @@
 
   libunwind = callPackage ../development/libraries/libunwind { };
 
-  libv4l = callPackage ../development/libraries/libv4l { };
+  libv4l = v4l_utils.override {
+    withQt4 = false;
+  };
 
   libva = callPackage ../development/libraries/libva { };
 
@@ -6025,7 +6027,9 @@
     inherit ncurses perl;
   };
 
-  v4l_utils = callPackage ../os-specific/linux/v4l-utils {};
+  v4l_utils = callPackage ../os-specific/linux/v4l-utils {
+    withQt4 = true;
+  };
 
   windows = rec {
     w32api = callPackage ../os-specific/windows/w32api {
_______________________________________________
nix-commits mailing list
[email protected]
http://lists.science.uu.nl/mailman/listinfo/nix-commits

Reply via email to