Commit Graph

8 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
John Wiegley 28b6fb61e6 Change occurrences of gcc to the more general cc
This is done for the sake of Yosemite, which does not have gcc, and yet
this change is also compatible with Linux.
2014-12-26 11:06:21 -06:00
Eelco Dolstra 704f7d6a2c adobe-reader: Unpack to $out/libexec/adobe-reader
This prevents polluting Nix profiles.
2012-11-08 16:31:08 +01:00
Eelco Dolstra 73ce1dd4bb * Adobe Reader: install .desktop file in the right place.
svn path=/nixpkgs/trunk/; revision=33297
2012-03-20 14:41:24 +00:00
Eelco Dolstra c556a6ea46 * "ensureDir" -> "mkdir -p". "ensureDir" is a rather pointless
function, so obsolete it.

svn path=/nixpkgs/branches/stdenv-updates/; revision=31644
2012-01-18 20:16:00 +00:00
Lluís Batlle i Rossell 0fe27433af 'tar' fails at unpacking adobe files, but the files get unpacked.
I simply disable the check for tar error codes.


svn path=/nixpkgs/branches/stdenv-updates/; revision=25067
2010-12-12 08:47:13 +00:00
Eelco Dolstra 8202de939d * Acrobat Reader -> Adobe Reader, and updated to version 9.0.1.
Removed the fastStart option; it seems to start fast enough without
  it nowadays.  Include CUPS in the RPATH so that the printer dialog
  box shows actual printers (especially useful since KDE 4 no longer
  include the kprinter program ;-).

svn path=/nixpkgs/trunk/; revision=15570
2009-05-12 14:49:01 +00:00