nixpkgs/pkgs/by-name/un/unicap/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

36 lines
1.1 KiB
Nix

{ lib, stdenv, fetchurl, libusb-compat-0_1, libraw1394, dcraw, intltool, perl, v4l-utils }:
stdenv.mkDerivation rec {
pname = "libunicap";
version="0.9.12";
src = fetchurl {
url = "https://www.unicap-imaging.org/downloads/${pname}-${version}.tar.gz";
sha256 = "05zcnnm4dfc6idihfi0fq5xka6x86zi89wip2ca19yz768sd33s9";
};
nativeBuildInputs = [ intltool ];
buildInputs = [ libusb-compat-0_1 libraw1394 dcraw perl v4l-utils ];
patches = [
# Debian has a patch that fixes the build.
(fetchurl {
url = "https://sources.debian.net/data/main/u/unicap/0.9.12-2/debian/patches/1009_v4l1.patch";
sha256 = "1lgypmhdj681m7d1nmzgvh19cz8agj2f31wlnfib0ha8i3g5hg5w";
})
];
postPatch = ''
find . -type f -exec sed -e '/linux\/types\.h/d' -i '{}' ';'
sed -e 's@/etc/udev@'"$out"'/&@' -i data/Makefile.*
'';
meta = with lib; {
description = "Universal video capture API";
homepage = "http://www.unicap-imaging.org/";
maintainers = [ maintainers.raskin ];
license = licenses.gpl2Plus;
platforms = platforms.linux;
};
}