1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-18 03:30:45 +00:00
nixpkgs/pkgs/os-specific/linux/libwebcam/default.nix
Alexis Hildebrandt f8c4a98e8e treewide: Remove the definite article from meta.description
nix run nixpkgs#silver-searcher -- -G '\.nix$' -0l 'description.*"([Tt]he)? ' pkgs \
  | xargs -0 nix run nixpkgs#gnused -- -i '' -Ee 's/(description.*")[Tt]he (.)/\1\U\2/'
2024-06-09 23:08:46 +02:00

52 lines
1.2 KiB
Nix

{ lib
, stdenv
, fetchurl
, cmake
, pkg-config
, libxml2
}:
stdenv.mkDerivation rec {
pname = "libwebcam";
version = "0.2.5";
src = fetchurl {
url = "mirror://sourceforge/project/${pname}/source/${pname}-src-${version}.tar.gz";
sha256 = "0hcxv8di83fk41zjh0v592qm7c0v37a3m3n3lxavd643gff1k99w";
};
patches = [
./uvcdynctrl_symlink_support_and_take_data_dir_from_env.patch
];
nativeBuildInputs = [ cmake pkg-config ];
buildInputs = [ libxml2 ];
postPatch = ''
substituteInPlace ./uvcdynctrl/CMakeLists.txt \
--replace "/lib/udev" "$out/lib/udev"
substituteInPlace ./uvcdynctrl/udev/scripts/uvcdynctrl \
--replace 'debug=0' 'debug=''${NIX_UVCDYNCTRL_UDEV_DEBUG:-0}' \
--replace 'uvcdynctrlpath=uvcdynctrl' "uvcdynctrlpath=$out/bin/uvcdynctrl"
substituteInPlace ./uvcdynctrl/udev/rules/80-uvcdynctrl.rules \
--replace "/lib/udev" "$out/lib/udev"
'';
preConfigure = ''
cmakeFlagsArray=(
$cmakeFlagsArray
"-DCMAKE_INSTALL_PREFIX=$out"
)
'';
meta = with lib; {
description = "Webcam-tools package";
platforms = platforms.linux;
license = licenses.lgpl3;
maintainers = with maintainers; [ jraygauthier ];
};
}