From 90115aa3885fafee9699eb5e7168aca49912e531 Mon Sep 17 00:00:00 2001 From: Peter Retzlaff Date: Sun, 25 Feb 2024 20:02:17 +0100 Subject: [PATCH] squirreldisk: fix build for aarch64-linux The squirreldisk project does not contain a pdu binary for aarch64-linux, unfortunately. Therefore, use the pdu binary from nixpkgs and copy it to the project's binary directory _before_ building the Tauri project --- pkgs/by-name/sq/squirreldisk/package.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/sq/squirreldisk/package.nix b/pkgs/by-name/sq/squirreldisk/package.nix index aaf5e71afac1..6a0f2a639e56 100644 --- a/pkgs/by-name/sq/squirreldisk/package.nix +++ b/pkgs/by-name/sq/squirreldisk/package.nix @@ -12,6 +12,7 @@ buildNpmPackage, rustPlatform, lib, + stdenv, }: let pname = "squirreldisk"; version = "0.3.4"; @@ -57,6 +58,9 @@ in cp -r ${frontend-build}/* frontend-build substituteInPlace tauri.conf.json --replace-fail '"distDir": "../dist"' '"distDir": "./frontend-build"' + + # Copy pdu binary from nixpkgs, since the default packaged binary has issues. + cp ${parallel-disk-usage}/bin/pdu bin/pdu-${stdenv.hostPlatform.config} ''; nativeBuildInputs = [pkg-config wrapGAppsHook]; @@ -67,8 +71,6 @@ in postInstall = '' mv $out/bin/squirreldisk-tauri $out/bin/squirreldisk - # Use pdu binary from nixpkgs, since the default packaged binary has issues. - cp ${parallel-disk-usage}/bin/pdu $out/bin/pdu ''; # WEBKIT_DISABLE_COMPOSITING_MODE essential in NVIDIA + compositor https://github.com/NixOS/nixpkgs/issues/212064#issuecomment-1400202079