halloy: fix darwin build
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
darwin,
|
||||
fetchFromGitHub,
|
||||
copyDesktopItems,
|
||||
makeDesktopItem,
|
||||
@@ -38,25 +37,17 @@ rustPlatform.buildRustPackage rec {
|
||||
|
||||
buildInputs =
|
||||
[
|
||||
openssl
|
||||
]
|
||||
++ lib.optionals stdenv.hostPlatform.isLinux [
|
||||
alsa-lib
|
||||
libxkbcommon
|
||||
openssl
|
||||
vulkan-loader
|
||||
wayland
|
||||
xorg.libX11
|
||||
xorg.libXcursor
|
||||
xorg.libXi
|
||||
]
|
||||
++ lib.optionals stdenv.hostPlatform.isDarwin [
|
||||
darwin.apple_sdk.frameworks.AppKit
|
||||
darwin.apple_sdk.frameworks.CoreFoundation
|
||||
darwin.apple_sdk.frameworks.CoreGraphics
|
||||
darwin.apple_sdk.frameworks.Cocoa
|
||||
darwin.apple_sdk.frameworks.Foundation
|
||||
darwin.apple_sdk.frameworks.Metal
|
||||
darwin.apple_sdk.frameworks.QuartzCore
|
||||
darwin.apple_sdk.frameworks.Security
|
||||
]
|
||||
++ lib.optionals stdenv.hostPlatform.isLinux [ wayland ];
|
||||
];
|
||||
|
||||
desktopItems = [
|
||||
(makeDesktopItem {
|
||||
@@ -97,28 +88,34 @@ rustPlatform.buildRustPackage rec {
|
||||
''
|
||||
);
|
||||
|
||||
postInstall = ''
|
||||
install -Dm644 assets/linux/icons/hicolor/128x128/apps/org.squidowl.halloy.png \
|
||||
$out/share/icons/hicolor/128x128/apps/org.squidowl.halloy.png
|
||||
'' + lib.optionalString stdenv.hostPlatform.isDarwin ''
|
||||
APP_DIR="$out/Applications/Halloy.app/Contents"
|
||||
postInstall =
|
||||
''
|
||||
install -Dm644 assets/linux/icons/hicolor/128x128/apps/org.squidowl.halloy.png \
|
||||
$out/share/icons/hicolor/128x128/apps/org.squidowl.halloy.png
|
||||
''
|
||||
+ lib.optionalString stdenv.hostPlatform.isDarwin ''
|
||||
APP_DIR="$out/Applications/Halloy.app/Contents"
|
||||
|
||||
mkdir -p "$APP_DIR/MacOS"
|
||||
cp -r ${src}/assets/macos/Halloy.app/Contents/* "$APP_DIR"
|
||||
mkdir -p "$APP_DIR/MacOS"
|
||||
cp -r ${src}/assets/macos/Halloy.app/Contents/* "$APP_DIR"
|
||||
|
||||
substituteInPlace "$APP_DIR/Info.plist" \
|
||||
--replace-fail "{{ VERSION }}" "${version}" \
|
||||
--replace-fail "{{ BUILD }}" "${version}-nixpkgs"
|
||||
substituteInPlace "$APP_DIR/Info.plist" \
|
||||
--replace-fail "{{ VERSION }}" "${version}" \
|
||||
--replace-fail "{{ BUILD }}" "${version}-nixpkgs"
|
||||
|
||||
makeWrapper "$out/bin/halloy" "$APP_DIR/MacOS/halloy"
|
||||
'';
|
||||
makeWrapper "$out/bin/halloy" "$APP_DIR/MacOS/halloy"
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "IRC application";
|
||||
homepage = "https://github.com/squidowl/halloy";
|
||||
changelog = "https://github.com/squidowl/halloy/blob/${version}/CHANGELOG.md";
|
||||
license = licenses.gpl3Only;
|
||||
maintainers = with maintainers; [ fab iivusly ivyfanchiang];
|
||||
maintainers = with maintainers; [
|
||||
fab
|
||||
iivusly
|
||||
ivyfanchiang
|
||||
];
|
||||
mainProgram = "halloy";
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user