diff options
author | Alyssa Ross <hi@alyssa.is> | 2023-01-20 21:13:57 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2023-01-25 19:31:46 +0000 |
commit | 09e702a5058d50a582443276fd4efcd84ca1a19e (patch) | |
tree | 4153df833115901f1a378dca1c4c7de98626c0ff /pkgs/tools/filesystems/fatsort | |
parent | 3151d1affcddc2b0d1a8edbbe3d9a21b43eb0a6b (diff) | |
download | nixlib-09e702a5058d50a582443276fd4efcd84ca1a19e.tar nixlib-09e702a5058d50a582443276fd4efcd84ca1a19e.tar.gz nixlib-09e702a5058d50a582443276fd4efcd84ca1a19e.tar.bz2 nixlib-09e702a5058d50a582443276fd4efcd84ca1a19e.tar.lz nixlib-09e702a5058d50a582443276fd4efcd84ca1a19e.tar.xz nixlib-09e702a5058d50a582443276fd4efcd84ca1a19e.tar.zst nixlib-09e702a5058d50a582443276fd4efcd84ca1a19e.zip |
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.
Diffstat (limited to 'pkgs/tools/filesystems/fatsort')
-rw-r--r-- | pkgs/tools/filesystems/fatsort/default.nix | 6 |
1 files 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) |