2023-07-02 10:28:07 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, darwin
|
|
|
|
, fetchFromGitHub
|
2023-07-12 20:53:42 +00:00
|
|
|
, copyDesktopItems
|
|
|
|
, makeDesktopItem
|
2023-07-02 10:28:07 +00:00
|
|
|
, libxkbcommon
|
|
|
|
, openssl
|
|
|
|
, pkg-config
|
|
|
|
, rustPlatform
|
|
|
|
, vulkan-loader
|
|
|
|
, wayland
|
|
|
|
, xorg
|
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "halloy";
|
2024-03-10 08:46:53 +00:00
|
|
|
version = "2024.3";
|
2023-07-02 10:28:07 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "squidowl";
|
|
|
|
repo = "halloy";
|
|
|
|
rev = "refs/tags/${version}";
|
2024-03-10 08:46:53 +00:00
|
|
|
hash = "sha256-9yEkM65c8R71oQ0C54xZqwRh609+HSaq4Hb8izNM52A=";
|
2023-07-02 10:28:07 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
cargoLock = {
|
|
|
|
lockFile = ./Cargo.lock;
|
|
|
|
outputHashes = {
|
2024-02-13 13:26:20 +00:00
|
|
|
"iced-0.12.0" = "sha256-LtmAJDUMp42S4E+CjOM6Q7doAKOZkmJCN/49gsq3v/A=";
|
|
|
|
"winit-0.29.10" = "sha256-YoXJEvEhMvk3pK5EbXceVFeJEJLL6KTjiw0kBJxgHIE=";
|
2023-07-02 10:28:07 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
2023-07-12 20:53:42 +00:00
|
|
|
copyDesktopItems
|
2023-07-02 10:28:07 +00:00
|
|
|
pkg-config
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
libxkbcommon
|
|
|
|
openssl
|
|
|
|
vulkan-loader
|
|
|
|
xorg.libX11
|
|
|
|
xorg.libXcursor
|
|
|
|
xorg.libXi
|
|
|
|
xorg.libXrandr
|
|
|
|
] ++ lib.optionals stdenv.isDarwin [
|
|
|
|
darwin.apple_sdk.frameworks.AppKit
|
|
|
|
darwin.apple_sdk.frameworks.CoreFoundation
|
|
|
|
darwin.apple_sdk.frameworks.CoreGraphics
|
2024-03-06 19:12:49 +00:00
|
|
|
darwin.apple_sdk.frameworks.Cocoa
|
2023-07-02 10:28:07 +00:00
|
|
|
darwin.apple_sdk.frameworks.Foundation
|
|
|
|
darwin.apple_sdk.frameworks.Metal
|
|
|
|
darwin.apple_sdk.frameworks.QuartzCore
|
|
|
|
darwin.apple_sdk.frameworks.Security
|
|
|
|
] ++ lib.optionals stdenv.isLinux [
|
|
|
|
wayland
|
|
|
|
];
|
|
|
|
|
2023-07-12 20:53:42 +00:00
|
|
|
desktopItems = [
|
|
|
|
(makeDesktopItem {
|
|
|
|
name = "org.squidowl.halloy";
|
|
|
|
desktopName = "Halloy";
|
|
|
|
comment = "IRC client written in Rust";
|
|
|
|
icon = "org.squidowl.halloy";
|
|
|
|
exec = pname;
|
|
|
|
terminal = false;
|
|
|
|
mimeTypes = [ "x-scheme-handler/irc" "x-scheme-handler/ircs" ];
|
|
|
|
categories = [ "Network" "IRCClient" ];
|
|
|
|
keywords = [ "IM" "Chat" ];
|
|
|
|
startupWMClass = "org.squidowl.halloy";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2024-02-15 10:46:09 +00:00
|
|
|
postFixup = lib.optional stdenv.isLinux (
|
|
|
|
let
|
|
|
|
rpathWayland = lib.makeLibraryPath [ wayland vulkan-loader libxkbcommon ];
|
|
|
|
in
|
|
|
|
''
|
|
|
|
rpath=$(patchelf --print-rpath $out/bin/halloy)
|
|
|
|
patchelf --set-rpath "$rpath:${rpathWayland}" $out/bin/halloy
|
|
|
|
'');
|
|
|
|
|
2023-07-12 20:53:42 +00:00
|
|
|
postInstall = ''
|
|
|
|
install -Dm644 assets/linux/org.squidowl.halloy.png $out/share/icons/hicolor/128x128/apps/org.squidowl.halloy.png
|
|
|
|
'';
|
|
|
|
|
2023-07-02 10:28:07 +00:00
|
|
|
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 ];
|
2024-02-07 11:01:20 +00:00
|
|
|
mainProgram = "halloy";
|
2023-07-02 10:28:07 +00:00
|
|
|
};
|
|
|
|
}
|