diff --git a/pkgs/development/libraries/fftw/default.nix b/pkgs/development/libraries/fftw/default.nix index a7a02521c69c..6b92848fd0f7 100644 --- a/pkgs/development/libraries/fftw/default.nix +++ b/pkgs/development/libraries/fftw/default.nix @@ -1,24 +1,34 @@ -{ fetchurl, stdenv, lib, precision ? "double" }: +{ fetchFromGitHub , stdenv, lib, ocaml, perl, indent, transfig, ghostscript, texinfo, libtool, gettext, automake, autoconf, precision ? "double" }: with lib; assert elem precision [ "single" "double" "long-double" "quad-precision" ]; -let version = "3.3.4"; in +let version = "3.3.5-rc1"; in stdenv.mkDerivation rec { name = "fftw-${precision}-${version}"; - src = fetchurl { - url = "ftp://ftp.fftw.org/pub/fftw/fftw-${version}.tar.gz"; - sha256 = "10h9mzjxnwlsjziah4lri85scc05rlajz39nqf3mbh4vja8dw34g"; + src = fetchFromGitHub { + owner = "FFTW"; + repo = "fftw3"; + rev = "fftw-${version}"; + sha256 = "1gc57xvdqbapq30ylj3fxwkv61la4kzyf7ji0q0xqjwpji2ynqi4"; }; + nativeBuildInputs = [ ocaml perl indent transfig ghostscript texinfo libtool gettext automake autoconf ]; + + # remove the ./configure lines, so we can use nix's configureFlags + patchPhase = "sed -e '27,29d' -i bootstrap.sh"; + + preConfigurePhases = "./bootstrap.sh"; + outputs = [ "dev" "out" "doc" ]; # it's dev-doc only outputBin = "dev"; # fftw-wisdom configureFlags = - [ "--enable-shared" "--disable-static" + [ "--enable-maintainer-mode" + "--enable-shared" "--disable-static" "--enable-threads" ] ++ optional (precision != "double") "--enable-${precision}"