summary refs log tree commit diff
diff options
context:
space:
mode:
authorfigsoda <figsoda@pm.me>2022-12-05 15:04:03 -0500
committerGitHub <noreply@github.com>2022-12-05 15:04:03 -0500
commitaaf173db6b6536f780d50cdc9e964d734943258e (patch)
tree9a611882f73f1541a4c55fa795fc7ec05bc444c0
parentc8366d7f3e282c46b3dba73c305692089c924d55 (diff)
parenteeb1fad1bc5995dc2b36e5cff7a78ace4621a17f (diff)
downloadnixpkgs-aaf173db6b6536f780d50cdc9e964d734943258e.tar
nixpkgs-aaf173db6b6536f780d50cdc9e964d734943258e.tar.gz
nixpkgs-aaf173db6b6536f780d50cdc9e964d734943258e.tar.bz2
nixpkgs-aaf173db6b6536f780d50cdc9e964d734943258e.tar.lz
nixpkgs-aaf173db6b6536f780d50cdc9e964d734943258e.tar.xz
nixpkgs-aaf173db6b6536f780d50cdc9e964d734943258e.tar.zst
nixpkgs-aaf173db6b6536f780d50cdc9e964d734943258e.zip
Merge pull request #204670 from figsoda/neovide
neovide: drop python2, clean up
-rw-r--r--pkgs/applications/editors/neovim/neovide/default.nix95
-rw-r--r--pkgs/top-level/all-packages.nix4
2 files changed, 35 insertions, 64 deletions
diff --git a/pkgs/applications/editors/neovim/neovide/default.nix b/pkgs/applications/editors/neovim/neovide/default.nix
index 3a32516b7d3..f9c3ea8a7c7 100644
--- a/pkgs/applications/editors/neovim/neovide/default.nix
+++ b/pkgs/applications/editors/neovim/neovide/default.nix
@@ -1,40 +1,34 @@
-{ rustPlatform
-, runCommand
-, lib
+{ lib
+, rustPlatform
+, clangStdenv
 , fetchFromGitHub
+, linkFarm
 , fetchgit
-, fetchurl
+, runCommand
+, gn
+, ninja
 , makeWrapper
 , pkg-config
-, python2
 , python3
-, openssl
+, removeReferencesTo
+, xcbuild
 , SDL2
 , fontconfig
-, freetype
-, ninja
-, gn
-, llvmPackages
-, makeFontsConf
+, xorg
+, stdenv
+, darwin
 , libglvnd
 , libxkbcommon
-, stdenv
 , enableWayland ? stdenv.isLinux
 , wayland
-, xorg
-, xcbuild
-, Security
-, ApplicationServices
-, AppKit
-, Carbon
-, removeReferencesTo
 }:
-rustPlatform.buildRustPackage rec {
+
+rustPlatform.buildRustPackage.override { stdenv = clangStdenv; } rec {
   pname = "neovide";
   version = "0.10.3";
 
   src = fetchFromGitHub {
-    owner = "Kethku";
+    owner = "neovide";
     repo = "neovide";
     rev = version;
     sha256 = "sha256-CcBiCcfOJzuq0DnokTUHpMdo7Ry29ugQ+N7Hk0R+cQE=";
@@ -52,35 +46,24 @@ rustPlatform.buildRustPackage rec {
         sha256 = "sha256-w5dw/lGm40gKkHPR1ji/L82Oa808Kuh8qaCeiqBLkLw=";
       };
       # The externals for skia are taken from skia/DEPS
-      externals = lib.mapAttrs (n: fetchgit) (lib.importJSON ./skia-externals.json);
+      externals = linkFarm "skia-externals" (lib.mapAttrsToList
+        (name: value: { inherit name; path = fetchgit value; })
+        (lib.importJSON ./skia-externals.json));
     in
-      runCommand "source" {} (
-        ''
-          cp -R ${repo} $out
-          chmod -R +w $out
+    runCommand "source" { } ''
+      cp -R ${repo} $out
+      chmod -R +w $out
+      ln -s ${externals} $out/third_party/externals
+    ''
+  ;
 
-          mkdir -p $out/third_party/externals
-          cd $out/third_party/externals
-        '' + (builtins.concatStringsSep "\n" (lib.mapAttrsToList (name: value: "cp -ra ${value} ${name}") externals))
-      );
-
-  SKIA_NINJA_COMMAND = "${ninja}/bin/ninja";
   SKIA_GN_COMMAND = "${gn}/bin/gn";
-  LIBCLANG_PATH = "${llvmPackages.libclang.lib}/lib";
-
-  preConfigure = ''
-    unset CC CXX
-  '';
-
-  # test needs a valid fontconfig file
-  FONTCONFIG_FILE = makeFontsConf { fontDirectories = [ ]; };
+  SKIA_NINJA_COMMAND = "${ninja}/bin/ninja";
 
   nativeBuildInputs = [
-    pkg-config
     makeWrapper
-    python2 # skia-bindings
-    python3 # rust-xcb
-    llvmPackages.clang # skia
+    pkg-config
+    python3 # skia
     removeReferencesTo
   ] ++ lib.optionals stdenv.isDarwin [ xcbuild ];
 
@@ -91,21 +74,12 @@ rustPlatform.buildRustPackage rec {
   doCheck = false;
 
   buildInputs = [
-    openssl
     SDL2
-    (fontconfig.overrideAttrs (old: {
-      propagatedBuildInputs = [
-        # skia is not compatible with freetype 2.11.0
-        (freetype.overrideAttrs (old: rec {
-          version = "2.10.4";
-          src = fetchurl {
-            url = "mirror://savannah/${old.pname}/${old.pname}-${version}.tar.xz";
-            sha256 = "112pyy215chg7f7fmp2l9374chhhpihbh8wgpj5nj6avj3c59a46";
-          };
-        }))
-      ];
-    }))
-  ] ++ lib.optionals stdenv.isDarwin [ Security ApplicationServices Carbon AppKit ];
+    fontconfig
+    rustPlatform.bindgenHook
+  ] ++ lib.optionals stdenv.isDarwin [
+    darwin.apple_sdk.frameworks.AppKit
+  ];
 
   postFixup = let
     libPath = lib.makeLibraryPath ([
@@ -138,10 +112,9 @@ rustPlatform.buildRustPackage rec {
 
   meta = with lib; {
     description = "This is a simple graphical user interface for Neovim.";
-    homepage = "https://github.com/Kethku/neovide";
+    homepage = "https://github.com/neovide/neovide";
+    changelog = "https://github.com/neovide/neovide/releases/tag/${version}";
     license = with licenses; [ mit ];
     maintainers = with maintainers; [ ck3d ];
-    platforms = platforms.all;
-    mainProgram = "neovide";
   };
 }
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 8825c82a648..a43b850f907 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -32782,9 +32782,7 @@ with pkgs;
 
   gnvim = callPackage ../applications/editors/neovim/gnvim/wrapper.nix { };
 
-  neovide = callPackage ../applications/editors/neovim/neovide {
-    inherit (darwin.apple_sdk.frameworks) Security ApplicationServices Carbon AppKit;
-  };
+  neovide = callPackage ../applications/editors/neovim/neovide { };
 
   neovim-remote = callPackage ../applications/editors/neovim/neovim-remote.nix { };