diff --git a/pkgs/tools/misc/getopt/builder.sh b/pkgs/tools/misc/getopt/builder.sh deleted file mode 100644 index a220ad0c66fb..000000000000 --- a/pkgs/tools/misc/getopt/builder.sh +++ /dev/null @@ -1,4 +0,0 @@ -source $stdenv/setup -installFlags="prefix=$out" -makeFlags="CFLAGS=-DWITHOUT_GETTEXT LIBCGETOPT=0" -genericBuild diff --git a/pkgs/tools/misc/getopt/default.nix b/pkgs/tools/misc/getopt/default.nix index 8221bec6ccab..62414a604756 100644 --- a/pkgs/tools/misc/getopt/default.nix +++ b/pkgs/tools/misc/getopt/default.nix @@ -1,15 +1,19 @@ {stdenv, fetchurl}: -stdenv.mkDerivation { - name = "getopt-1.1.4"; - builder = ./builder.sh; +stdenv.mkDerivation rec { + pname = "getopt"; + version = "1.1.6"; src = fetchurl { - url = http://tarballs.nixos.org/getopt-1.1.4.tar.gz; - sha256 = "1arvjfzw6p310zbgv629w5hkyslrj44imf3r3s2r4ry2jfcks221"; + url = "http://frodo.looijaard.name/system/files/software/${pname}/${pname}-${version}.tar.gz"; + sha256 = "1zn5kp8ar853rin0ay2j3p17blxy16agpp8wi8wfg4x98b31vgyh"; }; - preBuild = '' - export buildFlags=CC="$CC" # for darwin - ''; + + makeFlags = [ + "WITHOUT_GETTEXT=1" + "LIBCGETOPT=0" + "prefix=${placeholder "out"}" + "CC:=$(CC)" + ]; meta = { platforms = stdenv.lib.platforms.unix;