Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 cmake, 6 pkg-config, 7 libxml2, 8 udevCheckHook, 9}: 10 11stdenv.mkDerivation { 12 version = "0.3.0"; 13 pname = "uvcdynctrl"; 14 15 src = fetchFromGitHub { 16 owner = "cshorler"; 17 repo = "webcam-tools"; 18 rev = "bee2ef3c9e350fd859f08cd0e6745871e5f55cb9"; 19 sha256 = "0s15xxgdx8lnka7vi8llbf6b0j4rhbjl6yp0qxaihysf890xj73s"; 20 }; 21 22 nativeBuildInputs = [ 23 cmake 24 pkg-config 25 udevCheckHook 26 ]; 27 buildInputs = [ libxml2 ]; 28 29 prePatch = '' 30 local fixup_list=( 31 uvcdynctrl/CMakeLists.txt 32 uvcdynctrl/udev/rules/80-uvcdynctrl.rules 33 uvcdynctrl/udev/scripts/uvcdynctrl 34 ) 35 for f in "''${fixup_list[@]}"; do 36 substituteInPlace "$f" \ 37 --replace "/etc/udev" "$out/etc/udev" \ 38 --replace "/lib/udev" "$out/lib/udev" 39 done 40 ''; 41 42 doInstallCheck = true; 43 44 meta = with lib; { 45 description = "Simple interface for devices supported by the linux UVC driver"; 46 homepage = "https://guvcview.sourceforge.net"; 47 license = licenses.gpl3Plus; 48 maintainers = [ maintainers.puffnfresh ]; 49 platforms = platforms.linux; 50 }; 51}