about summary refs log tree commit diff
path: root/pkgs/applications/editors/neovim
diff options
context:
space:
mode:
authorNathan Henrie <nate@n8henrie.com>2024-01-06 08:48:59 -0700
committerNathan Henrie <nate@n8henrie.com>2024-01-07 05:24:58 -0700
commite2bb36a115cfa0948c169c5d3566da6a1d695d42 (patch)
treec855b6d52ba48e48f11c85a0f670b41a3b504e13 /pkgs/applications/editors/neovim
parenteba9a24297f166795a11a3ea0b2f0436dd841fc8 (diff)
downloadnixlib-e2bb36a115cfa0948c169c5d3566da6a1d695d42.tar
nixlib-e2bb36a115cfa0948c169c5d3566da6a1d695d42.tar.gz
nixlib-e2bb36a115cfa0948c169c5d3566da6a1d695d42.tar.bz2
nixlib-e2bb36a115cfa0948c169c5d3566da6a1d695d42.tar.lz
nixlib-e2bb36a115cfa0948c169c5d3566da6a1d695d42.tar.xz
nixlib-e2bb36a115cfa0948c169c5d3566da6a1d695d42.tar.zst
nixlib-e2bb36a115cfa0948c169c5d3566da6a1d695d42.zip
neovide: fix build for aarch64-darwin
Thanks to @wegank for https://github.com/NixOS/nixpkgs/pull/274839/files

This also reenables checks, which pass once given access to neovim.
Diffstat (limited to 'pkgs/applications/editors/neovim')
-rw-r--r--pkgs/applications/editors/neovim/neovide/default.nix13
1 files changed, 7 insertions, 6 deletions
diff --git a/pkgs/applications/editors/neovim/neovide/default.nix b/pkgs/applications/editors/neovim/neovide/default.nix
index 0142fde1726f..9f6e2a3f0739 100644
--- a/pkgs/applications/editors/neovim/neovide/default.nix
+++ b/pkgs/applications/editors/neovim/neovide/default.nix
@@ -6,6 +6,7 @@
 , fetchgit
 , runCommand
 , gn
+, neovim
 , ninja
 , makeWrapper
 , pkg-config
@@ -67,11 +68,7 @@ rustPlatform.buildRustPackage.override { stdenv = clangStdenv; } rec {
     removeReferencesTo
   ] ++ lib.optionals stdenv.isDarwin [ xcbuild ];
 
-  # All tests passes but at the end cargo prints for unknown reason:
-  #   error: test failed, to rerun pass '--bin neovide'
-  # Increasing the loglevel did not help. In a nix-shell environment
-  # the failure do not occure.
-  doCheck = false;
+  nativeCheckInputs = [ neovim ];
 
   buildInputs = [
     SDL2
@@ -81,6 +78,11 @@ rustPlatform.buildRustPackage.override { stdenv = clangStdenv; } rec {
     darwin.apple_sdk.frameworks.AppKit
   ];
 
+  env = lib.optionalAttrs stdenv.isDarwin {
+    # Work around https://github.com/NixOS/nixpkgs/issues/166205
+    NIX_LDFLAGS = "-l${stdenv.cc.libcxx.cxxabi.libName}";
+  };
+
   postFixup = let
     libPath = lib.makeLibraryPath ([
       libglvnd
@@ -117,6 +119,5 @@ rustPlatform.buildRustPackage.override { stdenv = clangStdenv; } rec {
     license = with licenses; [ mit ];
     maintainers = with maintainers; [ ck3d multisn8 ];
     platforms = platforms.all;
-    badPlatforms = platforms.darwin;
   };
 }