Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib 2, stdenv 3, fetchurl 4, cmake 5, pkg-config 6, libxml2 7}: 8 9stdenv.mkDerivation rec { 10 pname = "libwebcam"; 11 version = "0.2.5"; 12 13 src = fetchurl { 14 url = "mirror://sourceforge/project/${pname}/source/${pname}-src-${version}.tar.gz"; 15 sha256 = "0hcxv8di83fk41zjh0v592qm7c0v37a3m3n3lxavd643gff1k99w"; 16 }; 17 18 patches = [ 19 ./uvcdynctrl_symlink_support_and_take_data_dir_from_env.patch 20 ]; 21 22 nativeBuildInputs = [ cmake pkg-config ]; 23 buildInputs = [ libxml2 ]; 24 25 postPatch = '' 26 substituteInPlace ./uvcdynctrl/CMakeLists.txt \ 27 --replace "/lib/udev" "$out/lib/udev" 28 29 substituteInPlace ./uvcdynctrl/udev/scripts/uvcdynctrl \ 30 --replace 'debug=0' 'debug=''${NIX_UVCDYNCTRL_UDEV_DEBUG:-0}' \ 31 --replace 'uvcdynctrlpath=uvcdynctrl' "uvcdynctrlpath=$out/bin/uvcdynctrl" 32 33 substituteInPlace ./uvcdynctrl/udev/rules/80-uvcdynctrl.rules \ 34 --replace "/lib/udev" "$out/lib/udev" 35 ''; 36 37 38 preConfigure = '' 39 cmakeFlagsArray=( 40 $cmakeFlagsArray 41 "-DCMAKE_INSTALL_PREFIX=$out" 42 ) 43 ''; 44 45 meta = with lib; { 46 description = "The webcam-tools package"; 47 platforms = platforms.linux; 48 license = licenses.lgpl3; 49 maintainers = with maintainers; [ jraygauthier ]; 50 }; 51}