diff --git a/pkgs/by-name/ha/halloy/package.nix b/pkgs/by-name/ha/halloy/package.nix index 17c92f3ef323..ebab765aeb55 100644 --- a/pkgs/by-name/ha/halloy/package.nix +++ b/pkgs/by-name/ha/halloy/package.nix @@ -1,12 +1,12 @@ { lib, stdenv, - darwin, fetchFromGitHub, copyDesktopItems, makeDesktopItem, libxkbcommon, makeWrapper, + nix-update-script, openssl, pkg-config, rustPlatform, @@ -38,25 +38,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 +89,36 @@ 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" + ''; + + passthru.updateScript = nix-update-script { }; 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"; }; }