mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-25 23:23:07 +00:00
ff1a94e523
The nixpkgs-unstable channel's programs.sqlite was used to identify packages producing exactly one binary, and these automatically added to their package definitions wherever possible.
64 lines
1.4 KiB
Nix
64 lines
1.4 KiB
Nix
{ lib
|
|
, stdenv
|
|
, rustPlatform
|
|
, fetchCrate
|
|
, pkg-config
|
|
, cmake
|
|
, fontconfig
|
|
, libGL
|
|
, xorg
|
|
, libxkbcommon
|
|
, wayland
|
|
# Darwin Frameworks
|
|
, AppKit
|
|
, CoreGraphics
|
|
, CoreServices
|
|
, CoreText
|
|
, Foundation
|
|
, libiconv
|
|
, OpenGL
|
|
}:
|
|
|
|
let
|
|
rpathLibs = [ fontconfig libGL xorg.libxcb xorg.libX11 xorg.libXcursor xorg.libXrandr xorg.libXi ]
|
|
++ lib.optionals stdenv.isLinux [ libxkbcommon wayland ];
|
|
in
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "slint-lsp";
|
|
version = "1.5.0";
|
|
|
|
src = fetchCrate {
|
|
inherit pname version;
|
|
sha256 = "sha256-IkXjO4XGRT19kJRp+1tgPR8nyIVulV412HgS4rVuFhc=";
|
|
};
|
|
|
|
cargoHash = "sha256-vXip1m34kF4Jdz4FQa58/hepJRVnDyS5xGUja4+O7Lo=";
|
|
|
|
nativeBuildInputs = [ cmake pkg-config fontconfig ];
|
|
buildInputs = rpathLibs ++ [ xorg.libxcb.dev ]
|
|
++ lib.optionals stdenv.isDarwin [
|
|
AppKit
|
|
CoreGraphics
|
|
CoreServices
|
|
CoreText
|
|
Foundation
|
|
libiconv
|
|
OpenGL
|
|
];
|
|
|
|
postInstall = lib.optionalString stdenv.isLinux ''
|
|
patchelf --set-rpath ${lib.makeLibraryPath rpathLibs} $out/bin/slint-lsp
|
|
'';
|
|
|
|
dontPatchELF = true;
|
|
|
|
meta = with lib; {
|
|
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 ];
|
|
};
|
|
}
|