2022-03-30 09:31:56 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
2022-12-17 10:02:37 +00:00
|
|
|
, nix-update-script
|
2022-03-30 09:31:56 +00:00
|
|
|
, rustPlatform
|
|
|
|
, cmake
|
|
|
|
, pkg-config
|
|
|
|
, perl
|
|
|
|
, fontconfig
|
|
|
|
, copyDesktopItems
|
|
|
|
, makeDesktopItem
|
2022-07-14 12:49:19 +00:00
|
|
|
, glib
|
|
|
|
, gtk3
|
2022-04-27 09:35:20 +00:00
|
|
|
, openssl
|
|
|
|
, libobjc
|
|
|
|
, Security
|
|
|
|
, CoreServices
|
|
|
|
, ApplicationServices
|
|
|
|
, Carbon
|
|
|
|
, AppKit
|
2022-09-30 11:47:45 +00:00
|
|
|
, wrapGAppsHook
|
|
|
|
, gobject-introspection
|
2022-03-30 09:31:56 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "lapce";
|
2022-12-17 10:02:37 +00:00
|
|
|
version = "0.2.5";
|
2022-03-30 09:31:56 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "lapce";
|
|
|
|
repo = pname;
|
2022-12-17 10:02:37 +00:00
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "sha256-WFFn1l7d70x5v6jo5m+Thq1WoZjY7f8Lvr3U473xx48=";
|
2022-03-30 09:31:56 +00:00
|
|
|
};
|
|
|
|
|
2022-12-17 10:02:37 +00:00
|
|
|
cargoSha256 = "sha256-9e0pUztrIL5HGHrS2pHA1hkH2v24AEQ2RiogLRAxyeo=";
|
2022-03-30 09:31:56 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
|
|
|
pkg-config
|
|
|
|
perl
|
|
|
|
copyDesktopItems
|
2022-09-30 11:47:45 +00:00
|
|
|
wrapGAppsHook # FIX: No GSettings schemas are installed on the system
|
|
|
|
gobject-introspection
|
2022-03-30 09:31:56 +00:00
|
|
|
];
|
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
# Get openssl-sys to use pkg-config
|
|
|
|
OPENSSL_NO_VENDOR = 1;
|
|
|
|
|
2022-03-30 09:31:56 +00:00
|
|
|
buildInputs = [
|
2022-07-14 12:49:19 +00:00
|
|
|
glib
|
|
|
|
gtk3
|
2022-04-27 09:35:20 +00:00
|
|
|
openssl
|
|
|
|
] ++ lib.optionals stdenv.isLinux [
|
2022-03-30 09:31:56 +00:00
|
|
|
fontconfig
|
2022-04-27 09:35:20 +00:00
|
|
|
] ++ lib.optionals stdenv.isDarwin [
|
|
|
|
libobjc
|
|
|
|
Security
|
|
|
|
CoreServices
|
|
|
|
ApplicationServices
|
|
|
|
Carbon
|
|
|
|
AppKit
|
2022-03-30 09:31:56 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
install -Dm0644 $src/extra/images/logo.svg $out/share/icons/hicolor/scalable/apps/lapce.svg
|
|
|
|
'';
|
|
|
|
|
|
|
|
desktopItems = [ (makeDesktopItem {
|
|
|
|
name = "lapce";
|
|
|
|
exec = "lapce %F";
|
|
|
|
icon = "lapce";
|
|
|
|
desktopName = "Lapce";
|
|
|
|
comment = meta.description;
|
|
|
|
genericName = "Code Editor";
|
|
|
|
categories = [ "Development" "Utility" "TextEditor" ];
|
|
|
|
}) ];
|
|
|
|
|
2022-12-28 21:21:41 +00:00
|
|
|
passthru.updateScript = nix-update-script { };
|
2022-12-17 10:02:37 +00:00
|
|
|
|
2022-03-30 09:31:56 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Lightning-fast and Powerful Code Editor written in Rust";
|
|
|
|
homepage = "https://github.com/lapce/lapce";
|
|
|
|
license = with licenses; [ asl20 ];
|
|
|
|
maintainers = with maintainers; [ elliot ];
|
|
|
|
};
|
|
|
|
}
|