diff options
Diffstat (limited to 'infra/libkookie/nixpkgs/pkgs/development/compilers/ocaml/generic.nix')
-rw-r--r-- | infra/libkookie/nixpkgs/pkgs/development/compilers/ocaml/generic.nix | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/infra/libkookie/nixpkgs/pkgs/development/compilers/ocaml/generic.nix b/infra/libkookie/nixpkgs/pkgs/development/compilers/ocaml/generic.nix index 1558756e16b1..79aab1ffe831 100644 --- a/infra/libkookie/nixpkgs/pkgs/development/compilers/ocaml/generic.nix +++ b/infra/libkookie/nixpkgs/pkgs/development/compilers/ocaml/generic.nix @@ -1,12 +1,8 @@ { minor_version, major_version, patch_version -, url ? null -, sha256, ...}@args: +, ...}@args: let versionNoPatch = "${toString major_version}.${toString minor_version}"; version = "${versionNoPatch}.${toString patch_version}"; - real_url = if url == null then - "http://caml.inria.fr/pub/distrib/ocaml-${versionNoPatch}/ocaml-${version}.tar.xz" - else url; safeX11 = stdenv: !(stdenv.isAarch32 || stdenv.isMips); in @@ -23,6 +19,13 @@ assert flambdaSupport -> stdenv.lib.versionAtLeast version "4.03"; assert spaceTimeSupport -> stdenv.lib.versionAtLeast version "4.04"; let + src = args.src or (fetchurl { + url = args.url or "http://caml.inria.fr/pub/distrib/ocaml-${versionNoPatch}/ocaml-${version}.tar.xz"; + inherit (args) sha256; + }); +in + +let useNativeCompilers = !stdenv.isMips; inherit (stdenv.lib) optional optionals optionalString; name = "ocaml${optionalString aflSupport "+afl"}${optionalString spaceTimeSupport "+spacetime"}${optionalString flambdaSupport "+flambda"}-${version}"; @@ -39,10 +42,7 @@ stdenv.mkDerivation (args // { inherit name; inherit version; - src = fetchurl { - url = real_url; - inherit sha256; - }; + inherit src; prefixKey = "-prefix "; configureFlags = |