From 67899eb5e4cde31f6049537269cfdf5a9c62f63f Mon Sep 17 00:00:00 2001 From: ihaveahax Date: Fri, 10 Jan 2025 15:53:04 -0600 Subject: [PATCH 1/2] hactool: fix windows cross-compilation hactool was already building for Windows, but the install was failing on the .exe suffix. This also changes platforms to `platforms.all`. --- pkgs/by-name/ha/hactool/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/ha/hactool/package.nix b/pkgs/by-name/ha/hactool/package.nix index 815fdfb87c58..e38290f51285 100644 --- a/pkgs/by-name/ha/hactool/package.nix +++ b/pkgs/by-name/ha/hactool/package.nix @@ -25,7 +25,7 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; installPhase = '' - install -D hactool $out/bin/hactool + install -D hactool${stdenv.targetPlatform.extensions.executable} $out/bin/hactool${stdenv.targetPlatform.extensions.executable} ''; meta = with lib; { @@ -34,7 +34,7 @@ stdenv.mkDerivation rec { longDescription = "A tool to view information about, decrypt, and extract common file formats for the Nintendo Switch, especially Nintendo Content Archives"; license = licenses.isc; maintainers = [ ]; - platforms = platforms.unix; + platforms = platforms.all; mainProgram = "hactool"; }; } From a4ff967c5eac7a981f7cad1709bd691a8e2bbf70 Mon Sep 17 00:00:00 2001 From: ihaveahax Date: Fri, 10 Jan 2025 19:49:07 -0600 Subject: [PATCH 2/2] hactool: use hostPlatform instead of targetPlatform Co-authored-by: Weijia Wang <9713184+wegank@users.noreply.github.com> --- pkgs/by-name/ha/hactool/package.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/by-name/ha/hactool/package.nix b/pkgs/by-name/ha/hactool/package.nix index e38290f51285..8bc55829d8a5 100644 --- a/pkgs/by-name/ha/hactool/package.nix +++ b/pkgs/by-name/ha/hactool/package.nix @@ -25,7 +25,7 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; installPhase = '' - install -D hactool${stdenv.targetPlatform.extensions.executable} $out/bin/hactool${stdenv.targetPlatform.extensions.executable} + install -D hactool${stdenv.hostPlatform.extensions.executable} $out/bin/hactool${stdenv.hostPlatform.extensions.executable} ''; meta = with lib; {