Skip to content

Commit

Permalink
neovim: remove uneffective substituteInPlace patches
Browse files Browse the repository at this point in the history
  • Loading branch information
GaetanLepage committed Oct 26, 2024
1 parent 0a5b4d5 commit 3b67779
Showing 1 changed file with 6 additions and 13 deletions.
19 changes: 6 additions & 13 deletions pkgs/by-name/ne/neovim-unwrapped/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -181,16 +181,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} '{}' +
'';
Expand Down Expand Up @@ -224,10 +220,7 @@ stdenv.mkDerivation (
];

preConfigure =
lib.optionalString stdenv.hostPlatform.isDarwin ''
substituteInPlace src/nvim/CMakeLists.txt --replace " util" ""
''
+ ''
mkdir -p $out/lib/nvim/parser
''
+ lib.concatStrings (
Expand Down

0 comments on commit 3b67779

Please sign in to comment.