nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 60 lines 1.6 kB view raw
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 postPatch = '' 43 substituteInPlace CMakeLists.txt \ 44 --replace-fail "cmake_minimum_required (VERSION 2.6)" "cmake_minimum_required(VERSION 3.10)" 45 substituteInPlace libwebcam/CMakeLists.txt \ 46 --replace-fail "cmake_minimum_required (VERSION 2.6)" "cmake_minimum_required(VERSION 3.10)" 47 substituteInPlace uvcdynctrl/CMakeLists.txt \ 48 --replace-fail "cmake_minimum_required (VERSION 2.6)" "cmake_minimum_required(VERSION 3.10)" 49 ''; 50 51 doInstallCheck = true; 52 53 meta = { 54 description = "Simple interface for devices supported by the linux UVC driver"; 55 homepage = "https://guvcview.sourceforge.net"; 56 license = lib.licenses.gpl3Plus; 57 maintainers = [ lib.maintainers.puffnfresh ]; 58 platforms = lib.platforms.linux; 59 }; 60}