nixpkgs/pkgs/development/compilers/ocaml
Maximilian Bosch 8bc5104a6e
treewide: refactor .attrs.sh detection
When specifying the `builder` attribute in `stdenv.mkDerivation`, this
will be effectively transformed into

    builtins.derivation {
      builder = stdenv.shell;
      args = [ "-e" builder ];
    }

This also means that `default-builder.sh` is never sourced and as a
result it's not guaranteed that `$NIX_ATTRS_SH_FILE` is set to a correct
location[1].

Also, we need to source `.attrs.sh` to source `$stdenv`. So, the
following is done now:

* If `$NIX_ATTRS_SH_FILE` points to a correct location, then use it.
  Directly using `.attrs.sh` is problematic for `nix-shell(1)` usage
  (see previous commit for more context), so prefer the environment
  variable if possible.

* Otherwise, if `.attrs.sh` exists, then use it. See [1] for when this
  can happen.

* If neither applies, it can be assumed that `__structuredAttrs` is
  turned off and thus nothing needs to be done.

[1] It's possible that it doesn't exist at all - in case of Nix 2.3 or
    it can point to a wrong location on older Nix versions with a bug in
    `__structuredAttrs`.
2023-10-04 18:36:57 +02:00
..
4.00.1.nix treewide: move NIX_CFLAGS_COMPILE to the env attrset 2023-02-22 21:23:04 +02:00
4.01.0.nix treewide: move NIX_CFLAGS_COMPILE to the env attrset 2023-02-22 21:23:04 +02:00
4.02.nix treewide: move NIX_CFLAGS_COMPILE to the env attrset 2023-02-22 21:23:04 +02:00
4.03.nix treewide: move NIX_CFLAGS_COMPILE to the env attrset 2023-02-22 21:23:04 +02:00
4.04.nix treewide: move NIX_CFLAGS_COMPILE to the env attrset 2023-02-22 21:23:04 +02:00
4.05.nix treewide: move NIX_CFLAGS_COMPILE to the env attrset 2023-02-22 21:23:04 +02:00
4.06.nix treewide: move NIX_CFLAGS_COMPILE to the env attrset 2023-02-22 21:23:04 +02:00
4.07.nix treewide: move NIX_CFLAGS_COMPILE to the env attrset 2023-02-22 21:23:04 +02:00
4.08.nix treewide: move NIX_CFLAGS_COMPILE to the env attrset 2023-02-22 21:23:04 +02:00
4.09.1-Werror.patch ocaml-ng.ocamlPackages_4_09.ocaml: fix with GCC 12 2023-02-11 21:49:06 +00:00
4.09.nix ocaml-ng.ocamlPackages_4_09.ocaml: fix with GCC 12 2023-02-11 21:49:06 +00:00
4.10.nix
4.11.nix
4.12.nix
4.13.nix
4.14.nix ocaml: 4.14.0 -> 4.14.1 2023-03-01 12:20:49 +00:00
5.0.nix ocaml-ng.ocamlPackages_5_0: 5.0.0-rc1 -> 5.0.0 2022-12-17 15:39:28 +01:00
5.1.nix ocaml-ng.ocamlPackages_5_1.ocaml: 5.1.0-rc3 → 5.1.0 2023-09-15 08:57:27 +02:00
ber-metaocaml.nix ber_metaocaml: n107 -> n111 2022-05-26 09:41:10 +02:00
builder.sh treewide: refactor .attrs.sh detection 2023-10-04 18:36:57 +02:00
fix-clang-build-on-osx.diff
generic.nix Merge pull request #217568 from trofi/stdenv-parallel-install 2023-03-15 17:10:19 +00:00
glibc-2.34-for-ocaml-4.10-and-11.patch
Makefile.nixpkgs
ocamlbuild.patch