lgpio: use --replace-fail in substitution (#490653)

This commit is contained in:
Doron Behar
2026-02-17 10:31:14 +00:00
committed by GitHub
+4 -4
View File
@@ -20,7 +20,7 @@
let
mkDerivation = if pyProject == "" then stdenv.mkDerivation else buildPythonPackage;
in
mkDerivation rec {
mkDerivation (finalAttrs: {
pname = "lgpio";
version = "0.2.2";
format = if pyProject == "" then null else "setuptools";
@@ -28,7 +28,7 @@ mkDerivation rec {
src = fetchFromGitHub {
owner = "joan2937";
repo = "lg";
tag = "v${version}";
tag = "v${finalAttrs.version}";
hash = "sha256-92lLV+EMuJj4Ul89KIFHkpPxVMr/VvKGEocYSW2tFiE=";
};
@@ -44,7 +44,7 @@ mkDerivation rec {
# Emulate ldconfig when building the C API
postConfigure = lib.optionalString (pyProject == "") ''
substituteInPlace Makefile \
--replace ldconfig 'echo ldconfig'
--replace-fail ldconfig 'echo ldconfig'
'';
preBuild = lib.optionalString (pyProject == "PY_LGPIO") ''
@@ -67,4 +67,4 @@ mkDerivation rec {
maintainers = with lib.maintainers; [ doronbehar ];
platforms = lib.platforms.linux;
};
}
})