summary refs log tree commit diff
path: root/pkgs/development/libraries/unicap
diff options
context:
space:
mode:
authorMichael Raskin <7c6f434c@mail.ru>2010-10-14 10:10:45 +0000
committerMichael Raskin <7c6f434c@mail.ru>2010-10-14 10:10:45 +0000
commit494ba6a8132d9300b9bb3154709be0f8960622f0 (patch)
treedfc3c13df0ec69579f8393aa7d45a34aa20c7a24 /pkgs/development/libraries/unicap
parent1bda7748da5c737d33434fcbad9dd1160db70a89 (diff)
downloadnixpkgs-494ba6a8132d9300b9bb3154709be0f8960622f0.tar
nixpkgs-494ba6a8132d9300b9bb3154709be0f8960622f0.tar.gz
nixpkgs-494ba6a8132d9300b9bb3154709be0f8960622f0.tar.bz2
nixpkgs-494ba6a8132d9300b9bb3154709be0f8960622f0.tar.lz
nixpkgs-494ba6a8132d9300b9bb3154709be0f8960622f0.tar.xz
nixpkgs-494ba6a8132d9300b9bb3154709be0f8960622f0.tar.zst
nixpkgs-494ba6a8132d9300b9bb3154709be0f8960622f0.zip
Add unicap
svn path=/nixpkgs/trunk/; revision=24271
Diffstat (limited to 'pkgs/development/libraries/unicap')
-rw-r--r--pkgs/development/libraries/unicap/default.nix55
1 files changed, 55 insertions, 0 deletions
diff --git a/pkgs/development/libraries/unicap/default.nix b/pkgs/development/libraries/unicap/default.nix
new file mode 100644
index 00000000000..7a64017ca8b
--- /dev/null
+++ b/pkgs/development/libraries/unicap/default.nix
@@ -0,0 +1,55 @@
+x@{builderDefsPackage
+  , libusb, libraw1394, dcraw, intltool, perl
+  , ...}:
+builderDefsPackage
+(a :  
+let 
+  helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++ 
+    [];
+
+  buildInputs = map (n: builtins.getAttr n x)
+    (builtins.attrNames (builtins.removeAttrs x helperArgNames));
+  sourceInfo = rec {
+    baseName="libunicap";
+    version="0.9.12";
+    name="${baseName}-${version}";
+    url="http://www.unicap-imaging.org/downloads/${name}.tar.gz";
+    hash="05zcnnm4dfc6idihfi0fq5xka6x86zi89wip2ca19yz768sd33s9";
+  };
+in
+rec {
+  src = a.fetchurl {
+    url = sourceInfo.url;
+    sha256 = sourceInfo.hash;
+  };
+
+  inherit (sourceInfo) name version;
+  inherit buildInputs;
+
+  /* doConfigure should be removed if not needed */
+  phaseNames = ["fixIncludes" "fixMakefiles" "doConfigure" "doMakeInstall"];
+
+  fixIncludes = a.fullDepEntry (''
+    find . -type f -exec sed -e '/linux\/types\.h/d' -i '{}' ';'
+  '') ["minInit" "doUnpack"];
+
+  fixMakefiles = a.fullDepEntry (''
+    sed -e 's@/etc/udev@'"$out"'/&@' -i data/Makefile.*
+  '') ["minInit" "doUnpack"];
+
+  meta = {
+    description = "Universal video capture API";
+    maintainers = with a.lib.maintainers;
+    [
+      raskin
+    ];
+    platforms = with a.lib.platforms;
+      linux;
+  };
+  passthru = {
+    updateInfo = {
+      downloadPage = "http://unicap-imaging.org/download.htm";
+    };
+  };
+}) x
+