diff --git a/pkgs/by-name/lg/lgpio/package.nix b/pkgs/by-name/lg/lgpio/package.nix index a472ceff3136..185dd2f0b869 100644 --- a/pkgs/by-name/lg/lgpio/package.nix +++ b/pkgs/by-name/lg/lgpio/package.nix @@ -6,7 +6,14 @@ # If we build the python packages, these two are not null buildPythonPackage ? null, lgpioWithoutPython ? null, - # When building a python Packages, this specifies the python subproject + # When building a python Packages, this specifies the python subproject - a + # folder in the repository. The current options are: + # + # - + # - PY_LGPIO + # - PY_RGPIO + # + # Where an empty value means 'build the non python project'. pyProject ? "", }: @@ -28,30 +35,18 @@ mkDerivation rec { swig ]; - preConfigure = - if pyProject != "" then - '' - cd ${pyProject} - '' - else - ""; + preConfigure = lib.optionalString (pyProject != "") '' + cd ${pyProject} + ''; # Emulate ldconfig when building the C API - postConfigure = - if pyProject == "" then - '' - substituteInPlace Makefile \ - --replace ldconfig 'echo ldconfig' - '' - else - ""; + postConfigure = lib.optionalString (pyProject == "") '' + substituteInPlace Makefile \ + --replace ldconfig 'echo ldconfig' + ''; - preBuild = - if pyProject == "PY_LGPIO" then - '' - swig -python lgpio.i - '' - else - ""; + preBuild = lib.optionalString (pyProject == "PY_LGPIO") '' + swig -python lgpio.i + ''; buildInputs = [ lgpioWithoutPython @@ -64,7 +59,7 @@ mkDerivation rec { meta = { description = "Linux C libraries and Python modules for manipulating GPIO"; homepage = "https://github.com/joan2937/lg"; - license = with lib.licenses; [ unlicense ]; + license = lib.licenses.unlicense; maintainers = with lib.maintainers; [ doronbehar ]; platforms = lib.platforms.linux; }; diff --git a/pkgs/by-name/pi/pigpio/package.nix b/pkgs/by-name/pi/pigpio/package.nix index ddde61ca0b7b..56f4c6bcdccf 100644 --- a/pkgs/by-name/pi/pigpio/package.nix +++ b/pkgs/by-name/pi/pigpio/package.nix @@ -28,7 +28,7 @@ mkDerivation rec { meta = { description = "C library for the Raspberry which allows control of the General Purpose Input Outputs (GPIO)"; homepage = "https://github.com/joan2937/pigpio"; - license = with lib.licenses; [ unlicense ]; + license = lib.licenses.unlicense; maintainers = with lib.maintainers; [ doronbehar ]; platforms = lib.platforms.linux; }; diff --git a/pkgs/by-name/pi/piscope/package.nix b/pkgs/by-name/pi/piscope/package.nix index 9873ada380eb..5f064722f4b2 100644 --- a/pkgs/by-name/pi/piscope/package.nix +++ b/pkgs/by-name/pi/piscope/package.nix @@ -23,9 +23,9 @@ stdenv.mkDerivation (finalAttrs: { hash = "sha256-VDrx/RLSpMhyD64PmdeWVacb9LleHakcy7D6zFxeyhw="; }; # Fix FHS paths - postConfigure = '' + postPatch = '' substituteInPlace piscope.c \ - --replace /usr/share/piscope $out/share/piscope + --replace-fail /usr/share/piscope $out/share/piscope ''; nativeBuildInputs = [