Skip to content

Commit bc63a2f

Browse files
authored
lapce: unbreak x86_64-darwin (#354566)
2 parents dcdd61e + c26249b commit bc63a2f

File tree

2 files changed

+50
-52
lines changed

2 files changed

+50
-52
lines changed

pkgs/applications/editors/lapce/default.nix

Lines changed: 50 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +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-
, Security
18-
, CoreServices
19-
, ApplicationServices
20-
, Carbon
21-
, AppKit
22-
, wrapGAppsHook3
23-
, wayland
24-
, gobject-introspection
25-
, xorg
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,
2623
}:
2724
let
2825
rpathLibs = lib.optionals stdenv.hostPlatform.isLinux [
@@ -85,33 +82,37 @@ rustPlatform.buildRustPackage rec {
8582
gobject-introspection
8683
];
8784

88-
buildInputs = rpathLibs ++ [
89-
glib
90-
gtk3
91-
openssl
92-
] ++ lib.optionals stdenv.hostPlatform.isLinux [
93-
fontconfig
94-
] ++ lib.optionals stdenv.hostPlatform.isDarwin [
95-
libobjc
96-
Security
97-
CoreServices
98-
ApplicationServices
99-
Carbon
100-
AppKit
101-
];
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+
];
10299

103-
postInstall = if stdenv.hostPlatform.isLinux then ''
104-
install -Dm0644 $src/extra/images/logo.svg $out/share/icons/hicolor/scalable/apps/dev.lapce.lapce.svg
105-
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
106105
107-
$STRIP -S $out/bin/lapce
106+
$STRIP -S $out/bin/lapce
108107
109-
patchelf --add-rpath "${lib.makeLibraryPath rpathLibs}" $out/bin/lapce
110-
'' else ''
111-
mkdir $out/Applications
112-
cp -r extra/macos/Lapce.app $out/Applications
113-
ln -s $out/bin $out/Applications/Lapce.app/Contents/MacOS
114-
'';
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+
'';
115116

116117
dontPatchELF = true;
117118

@@ -124,7 +125,5 @@ rustPlatform.buildRustPackage rec {
124125
license = with licenses; [ asl20 ];
125126
maintainers = with maintainers; [ elliot ];
126127
mainProgram = "lapce";
127-
# Undefined symbols for architecture x86_64: "_NSPasteboardTypeFileURL"
128-
broken = stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64;
129128
};
130129
}

pkgs/top-level/all-packages.nix

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2598,7 +2598,6 @@ with pkgs;
25982598

25992599
lapce = callPackage ../applications/editors/lapce {
26002600
inherit (darwin) libobjc;
2601-
inherit (darwin.apple_sdk.frameworks) Security CoreServices ApplicationServices Carbon AppKit;
26022601
};
26032602

26042603
languagetool-rust = callPackage ../tools/text/languagetool-rust {

0 commit comments

Comments
 (0)