1 {lib, stdenv, fetchurl}:
3 stdenv.mkDerivation rec {
7 url = "http://frodo.looijaard.name/system/files/software/getopt/getopt-${version}.tar.gz";
8 sha256 = "1zn5kp8ar853rin0ay2j3p17blxy16agpp8wi8wfg4x98b31vgyh";
11 # This should be fine on Linux and Darwin. Clang 16 requires it because otherwise getopt will
12 # attempt to use C library functions without declaring them, which is raised as an error.
13 env.NIX_CFLAGS_COMPILE = "-D__GNU_LIBRARY__";
18 "prefix=${placeholder "out"}"
23 platforms = lib.platforms.unix;
24 homepage = "http://frodo.looijaard.name/project/getopt";
25 description = "Parses command-line arguments from shell scripts";
26 mainProgram = "getopt";