Commit Graph

15 Commits

Author SHA1 Message Date
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
Artturin
c01f509e44 treewide: source .attrs in builders
if theres a source $stdenv then this is needed

for structuredAttrs
2022-12-08 21:09:02 +02:00
Andreas J
108521d406
update homepage link 2021-07-05 23:36:42 +03:00
Ben Siraphob
c522fec274 pkgs/development/tools: stdenv.lib -> lib 2021-01-23 20:30:03 +07:00
Michael Reilly
84cf00f980
treewide: Per RFC45, remove all unquoted URLs 2020-04-10 17:54:53 +01:00
volth
46420bbaa3 treewide: name -> pname (easy cases) (#66585)
treewide replacement of

stdenv.mkDerivation rec {
  name = "*-${version}";
  version = "*";

to pname
2019-08-15 13:41:18 +01:00
Matthew Bauer
290a5d916e treewide: update homepages to https where available
Based on "problems" from repology:

https://repology.org/repository/nix_unstable/problems

Mostly simple changes to reflect redirects.
2019-04-15 10:10:05 -04:00
André Stylianos Ramos
8014307c64 boot: 2.5.2 -> 2.7.2 2017-11-01 14:10:07 +01:00
Ragnar Dahlén
a25bfab690 boot: Update shell script version and remove makeWrapper usage 2016-01-04 17:23:45 +00:00
Danny Wilson
1ebc5bfa21 boot: 2.2.0 -> 2.4.2 2015-11-18 11:48:04 +01:00
Ragnar Dahlén
25bad2be17 boot: 2.0.0 -> 2.2.0 2015-08-05 11:54:40 +01:00
Stewart Mackenzie
f46bbbce49 boot: correct sha256 2015-07-19 02:33:43 +08:00
Ragnar Dahlén
9cb63367dc boot: Update version from 2.0.0-rc14 to 2.0.0. 2015-05-27 20:39:17 +01:00
Ragnar Dahlén
543ec3cf46 boot: bump from rc8 to rc14 2015-04-29 08:50:48 +01:00
Ragnar Dahlén
aaa6d79300 Clojure: boot: Add new derivation for boot build tooling 2015-01-30 09:33:55 +00:00