refactor(nix/hm): remove neovide
package
Now using upstream from nixpkgs
This commit is contained in:
parent
6fe907880a
commit
c388f3933a
@ -4,7 +4,6 @@
|
|||||||
rustPlatform = pkgs.rustPlatform;
|
rustPlatform = pkgs.rustPlatform;
|
||||||
fetchFromGitHub = pkgs.fetchFromGitHub;
|
fetchFromGitHub = pkgs.fetchFromGitHub;
|
||||||
};
|
};
|
||||||
neovide = pkgs.callPackage ./neovide/package.nix { };
|
|
||||||
Fmt = pkgs.writeShellApplication {
|
Fmt = pkgs.writeShellApplication {
|
||||||
name = "Fmt";
|
name = "Fmt";
|
||||||
runtimeInputs = with pkgs; [
|
runtimeInputs = with pkgs; [
|
||||||
|
@ -1,125 +0,0 @@
|
|||||||
{
|
|
||||||
lib,
|
|
||||||
rustPlatform,
|
|
||||||
clangStdenv,
|
|
||||||
fetchFromGitHub,
|
|
||||||
linkFarm,
|
|
||||||
fetchgit,
|
|
||||||
runCommand,
|
|
||||||
gn,
|
|
||||||
neovim,
|
|
||||||
ninja,
|
|
||||||
makeWrapper,
|
|
||||||
pkg-config,
|
|
||||||
python3,
|
|
||||||
removeReferencesTo,
|
|
||||||
xcbuild,
|
|
||||||
SDL2,
|
|
||||||
fontconfig,
|
|
||||||
xorg,
|
|
||||||
stdenv,
|
|
||||||
darwin,
|
|
||||||
libglvnd,
|
|
||||||
libxkbcommon,
|
|
||||||
enableWayland ? stdenv.isLinux,
|
|
||||||
wayland,
|
|
||||||
}:
|
|
||||||
|
|
||||||
rustPlatform.buildRustPackage.override { stdenv = clangStdenv; } rec {
|
|
||||||
pname = "neovide";
|
|
||||||
version = "0.13.0";
|
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
|
||||||
owner = "neovide";
|
|
||||||
repo = "neovide";
|
|
||||||
rev = version;
|
|
||||||
sha256 = "sha256-lYahMSaagT6DloFMXT2lLPM1xX/9IEGNIPvbo1MQgSw=";
|
|
||||||
};
|
|
||||||
|
|
||||||
cargoHash = "sha256-g/Ezyz2gC1YaPMdIy/WdoOvezJUH3aB2FA87viahRzc=";
|
|
||||||
|
|
||||||
SKIA_SOURCE_DIR =
|
|
||||||
let
|
|
||||||
repo = fetchFromGitHub {
|
|
||||||
owner = "rust-skia";
|
|
||||||
repo = "skia";
|
|
||||||
# see rust-skia:skia-bindings/Cargo.toml#package.metadata skia
|
|
||||||
rev = "m124-0.72.3";
|
|
||||||
sha256 = "sha256-zlHUJUXukE4CsXwwmVl3KHf9mnNPT8lC/ETEE15Gb4s=";
|
|
||||||
};
|
|
||||||
# The externals for skia are taken from skia/DEPS
|
|
||||||
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
|
|
||||||
ln -s ${externals} $out/third_party/externals
|
|
||||||
'';
|
|
||||||
|
|
||||||
SKIA_GN_COMMAND = "${gn}/bin/gn";
|
|
||||||
SKIA_NINJA_COMMAND = "${ninja}/bin/ninja";
|
|
||||||
|
|
||||||
nativeBuildInputs = [
|
|
||||||
makeWrapper
|
|
||||||
pkg-config
|
|
||||||
python3 # skia
|
|
||||||
removeReferencesTo
|
|
||||||
] ++ lib.optionals stdenv.isDarwin [ xcbuild ];
|
|
||||||
|
|
||||||
nativeCheckInputs = [ neovim ];
|
|
||||||
|
|
||||||
buildInputs = [
|
|
||||||
SDL2
|
|
||||||
fontconfig
|
|
||||||
rustPlatform.bindgenHook
|
|
||||||
] ++ lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.AppKit ];
|
|
||||||
|
|
||||||
postFixup =
|
|
||||||
let
|
|
||||||
libPath = lib.makeLibraryPath (
|
|
||||||
[
|
|
||||||
libglvnd
|
|
||||||
libxkbcommon
|
|
||||||
xorg.libXcursor
|
|
||||||
xorg.libXext
|
|
||||||
xorg.libXrandr
|
|
||||||
xorg.libXi
|
|
||||||
]
|
|
||||||
++ lib.optionals enableWayland [ wayland ]
|
|
||||||
);
|
|
||||||
in
|
|
||||||
''
|
|
||||||
# library skia embeds the path to its sources
|
|
||||||
remove-references-to -t "$SKIA_SOURCE_DIR" \
|
|
||||||
$out/bin/neovide
|
|
||||||
|
|
||||||
wrapProgram $out/bin/neovide \
|
|
||||||
--prefix LD_LIBRARY_PATH : ${libPath}
|
|
||||||
'';
|
|
||||||
|
|
||||||
postInstall = ''
|
|
||||||
for n in 16x16 32x32 48x48 256x256; do
|
|
||||||
install -m444 -D "assets/neovide-$n.png" \
|
|
||||||
"$out/share/icons/hicolor/$n/apps/neovide.png"
|
|
||||||
done
|
|
||||||
install -m444 -Dt $out/share/icons/hicolor/scalable/apps assets/neovide.svg
|
|
||||||
install -m444 -Dt $out/share/applications assets/neovide.desktop
|
|
||||||
'';
|
|
||||||
|
|
||||||
disallowedReferences = [ SKIA_SOURCE_DIR ];
|
|
||||||
|
|
||||||
meta = with lib; {
|
|
||||||
description = "This is a simple graphical user interface for Neovim.";
|
|
||||||
mainProgram = "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;
|
|
||||||
};
|
|
||||||
}
|
|
@ -1,37 +0,0 @@
|
|||||||
{
|
|
||||||
"expat": {
|
|
||||||
"url": "https://chromium.googlesource.com/external/github.com/libexpat/libexpat.git",
|
|
||||||
"rev": "441f98d02deafd9b090aea568282b28f66a50e36",
|
|
||||||
"sha256": "sha256-FXTDGAK03jc2wvazhRKqtsFRKZUYS/9HLpZNp4JfZJI="
|
|
||||||
},
|
|
||||||
"libjpeg-turbo": {
|
|
||||||
"url": "https://chromium.googlesource.com/chromium/deps/libjpeg_turbo.git",
|
|
||||||
"rev": "ed683925e4897a84b3bffc5c1414c85b97a129a3",
|
|
||||||
"sha256": "sha256-DYJP3phe4OzCtRN2pMc07ITTWR8MuIlOWWg9PBsQAVw="
|
|
||||||
},
|
|
||||||
"icu": {
|
|
||||||
"url": "https://chromium.googlesource.com/chromium/deps/icu.git",
|
|
||||||
"rev": "a0718d4f121727e30b8d52c7a189ebf5ab52421f",
|
|
||||||
"sha256": "sha256-BI3f/gf9GNDvSfXWeRHKBvznSz4mjXY8rM24kK7QvOM="
|
|
||||||
},
|
|
||||||
"zlib": {
|
|
||||||
"url": "https://chromium.googlesource.com/chromium/src/third_party/zlib",
|
|
||||||
"rev": "646b7f569718921d7d4b5b8e22572ff6c76f2596",
|
|
||||||
"sha256": "sha256-jNj6SuTZ5/a7crtYhxW3Q/TlfRMNMfYIVxDlr7bYdzQ="
|
|
||||||
},
|
|
||||||
"harfbuzz": {
|
|
||||||
"url": "https://chromium.googlesource.com/external/github.com/harfbuzz/harfbuzz.git",
|
|
||||||
"rev": "c053e8f29257814e11ad61493dbbe29f27656de4",
|
|
||||||
"sha256": "sha256-D8DNcZH/oiJqWvfWFHvQ8AwQ3OrMwyZdfGmZ5y30Hvg="
|
|
||||||
},
|
|
||||||
"wuffs": {
|
|
||||||
"url": "https://skia.googlesource.com/external/github.com/google/wuffs-mirror-release-c.git",
|
|
||||||
"rev": "e3f919ccfe3ef542cfc983a82146070258fb57f8",
|
|
||||||
"sha256": "sha256-373d2F/STcgCHEq+PO+SCHrKVOo6uO1rqqwRN5eeBCw="
|
|
||||||
},
|
|
||||||
"libpng": {
|
|
||||||
"url": "https://skia.googlesource.com/third_party/libpng.git",
|
|
||||||
"rev": "144b348e072a78e8130ed0acc452c9f039a67bf2",
|
|
||||||
"sha256": "sha256-eTF7q7hR4S1OqV2oPQKmcHujA5Od4rGMc5879kT0SkE="
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user