Skip to content

Commit c26249b

Browse files
committed
lapce: format with nixfmt-rfc-style
1 parent 896db32 commit c26249b

File tree

1 file changed

+50
-41
lines changed

1 file changed

+50
-41
lines changed

pkgs/applications/editors/lapce/default.nix

Lines changed: 50 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,25 @@
1-
{ lib
2-
, stdenv
3-
, fetchFromGitHub
4-
, nix-update-script
5-
, rustPlatform
6-
, cmake
7-
, pkg-config
8-
, perl
9-
, python3
10-
, fontconfig
11-
, glib
12-
, gtk3
13-
, openssl
14-
, libGL
15-
, libobjc
16-
, libxkbcommon
17-
, wrapGAppsHook3
18-
, wayland
19-
, gobject-introspection
20-
, xorg
21-
, apple-sdk_11
1+
{
2+
lib,
3+
stdenv,
4+
fetchFromGitHub,
5+
nix-update-script,
6+
rustPlatform,
7+
cmake,
8+
pkg-config,
9+
perl,
10+
python3,
11+
fontconfig,
12+
glib,
13+
gtk3,
14+
openssl,
15+
libGL,
16+
libobjc,
17+
libxkbcommon,
18+
wrapGAppsHook3,
19+
wayland,
20+
gobject-introspection,
21+
xorg,
22+
apple-sdk_11,
2223
}:
2324
let
2425
rpathLibs = lib.optionals stdenv.hostPlatform.isLinux [
@@ -81,29 +82,37 @@ rustPlatform.buildRustPackage rec {
8182
gobject-introspection
8283
];
8384

84-
buildInputs = rpathLibs ++ [
85-
glib
86-
gtk3
87-
openssl
88-
] ++ lib.optionals stdenv.hostPlatform.isLinux [
89-
fontconfig
90-
] ++ lib.optionals stdenv.hostPlatform.isDarwin [
91-
libobjc
92-
apple-sdk_11
93-
];
85+
buildInputs =
86+
rpathLibs
87+
++ [
88+
glib
89+
gtk3
90+
openssl
91+
]
92+
++ lib.optionals stdenv.hostPlatform.isLinux [
93+
fontconfig
94+
]
95+
++ lib.optionals stdenv.hostPlatform.isDarwin [
96+
libobjc
97+
apple-sdk_11
98+
];
9499

95-
postInstall = if stdenv.hostPlatform.isLinux then ''
96-
install -Dm0644 $src/extra/images/logo.svg $out/share/icons/hicolor/scalable/apps/dev.lapce.lapce.svg
97-
install -Dm0644 $src/extra/linux/dev.lapce.lapce.desktop $out/share/applications/lapce.desktop
100+
postInstall =
101+
if stdenv.hostPlatform.isLinux then
102+
''
103+
install -Dm0644 $src/extra/images/logo.svg $out/share/icons/hicolor/scalable/apps/dev.lapce.lapce.svg
104+
install -Dm0644 $src/extra/linux/dev.lapce.lapce.desktop $out/share/applications/lapce.desktop
98105
99-
$STRIP -S $out/bin/lapce
106+
$STRIP -S $out/bin/lapce
100107
101-
patchelf --add-rpath "${lib.makeLibraryPath rpathLibs}" $out/bin/lapce
102-
'' else ''
103-
mkdir $out/Applications
104-
cp -r extra/macos/Lapce.app $out/Applications
105-
ln -s $out/bin $out/Applications/Lapce.app/Contents/MacOS
106-
'';
108+
patchelf --add-rpath "${lib.makeLibraryPath rpathLibs}" $out/bin/lapce
109+
''
110+
else
111+
''
112+
mkdir $out/Applications
113+
cp -r extra/macos/Lapce.app $out/Applications
114+
ln -s $out/bin $out/Applications/Lapce.app/Contents/MacOS
115+
'';
107116

108117
dontPatchELF = true;
109118

0 commit comments

Comments
 (0)