about summary refs log tree commit diff
path: root/pkgs/by-name/ha/halloy/package.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/by-name/ha/halloy/package.nix')
-rw-r--r--pkgs/by-name/ha/halloy/package.nix25
1 files changed, 19 insertions, 6 deletions
diff --git a/pkgs/by-name/ha/halloy/package.nix b/pkgs/by-name/ha/halloy/package.nix
index 7075d2a4a9a52..44fd206c57498 100644
--- a/pkgs/by-name/ha/halloy/package.nix
+++ b/pkgs/by-name/ha/halloy/package.nix
@@ -6,6 +6,7 @@
   copyDesktopItems,
   makeDesktopItem,
   libxkbcommon,
+  makeWrapper,
   openssl,
   pkg-config,
   rustPlatform,
@@ -16,26 +17,27 @@
 
 rustPlatform.buildRustPackage rec {
   pname = "halloy";
-  version = "2024.7";
+  version = "2024.8";
 
   src = fetchFromGitHub {
     owner = "squidowl";
     repo = "halloy";
     rev = "refs/tags/${version}";
-    hash = "sha256-CXuodMndUvltwjIiEdJuIazCYKqD/azROgSBTM6g87A=";
+    hash = "sha256-OxxXjenZjP+3KrkxyXYxOXRFmrYm3deeiCuGrhpnF2I=";
   };
 
   cargoLock = {
     lockFile = ./Cargo.lock;
     outputHashes = {
-      "glyphon-0.5.0" = "sha256-e1jTuaWh9eFdk2pDE4Ov/l3b/Q7GA3hqx6dPoOde1hM=";
-      "iced-0.13.0-dev" = "sha256-K1B9rVkShxQC97kwebHPsqJsJmxjEsFCKpg+p2lt09U=";
-      "winit-0.29.15" = "sha256-9i2i4KcEv7vIImJtcw2NALQ3uDb4EAZXjShG6tfmhkc=";
+      "dpi-0.1.1" = "sha256-25sOvEBhlIaekTeWvy3UhjPI1xrJbOQvw/OkTg12kQY=";
+      "glyphon-0.5.0" = "sha256-+z2my51aUeK9txLZKVAyQcWJ6f2YDY1mjxfc8Xsqi8E=";
+      "iced-0.13.0-dev" = "sha256-eHlauEZibbuqK5mdkNP6gsy1z9qxqEDn/xfFw7W5TcY=";
     };
   };
 
   nativeBuildInputs = [
     copyDesktopItems
+    makeWrapper
     pkg-config
   ];
 
@@ -102,6 +104,17 @@ 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.isDarwin ''
+    APP_DIR="$out/Applications/Halloy.app/Contents"
+
+    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"
+
+    makeWrapper "$out/bin/halloy" "$APP_DIR/MacOS/halloy"
   '';
 
   meta = with lib; {
@@ -109,7 +122,7 @@ rustPlatform.buildRustPackage rec {
     homepage = "https://github.com/squidowl/halloy";
     changelog = "https://github.com/squidowl/halloy/blob/${version}/CHANGELOG.md";
     license = licenses.gpl3Only;
-    maintainers = with maintainers; [ fab ];
+    maintainers = with maintainers; [ fab iivusly ];
     mainProgram = "halloy";
   };
 }