neovim: remove uneffective substituteInPlace patches (#352855)

This commit is contained in:
Gaétan Lepage 2024-11-01 23:01:38 +01:00 committed by GitHub
parent 6e6e33bd99
commit 507c5dd232
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -185,16 +185,12 @@ stdenv.mkDerivation (
];
# nvim --version output retains compilation flags and references to build tools
postPatch =
''
substituteInPlace src/nvim/version.c --replace NVIM_VERSION_CFLAGS "";
''
+ lib.optionalString (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
sed -i runtime/CMakeLists.txt \
-e "s|\".*/bin/nvim|\${stdenv.hostPlatform.emulator buildPackages} &|g"
sed -i src/nvim/po/CMakeLists.txt \
-e "s|\$<TARGET_FILE:nvim|\${stdenv.hostPlatform.emulator buildPackages} &|g"
'';
postPatch = lib.optionalString (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
sed -i runtime/CMakeLists.txt \
-e "s|\".*/bin/nvim|\${stdenv.hostPlatform.emulator buildPackages} &|g"
sed -i src/nvim/po/CMakeLists.txt \
-e "s|\$<TARGET_FILE:nvim|\${stdenv.hostPlatform.emulator buildPackages} &|g"
'';
postInstall = ''
find "$out" -type f -exec remove-references-to -t ${stdenv.cc} '{}' +
'';
@ -228,10 +224,7 @@ stdenv.mkDerivation (
];
preConfigure =
lib.optionalString stdenv.hostPlatform.isDarwin ''
substituteInPlace src/nvim/CMakeLists.txt --replace " util" ""
''
+ ''
mkdir -p $out/lib/nvim/parser
''
+ lib.concatStrings (