cvise: fix shebang for --command=
option
Upstream `cvise` changed the way it encodes shebang from hardcoded value
to `/bin` + value:
d99d82ce8e
This broke `nixpkgs` substitute hack and broke the option.
I proposed upstream to use `/usr/bin/env bash` indirection instead. This
change pulls in this proposed change.
This commit is contained in:
parent
2387a37fa0
commit
4fa9300cb0
1 changed files with 9 additions and 4 deletions
|
@ -1,6 +1,7 @@
|
||||||
{ lib
|
{ lib
|
||||||
, buildPythonApplication
|
, buildPythonApplication
|
||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
|
, fetchpatch
|
||||||
, bash
|
, bash
|
||||||
, cmake
|
, cmake
|
||||||
, colordiff
|
, colordiff
|
||||||
|
@ -29,6 +30,14 @@ buildPythonApplication rec {
|
||||||
patches = [
|
patches = [
|
||||||
# Refer to unifdef by absolute path.
|
# Refer to unifdef by absolute path.
|
||||||
./unifdef.patch
|
./unifdef.patch
|
||||||
|
|
||||||
|
# Refer to shell via /usr/bin/env:
|
||||||
|
# https://github.com/marxin/cvise/pull/121
|
||||||
|
(fetchpatch {
|
||||||
|
name = "env-shell.patch";
|
||||||
|
url = "https://github.com/marxin/cvise/commit/6a416eb590be978a2ad25c610974fdde84e88651.patch";
|
||||||
|
hash = "sha256-Kn6+TXP+wJpMs6jrgsa9OwjXf6vmIgGzny8jg3dfKWA=";
|
||||||
|
})
|
||||||
];
|
];
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
|
@ -37,10 +46,6 @@ buildPythonApplication rec {
|
||||||
substituteInPlace CMakeLists.txt \
|
substituteInPlace CMakeLists.txt \
|
||||||
--replace " -Werror " " "
|
--replace " -Werror " " "
|
||||||
|
|
||||||
# 'cvise --command=...' generates a script with hardcoded shebang.
|
|
||||||
substituteInPlace cvise.py \
|
|
||||||
--replace "#!/bin/bash" "#!${bash}/bin/bash"
|
|
||||||
|
|
||||||
substituteInPlace cvise/utils/testing.py \
|
substituteInPlace cvise/utils/testing.py \
|
||||||
--replace "'colordiff --version'" "'${colordiff}/bin/colordiff --version'" \
|
--replace "'colordiff --version'" "'${colordiff}/bin/colordiff --version'" \
|
||||||
--replace "'colordiff'" "'${colordiff}/bin/colordiff'"
|
--replace "'colordiff'" "'${colordiff}/bin/colordiff'"
|
||||||
|
|
Loading…
Reference in a new issue