uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
134
pkgs/applications/editors/neovim/neovide/default.nix
Normal file
134
pkgs/applications/editors/neovim/neovide/default.nix
Normal file
|
|
@ -0,0 +1,134 @@
|
|||
{ rustPlatform
|
||||
, runCommand
|
||||
, lib
|
||||
, fetchFromGitHub
|
||||
, fetchgit
|
||||
, fetchurl
|
||||
, makeWrapper
|
||||
, pkg-config
|
||||
, python2
|
||||
, python3
|
||||
, openssl
|
||||
, SDL2
|
||||
, fontconfig
|
||||
, freetype
|
||||
, ninja
|
||||
, gn
|
||||
, llvmPackages
|
||||
, makeFontsConf
|
||||
, libglvnd
|
||||
, libxkbcommon
|
||||
, stdenv
|
||||
, enableWayland ? stdenv.isLinux
|
||||
, wayland
|
||||
, xorg
|
||||
}:
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "neovide";
|
||||
version = "0.8.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Kethku";
|
||||
repo = "neovide";
|
||||
rev = version;
|
||||
sha256 = "sha256-pbniOWjEw1Z+PoXqbbFOUkW5Ii1UDOMoZpAvVF1uNEg=";
|
||||
};
|
||||
|
||||
cargoSha256 = "sha256-7o7uJXH68pvfuiG1eSNmbPx8OO8QJjCe+oEFl38bFm4=";
|
||||
|
||||
SKIA_SOURCE_DIR =
|
||||
let
|
||||
repo = fetchFromGitHub {
|
||||
owner = "rust-skia";
|
||||
repo = "skia";
|
||||
# see rust-skia:skia-bindings/Cargo.toml#package.metadata skia
|
||||
rev = "m93-0.42.0";
|
||||
sha256 = "sha256-F1DWLm7bdKnuCu5tMMekxSyaGq8gPRNtZwcRVXJxjZQ=";
|
||||
};
|
||||
# The externals for skia are taken from skia/DEPS
|
||||
externals = lib.mapAttrs (n: fetchgit) (lib.importJSON ./skia-externals.json);
|
||||
in
|
||||
runCommand "source" {} (
|
||||
''
|
||||
cp -R ${repo} $out
|
||||
chmod -R +w $out
|
||||
|
||||
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 = [ ]; };
|
||||
|
||||
nativeBuildInputs = [
|
||||
pkg-config
|
||||
makeWrapper
|
||||
python2 # skia-bindings
|
||||
python3 # rust-xcb
|
||||
llvmPackages.clang # skia
|
||||
];
|
||||
|
||||
# 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;
|
||||
|
||||
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";
|
||||
};
|
||||
}))
|
||||
];
|
||||
}))
|
||||
];
|
||||
|
||||
postFixup = let
|
||||
libPath = lib.makeLibraryPath ([
|
||||
libglvnd
|
||||
libxkbcommon
|
||||
xorg.libXcursor
|
||||
xorg.libXext
|
||||
xorg.libXrandr
|
||||
xorg.libXi
|
||||
] ++ lib.optionals enableWayland [ wayland ]);
|
||||
in ''
|
||||
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
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "This is a simple graphical user interface for Neovim.";
|
||||
homepage = "https://github.com/Kethku/neovide";
|
||||
license = with licenses; [ mit ];
|
||||
maintainers = with maintainers; [ ck3d ];
|
||||
platforms = platforms.linux;
|
||||
mainProgram = "neovide";
|
||||
};
|
||||
}
|
||||
37
pkgs/applications/editors/neovim/neovide/skia-externals.json
Normal file
37
pkgs/applications/editors/neovim/neovide/skia-externals.json
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
{
|
||||
"expat": {
|
||||
"url": "https://chromium.googlesource.com/external/github.com/libexpat/libexpat.git",
|
||||
"rev": "a28238bdeebc087071777001245df1876a11f5ee",
|
||||
"sha256": "sha256-TSaVtKEk7J0fckDvpI6/U5Aq7d37nsixp0Ft7sMHi8w="
|
||||
},
|
||||
"libjpeg-turbo": {
|
||||
"url": "https://chromium.googlesource.com/chromium/deps/libjpeg_turbo.git",
|
||||
"rev": "24e310554f07c0fdb8ee52e3e708e4f3e9eb6e20",
|
||||
"sha256": "sha256-bhbUnA36rKYLJSLpElmXJqccXQDjjbMcNMsVM4Eekrs="
|
||||
},
|
||||
"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": "c876c8f87101c5a75f6014b0f832499afeb65b73",
|
||||
"sha256": "sha256-mwozVo8ymyrYN4tw+/ZnSI+xogSTZQ6PUBba/jQqRkE="
|
||||
},
|
||||
"harfbuzz": {
|
||||
"url": "https://chromium.googlesource.com/external/github.com/harfbuzz/harfbuzz.git",
|
||||
"rev": "3a74ee528255cc027d84b204a87b5c25e47bff79",
|
||||
"sha256": "sha256-/4UdoUj0bxj6+EfNE8ofjtWOn2VkseEfvdFah5rwwBM="
|
||||
},
|
||||
"libpng": {
|
||||
"url": "https://skia.googlesource.com/third_party/libpng.git",
|
||||
"rev": "386707c6d19b974ca2e3db7f5c61873813c6fe44",
|
||||
"sha256": "sha256-67kf5MBsnBBi0bOfX/RKL52xpaCWm/ampltAI+EeQ+c="
|
||||
},
|
||||
"libgifcodec": {
|
||||
"url": "https://skia.googlesource.com/libgifcodec",
|
||||
"rev": "fd59fa92a0c86788dcdd84d091e1ce81eda06a77",
|
||||
"sha256": "sha256-spyZU4QhV2xrHcBRoYqYgCR0wEM5lgfhGh8pqJE5yXM="
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue