2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv, fetchurl }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2021-09-18 10:52:07 +00:00
|
|
|
pname = "which";
|
|
|
|
version = "2.21";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2021-09-18 10:52:07 +00:00
|
|
|
url = "mirror://gnu/which/which-${version}.tar.gz";
|
2023-11-16 04:20:00 +00:00
|
|
|
hash = "sha256-9KJFuUEks3fYtJZGv0IfkVXTaqdhS26/g3BdP/x26q0=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
strictDeps = true;
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
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"
|
|
|
|
);
|
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
meta = {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://www.gnu.org/software/which/";
|
|
|
|
description = "Shows the full path of (shell) commands";
|
2023-11-16 04:20:00 +00:00
|
|
|
license = lib.licenses.gpl3Plus;
|
|
|
|
mainProgram = "which";
|
|
|
|
platforms = lib.platforms.all;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|