lapce: format with nixfmt-rfc-style

This commit is contained in:
Olivér Falvai 2024-11-08 20:16:52 +01:00
parent 896db32853
commit c26249be9a
No known key found for this signature in database

View File

@ -1,24 +1,25 @@
{ lib {
, stdenv lib,
, fetchFromGitHub stdenv,
, nix-update-script fetchFromGitHub,
, rustPlatform nix-update-script,
, cmake rustPlatform,
, pkg-config cmake,
, perl pkg-config,
, python3 perl,
, fontconfig python3,
, glib fontconfig,
, gtk3 glib,
, openssl gtk3,
, libGL openssl,
, libobjc libGL,
, libxkbcommon libobjc,
, wrapGAppsHook3 libxkbcommon,
, wayland wrapGAppsHook3,
, gobject-introspection wayland,
, xorg gobject-introspection,
, apple-sdk_11 xorg,
apple-sdk_11,
}: }:
let let
rpathLibs = lib.optionals stdenv.hostPlatform.isLinux [ rpathLibs = lib.optionals stdenv.hostPlatform.isLinux [
@ -81,29 +82,37 @@ rustPlatform.buildRustPackage rec {
gobject-introspection gobject-introspection
]; ];
buildInputs = rpathLibs ++ [ buildInputs =
glib rpathLibs
gtk3 ++ [
openssl glib
] ++ lib.optionals stdenv.hostPlatform.isLinux [ gtk3
fontconfig openssl
] ++ lib.optionals stdenv.hostPlatform.isDarwin [ ]
libobjc ++ lib.optionals stdenv.hostPlatform.isLinux [
apple-sdk_11 fontconfig
]; ]
++ lib.optionals stdenv.hostPlatform.isDarwin [
libobjc
apple-sdk_11
];
postInstall = if stdenv.hostPlatform.isLinux then '' postInstall =
install -Dm0644 $src/extra/images/logo.svg $out/share/icons/hicolor/scalable/apps/dev.lapce.lapce.svg if stdenv.hostPlatform.isLinux then
install -Dm0644 $src/extra/linux/dev.lapce.lapce.desktop $out/share/applications/lapce.desktop ''
install -Dm0644 $src/extra/images/logo.svg $out/share/icons/hicolor/scalable/apps/dev.lapce.lapce.svg
install -Dm0644 $src/extra/linux/dev.lapce.lapce.desktop $out/share/applications/lapce.desktop
$STRIP -S $out/bin/lapce $STRIP -S $out/bin/lapce
patchelf --add-rpath "${lib.makeLibraryPath rpathLibs}" $out/bin/lapce patchelf --add-rpath "${lib.makeLibraryPath rpathLibs}" $out/bin/lapce
'' else '' ''
mkdir $out/Applications else
cp -r extra/macos/Lapce.app $out/Applications ''
ln -s $out/bin $out/Applications/Lapce.app/Contents/MacOS mkdir $out/Applications
''; cp -r extra/macos/Lapce.app $out/Applications
ln -s $out/bin $out/Applications/Lapce.app/Contents/MacOS
'';
dontPatchELF = true; dontPatchELF = true;