nixpkgs/pkgs/desktops/gnustep
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
..
back gnustep.back: use xorg.* packages directly instead of xlibsWrapper indirection 2022-12-03 20:21:25 +00:00
base gnustep.base: patch build after libxml2 update 2023-07-20 11:21:54 +02:00
gorm gnustep.gorm: 1.2.28 -> 1.3.1 2023-05-20 08:51:20 +00:00
gui
gworkspace
libobjc2 gnustep.libobjc: 1.9 -> 2.1 2022-10-13 21:55:13 +02:00
make treewide: refactor .attrs.sh detection 2023-10-04 18:36:57 +02:00
projectcenter gnustep.projectcenter: 0.6.2 -> 0.7.0 2023-03-24 15:07:56 +02:00
systempreferences
default.nix