Merge pull request #138039 from trofi/cvise-shebang

cvise: use /bin.bash from nix store
This commit is contained in:
figsoda
2021-09-17 14:35:26 -04:00
committed by GitHub
@@ -1,4 +1,4 @@
{ lib, buildPythonApplication, fetchFromGitHub, cmake, flex
{ lib, buildPythonApplication, fetchFromGitHub, bash, cmake, flex
, libclang, llvm, unifdef
, pebble, psutil, pytestCheckHook, pytest-flake8
}:
@@ -20,10 +20,16 @@ buildPythonApplication rec {
];
nativeBuildInputs = [ cmake flex llvm.dev ];
buildInputs = [ libclang llvm llvm.dev unifdef ];
buildInputs = [ bash libclang llvm llvm.dev unifdef ];
propagatedBuildInputs = [ pebble psutil ];
checkInputs = [ pytestCheckHook pytest-flake8 unifdef ];
# 'cvise --command=...' generates a script with hardcoded shebang.
postPatch = ''
substituteInPlace cvise.py \
--replace "#!/bin/bash" "#!${bash}/bin/bash"
'';
preCheck = ''
patchShebangs cvise.py
'';