Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)

treewide: `--replace` -> `--replace-fail`

Hardening the packages I maintain.
We use `--replace-fail` in every case except for `python3Packages.remi`, which does a glob `--replace-quiet` to reduce warnings

+26 -26
+1 -1
pkgs/by-name/no/normcap/package.nix
··· 40 40 postPatch = '' 41 41 # disable coverage testing 42 42 substituteInPlace pyproject.toml \ 43 - --replace "addopts = [" "addopts_ = [" 43 + --replace-fail "addopts = [" "addopts_ = [" 44 44 ''; 45 45 46 46 pythonRemoveDeps = [
+1 -1
pkgs/development/compilers/gnu-cim/default.nix
··· 17 17 postPatch = '' 18 18 for fname in lib/{simulation,simset}.c; do 19 19 substituteInPlace "$fname" \ 20 - --replace \ 20 + --replace-fail \ 21 21 '#include "../../lib/cim.h"' \ 22 22 '#include "../lib/cim.h"' 23 23 done
+1 -1
pkgs/development/libraries/librealsense/default.nix
··· 74 74 # ( https://github.com/IntelRealSense/meta-intel-realsense/issues/20 ) 75 75 postInstall = '' 76 76 substituteInPlace $out/lib/cmake/realsense2/realsense2Targets.cmake \ 77 - --replace "\''${_IMPORT_PREFIX}/include" "$dev/include" 77 + --replace-fail "\''${_IMPORT_PREFIX}/include" "$dev/include" 78 78 '' + lib.optionalString enablePython '' 79 79 cp ../wrappers/python/pyrealsense2/__init__.py $out/${pythonPackages.python.sitePackages}/pyrealsense2 80 80 '';
+2 -2
pkgs/development/python-modules/birch/default.nix
··· 31 31 32 32 postPatch = '' 33 33 substituteInPlace pytest.ini \ 34 - --replace \ 34 + --replace-fail \ 35 35 "--cov" \ 36 36 "#--cov" 37 37 38 38 # configure correct version, which fails due to missing .git 39 39 substituteInPlace versioneer.py birch/_version.py \ 40 - --replace '"0+unknown"' '"${version}"' 40 + --replace-fail '"0+unknown"' '"${version}"' 41 41 ''; 42 42 43 43 nativeBuildInputs = [
+1 -1
pkgs/development/python-modules/cachier/default.nix
··· 42 42 43 43 preCheck = '' 44 44 substituteInPlace pyproject.toml \ 45 - --replace \ 45 + --replace-fail \ 46 46 '"--cov' \ 47 47 '#"--cov' 48 48 '';
+1 -1
pkgs/development/python-modules/ffmpy/default.nix
··· 25 25 postPatch = '' 26 26 # default to store ffmpeg 27 27 substituteInPlace ffmpy.py \ 28 - --replace 'executable="ffmpeg",' 'executable="${ffmpeg-headless}/bin/ffmpeg",' 28 + --replace-fail 'executable="ffmpeg",' 'executable="${ffmpeg-headless}/bin/ffmpeg",' 29 29 30 30 # The tests test a mock that does not behave like ffmpeg. If we default to the nix-store ffmpeg they fail. 31 31 for fname in tests/*.py; do
+2 -2
pkgs/development/python-modules/pymongo-inmemory/default.nix
··· 25 25 postPatch = '' 26 26 # move cache location from nix store to home 27 27 substituteInPlace pymongo_inmemory/context.py \ 28 - --replace \ 28 + --replace-fail \ 29 29 'CACHE_FOLDER = path.join(path.dirname(__file__), "..", ".cache")' \ 30 30 'CACHE_FOLDER = os.environ.get("XDG_CACHE_HOME", os.environ["HOME"] + "/.cache") + "/pymongo-inmemory"' 31 31 32 32 # fix a broken assumption arising from the above fix 33 33 substituteInPlace pymongo_inmemory/_utils.py \ 34 - --replace \ 34 + --replace-fail \ 35 35 'os.mkdir(current_path)' \ 36 36 'os.makedirs(current_path)' 37 37 '';
+1 -1
pkgs/development/python-modules/pyrender/default.nix
··· 45 45 # the commit does not apply as a patch when cherry picked, hence the substituteInPlace 46 46 postPatch = '' 47 47 substituteInPlace tests/unit/test_meshes.py \ 48 - --replace \ 48 + --replace-fail \ 49 49 "bm = trimesh.load('tests/data/WaterBottle.glb').dump()[0]" \ 50 50 'bm = trimesh.load("tests/data/WaterBottle.glb").geometry["WaterBottle"]' 51 51 '';
+1 -1
pkgs/development/python-modules/pyunpack/default.nix
··· 23 23 24 24 postPatch = '' 25 25 substituteInPlace pyunpack/__init__.py \ 26 - --replace \ 26 + --replace-fail \ 27 27 '_exepath("patool")' \ 28 28 '"${lib.getBin patool}/bin/.patool-wrapped"' 29 29 '';
+4 -4
pkgs/development/python-modules/remi/default.nix
··· 23 23 preCheck = '' 24 24 # for some reason, REMI already deal with these using try blocks, but they fail 25 25 substituteInPlace test/test_widget.py \ 26 - --replace \ 26 + --replace-fail \ 27 27 "from html_validator import " \ 28 28 "from .html_validator import " 29 29 substituteInPlace test/test_examples_app.py \ 30 - --replace \ 30 + --replace-fail \ 31 31 "from mock_server_and_request import " \ 32 32 "from .mock_server_and_request import " \ 33 - --replace \ 33 + --replace-fail \ 34 34 "from html_validator import " \ 35 35 "from .html_validator import " 36 36 # Halves number of warnings 37 37 substituteInPlace test/test_*.py \ 38 - --replace \ 38 + --replace-quiet \ 39 39 "self.assertEquals(" \ 40 40 "self.assertEqual(" 41 41 '';
+2 -2
pkgs/development/python-modules/strct/default.nix
··· 30 30 31 31 postPatch = '' 32 32 substituteInPlace pytest.ini \ 33 - --replace \ 33 + --replace-fail \ 34 34 "--cov" \ 35 35 "#--cov" 36 36 37 37 # configure correct version, which fails due to missing .git 38 38 substituteInPlace versioneer.py strct/_version.py \ 39 - --replace '"0+unknown"' '"${version}"' 39 + --replace-fail '"0+unknown"' '"${version}"' 40 40 ''; 41 41 42 42 nativeBuildInputs = [
+7 -7
pkgs/tools/misc/pokemonsay/default.nix
··· 28 28 29 29 postPatch = '' 30 30 substituteInPlace pokemonsay.sh \ 31 - --replace \ 31 + --replace-fail \ 32 32 'INSTALL_PATH=''${HOME}/.bin/pokemonsay' \ 33 33 "" \ 34 - --replace \ 34 + --replace-fail \ 35 35 'POKEMON_PATH=''${INSTALL_PATH}/pokemons' \ 36 36 'POKEMON_PATH=${placeholder "out"}/share/pokemonsay' \ 37 - --replace \ 37 + --replace-fail \ 38 38 '$(find ' \ 39 39 '$(${findutils}/bin/find ' \ 40 - --replace \ 40 + --replace-fail \ 41 41 '$(basename ' \ 42 42 '$(${coreutils}/bin/basename ' \ 43 - --replace \ 43 + --replace-fail \ 44 44 'cowsay -f ' \ 45 45 '${cowsay}/bin/cowsay -f ' \ 46 - --replace \ 46 + --replace-fail \ 47 47 'cowthink -f ' \ 48 48 '${cowsay}/bin/cowthink -f ' 49 49 50 50 substituteInPlace pokemonthink.sh \ 51 - --replace \ 51 + --replace-fail \ 52 52 './pokemonsay.sh' \ 53 53 "${placeholder "out"}/bin/pokemonsay" 54 54 '';
+1 -1
pkgs/tools/misc/remote-exec/default.nix
··· 34 34 # remove legacy endpoints, we use --multi now 35 35 postPatch = '' 36 36 substituteInPlace setup.py \ 37 - --replace '"mremote' '#"mremote' 37 + --replace-fail '"mremote' '#"mremote' 38 38 ''; 39 39 40 40 propagatedBuildInputs = [
+1 -1
pkgs/tools/misc/rmate-sh/default.nix
··· 22 22 runHook preBuild 23 23 24 24 substituteInPlace rmate \ 25 - --replace \ 25 + --replace-fail \ 26 26 'echo "hostname"' \ 27 27 'echo "${hostname}/bin/hostname"' 28 28 patsh -f rmate -s ${builtins.storeDir}