From 3151d1affcddc2b0d1a8edbbe3d9a21b43eb0a6b Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Fri, 20 Jan 2023 19:41:27 +0000 Subject: [PATCH 1/2] fatsort: clarify license --- pkgs/tools/filesystems/fatsort/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/tools/filesystems/fatsort/default.nix b/pkgs/tools/filesystems/fatsort/default.nix index d01ebce489c8..d4ef4c744da4 100644 --- a/pkgs/tools/filesystems/fatsort/default.nix +++ b/pkgs/tools/filesystems/fatsort/default.nix @@ -35,7 +35,7 @@ stdenv.mkDerivation rec { homepage = "http://fatsort.sourceforge.net/"; description = "Sorts FAT partition table, for devices that don't do sorting of files"; maintainers = [ maintainers.kovirobi ]; - license = licenses.gpl2; + license = licenses.gpl2Plus; platforms = platforms.unix; }; } From 09e702a5058d50a582443276fd4efcd84ca1a19e Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Fri, 20 Jan 2023 21:13:57 +0000 Subject: [PATCH 2/2] fatsort: fix build for cross FreeBSD libiconv is already defined per-platform. The actual libiconv library won't be built on platforms like Linux where it doesn't need to be, so there's no need to maintain a separate platform list here. We have to override the uname values, or they'll be detected for the build platform, because the build system just runs uname(1). Tested by cross compiling to x86_64-freebsd from x86_64-linux. --- pkgs/tools/filesystems/fatsort/default.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/filesystems/fatsort/default.nix b/pkgs/tools/filesystems/fatsort/default.nix index d4ef4c744da4..2ca135704e0c 100644 --- a/pkgs/tools/filesystems/fatsort/default.nix +++ b/pkgs/tools/filesystems/fatsort/default.nix @@ -14,12 +14,14 @@ stdenv.mkDerivation rec { sha256 = "sha256-mm+JoGQLt4LYL/I6eAyfCuw9++RoLAqO2hV+CBBkLq0="; }; - buildInputs = [ help2man ] - ++ lib.optionals stdenv.isDarwin [ libiconv ]; + buildInputs = [ help2man libiconv ]; makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" "LD=${stdenv.cc.targetPrefix}cc" + + "UNAME_O=${stdenv.hostPlatform.uname.system}" + "UNAME_S=${stdenv.hostPlatform.uname.system}" ]; # make install target is broken (DESTDIR usage is insane)