diff --git a/pkgs/by-name/sd/sdcc/package.nix b/pkgs/by-name/sd/sdcc/package.nix index 82df34e70a2d..d8361e04a744 100644 --- a/pkgs/by-name/sd/sdcc/package.nix +++ b/pkgs/by-name/sd/sdcc/package.nix @@ -68,8 +68,15 @@ stdenv.mkDerivation (finalAttrs: { # filesystem), the INSTALL file keeps the `install` target in the ucsim # directory from running. Nothing else creates the `man` output, causing the # entire build to fail. + # + # TODO: remove this when updating to the next release - it's been fixed in + # upstream sdcc r15384 . postPatch = '' + if grep -q '\.PHONY:.*install' sim/ucsim/Makefile.in; then + echo 'Upstream has added `.PHONY: install` rule; must remove `postPatch` from the Nix file.' >&2 + exit 1 + fi echo '.PHONY: install' >> sim/ucsim/Makefile.in '';