Merge pull request #253382 from trofi/which-64-bit-file-api

which: enable 64-bit API on 32-bit systems
This commit is contained in:
Mario Rodas 2023-09-13 06:30:27 -05:00 committed by GitHub
commit 981538cca3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -12,6 +12,13 @@ stdenv.mkDerivation rec {
strictDeps = true;
enableParallelBuilding = true;
env.NIX_CFLAGS_COMPILE = toString (
# Enable 64-bit file API. Otherwise `which` fails to find tools
# on filesystems with 64-bit inodes (like `btrfs`) when running
# binaries from 32-bit systems (like `i686-linux`).
lib.optional stdenv.hostPlatform.is32bit "-D_FILE_OFFSET_BITS=64"
);
meta = with lib; {
homepage = "https://www.gnu.org/software/which/";
description = "Shows the full path of (shell) commands";