diff options
author | Mx Kookie <kookie@spacekookie.de> | 2020-12-09 18:55:19 +0000 |
---|---|---|
committer | Mx Kookie <kookie@spacekookie.de> | 2020-12-09 18:55:19 +0000 |
commit | 80d90d9b204f7c17912740f9f414fe5d59f293ba (patch) | |
tree | 5f2065a06e724270610760d59d01c6888b375a46 /infra/libkookie/nixpkgs/pkgs/development/compilers/ocaml/generic.nix | |
parent | 3a31a84c7d3e589035ad08499206aac44a81f424 (diff) | |
parent | 83cbad92d73216bb0d9187c56cce0b91f9121d5a (diff) |
Merge commit '83cbad92d73216bb0d9187c56cce0b91f9121d5a' into main
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 = |