slint-lsp: modernize
This commit is contained in:
@@ -10,17 +10,20 @@
|
||||
xorg,
|
||||
libxkbcommon,
|
||||
wayland,
|
||||
# Darwin Frameworks
|
||||
AppKit,
|
||||
CoreGraphics,
|
||||
CoreServices,
|
||||
CoreText,
|
||||
Foundation,
|
||||
libiconv,
|
||||
OpenGL,
|
||||
versionCheckHook,
|
||||
nix-update-script,
|
||||
}:
|
||||
rustPlatform.buildRustPackage (finalAttrs: {
|
||||
pname = "slint-lsp";
|
||||
version = "1.10.0";
|
||||
|
||||
src = fetchCrate {
|
||||
inherit (finalAttrs) pname version;
|
||||
hash = "sha256-5LDEjJx+PC6pOem06DKFkPcjpIkF20gbxi/PAVZT1ns=";
|
||||
};
|
||||
|
||||
cargoHash = "sha256-1/4dOlhByJDpduExu9ZOjb7JYFKehnLiLCboWUnmfp8=";
|
||||
|
||||
let
|
||||
rpathLibs =
|
||||
[
|
||||
fontconfig
|
||||
@@ -34,52 +37,35 @@ let
|
||||
libxkbcommon
|
||||
wayland
|
||||
];
|
||||
in
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "slint-lsp";
|
||||
version = "1.10.0";
|
||||
|
||||
src = fetchCrate {
|
||||
inherit pname version;
|
||||
hash = "sha256-5LDEjJx+PC6pOem06DKFkPcjpIkF20gbxi/PAVZT1ns=";
|
||||
};
|
||||
|
||||
useFetchCargoVendor = true;
|
||||
cargoHash = "sha256-1/4dOlhByJDpduExu9ZOjb7JYFKehnLiLCboWUnmfp8=";
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
pkg-config
|
||||
fontconfig
|
||||
];
|
||||
buildInputs =
|
||||
rpathLibs
|
||||
++ [ xorg.libxcb.dev ]
|
||||
++ lib.optionals stdenv.hostPlatform.isDarwin [
|
||||
AppKit
|
||||
CoreGraphics
|
||||
CoreServices
|
||||
CoreText
|
||||
Foundation
|
||||
libiconv
|
||||
OpenGL
|
||||
];
|
||||
buildInputs = finalAttrs.rpathLibs ++ [ xorg.libxcb.dev ];
|
||||
|
||||
# Tests requires `i_slint_backend_testing` which is only a dev dependency
|
||||
doCheck = false;
|
||||
|
||||
postInstall = lib.optionalString stdenv.hostPlatform.isLinux ''
|
||||
patchelf --set-rpath ${lib.makeLibraryPath rpathLibs} $out/bin/slint-lsp
|
||||
patchelf --set-rpath ${lib.makeLibraryPath finalAttrs.rpathLibs} $out/bin/slint-lsp
|
||||
'';
|
||||
|
||||
dontPatchELF = true;
|
||||
|
||||
meta = with lib; {
|
||||
doInstallCheck = true;
|
||||
nativeInstallCheckInputs = [ versionCheckHook ];
|
||||
|
||||
passthru.updateScript = nix-update-script { };
|
||||
|
||||
meta = {
|
||||
description = "Language Server Protocol (LSP) for Slint UI language";
|
||||
mainProgram = "slint-lsp";
|
||||
homepage = "https://slint-ui.com/";
|
||||
changelog = "https://github.com/slint-ui/slint/blob/v${version}/CHANGELOG.md";
|
||||
license = with licenses; [ gpl3Plus ];
|
||||
maintainers = with maintainers; [ xgroleau ];
|
||||
downloadPage = "https://github.com/slint-ui/slint/";
|
||||
changelog = "https://github.com/slint-ui/slint/blob/v${finalAttrs.version}/CHANGELOG.md";
|
||||
license = with lib.licenses; [ gpl3Plus ];
|
||||
maintainers = with lib.maintainers; [ xgroleau ];
|
||||
};
|
||||
}
|
||||
})
|
||||
|
||||
@@ -8712,17 +8712,6 @@ with pkgs;
|
||||
# pandoc takes long to build and documentation isn't needed for just running the cli
|
||||
shellcheck-minimal = haskell.lib.compose.justStaticExecutables shellcheck.unwrapped;
|
||||
|
||||
slint-lsp = callPackage ../by-name/sl/slint-lsp/package.nix {
|
||||
inherit (darwin.apple_sdk_11_0.frameworks)
|
||||
AppKit
|
||||
CoreGraphics
|
||||
CoreServices
|
||||
CoreText
|
||||
Foundation
|
||||
OpenGL
|
||||
;
|
||||
};
|
||||
|
||||
sloc = nodePackages.sloc;
|
||||
|
||||
slurm = callPackage ../by-name/sl/slurm/package.nix {
|
||||
|
||||
Reference in New Issue
Block a user