Merge pull request #190212 from SuperSandro2000/lirc

authored by Sandro and committed by GitHub d7ca7d1c 8bc7b2f2

+16 -3
+16 -3
pkgs/development/libraries/lirc/default.nix
··· 1 1 { lib, stdenv, fetchurl, fetchpatch, autoreconfHook, pkg-config, help2man, python3, 2 2 alsa-lib, xlibsWrapper, libxslt, systemd, libusb-compat-0_1, libftdi1 }: 3 3 4 + let 5 + pythonEnv = python3.pythonForBuild.withPackages (p: with p; [ pyyaml setuptools ]); 6 + in 4 7 stdenv.mkDerivation rec { 5 8 pname = "lirc"; 6 9 version = "0.10.1"; ··· 34 37 # Pull fix for new pyyaml pending upstream inclusion 35 38 # https://sourceforge.net/p/lirc/git/merge-requests/39/ 36 39 substituteInPlace python-pkg/lirc/database.py --replace 'yaml.load(' 'yaml.safe_load(' 40 + 41 + # cant import '/build/lirc-0.10.1/python-pkg/lirc/_client.so' while cross-compiling to check the version 42 + substituteInPlace python-pkg/setup.py \ 43 + --replace "VERSION='0.0.0'" "VERSION='${version}'" 37 44 ''; 38 45 39 46 preConfigure = '' ··· 41 48 touch lib/lirc/input_map.inc 42 49 ''; 43 50 44 - nativeBuildInputs = [ autoreconfHook pkg-config help2man 45 - (python3.withPackages (p: with p; [ pyyaml setuptools ])) ]; 51 + strictDeps = true; 46 52 47 - buildInputs = [ alsa-lib xlibsWrapper libxslt systemd libusb-compat-0_1 libftdi1 ]; 53 + nativeBuildInputs = [ autoreconfHook help2man libxslt pythonEnv ]; 54 + 55 + depsBuildBuild = [ pkg-config ]; 56 + 57 + buildInputs = [ alsa-lib xlibsWrapper systemd libusb-compat-0_1 libftdi1 ]; 58 + 59 + DEVINPUT_HEADER = "include/linux/input-event-codes.h"; 48 60 49 61 configureFlags = [ 50 62 "--sysconfdir=/etc" ··· 53 65 "--enable-uinput" # explicit activation because build env has no uinput 54 66 "--enable-devinput" # explicit activation because build env has no /dev/input 55 67 "--with-lockdir=/run/lirc/lock" # /run/lock is not writable for 'lirc' user 68 + "PYTHON=${pythonEnv.interpreter}" 56 69 ]; 57 70 58 71 installFlags = [