Commit Graph

2333 Commits

Author SHA1 Message Date
Michael Alan Dorman
ef5ba4d5b2 Fix emacs wrapper expression to honor bash array use
In 8d76eff, @Ericson2314 changed the representation of the value that
`findInputs` generated from a whitespace-separated bunch strings to an
actual array of strings.

Expressions that *consume* that value, however, also needed to be
changed to iterate over all the contents of the array, else they would
only select the first value, which turns out to be somewhat limiting.

Fixes #27873
2017-08-04 07:52:18 -04:00
John Ericson
8ba6012dfd Merge PR #27536 2017-08-03 17:25:30 -04:00
John Ericson
cd6c452ade cc-wrapper: Don't hardcode MacOS min version for delegates 2017-08-03 16:37:27 -04:00
John Ericson
2e61d8b71c cc-wrapper: Handle more -l.... gotchas 2017-08-03 16:37:27 -04:00
Mathias Schreck
86d9b09c9b dockerTools: fix image json and manifest
The image json is not exactly the same as the layer json, therefore I
changed the implementation to use the `baseJson` which doesn’t include
layer specific details like `id`, `size` or the checksum of the layer.

Also the `history` entry was missing in the image json. I’m not totally
sure if this field is required, but a I got an error from a docker
registry when I’ve tried to receive the distribution manifest of an
image without those `history` entry:

GET: `http://<registry-host>/v2/<imageName>/manifests/<imageTag>`

```json
{
  "errors": [
    {
      "code": "MANIFEST_INVALID",
      "message": "manifest invalid",
      "detail": {}
    }
  ]
}
```

I’ve also used a while loop to iterate over all layers which should make
sure that the order of the layers is correct. Previously `find` was
used and I’m not sure if the order was always correct.
2017-08-03 11:52:03 +02:00
John Ericson
1cd74ac70a cc-wrapper: Make sure symbol tables of child delegators is not empty
As described in https://github.com/NixOS/nixpkgs/issues/18461, MacOS no
longer accepts dylibs which only reexport other dylibs, because their
symbol tables are empty. To get around this, we define an object file
with a single "private extern" symbol, which hopefully won't clobber
anything.
2017-07-31 17:02:56 -04:00
John Ericson
9242c8b331 cc-wrapper: Use two scripts instead of patch 2017-07-31 17:02:56 -04:00
John Ericson
0c37778c2c cc-wrapper: WIP linking hack for mac OS
Probably best to override Haskell packages set, or anything else
linking a lot of libraries, with this.
2017-07-31 17:02:56 -04:00
Antoine Eiche
9082b66096 dockerTools: fix permissions on base image
If the base image has been built with nixpkgs.dockerTools, the image
configuration and manifest are readonly so we first need to change
their permissions before removing them.

Fix #27632.
2017-07-31 13:52:35 +02:00
Frederik Rietdijk
740d76371e Merge commit 'ba68231273bea4cba01413fd2a0e56d68db9234c' into HEAD 2017-07-31 09:12:15 +02:00
Peter Hoeg
7aedfc1df8 Merge pull request #27775 from rvl/bower2nix-issue-13
fetchbower: handle packages with slashes in their name
2017-07-31 01:02:29 +08:00
Frederik Rietdijk
55357de67a Merge remote-tracking branch 'upstream/master' into HEAD 2017-07-28 19:37:36 +02:00
Eelco Dolstra
5c5b71df5e
Add a setup hook to fill NIX_DEBUG_INFO_DIRS
This setup hook is propagated by gdb. Thus, a typical use is:

  $ nix-shell -p gdb nix nix.debug sqlite.debug ...

and gdb will be able find the debug symbols of nix etc. automatically.
2017-07-28 16:38:26 +02:00
Franz Pletz
b116fa5ff2
Merge branch 'master' into staging 2017-07-28 16:08:30 +02:00
Rodney Lorrimar
efaec90f60 fetchbower: handle packages with slashes in their name
Packages from github repos have slashes in their name. Nix store names
shouldn't have slashes.

Fixes rvl/bower2nix#13
2017-07-27 21:18:43 +01:00
Eelco Dolstra
63d7b6ee29
makeImageFromDebDist: Add extraDebs arguments
This allows adding packages that are not part of the distribution, e.g.g

  extraDebs = [
    (pkgs.fetchurl {
      name = "openjdk.deb";
      url = http://ppa.launchpad.net/openjdk-r/ppa/ubuntu/pool/main/o/openjdk-8/openjdk-8-jdk-headless_8u111-b14-3~14.04.1_amd64.deb;
      sha256 = "1n5ibpkx9pjmc4nr052rls1yqbq7ckav2rabixjhd4yxbyhjl0ap";
    })
  ];
2017-07-27 20:34:24 +02:00
Antoine Eiche
9ee7e8b67e docker: generate the image configuration and manifest
This is required to push images to the Docker registry v2.
2017-07-26 23:05:29 +02:00
Antoine Eiche
8a431e13b5 docker: Remove ./ pattern when packing an image
Elements in images tar.gz generated by docker don't start by './'.
2017-07-26 23:05:29 +02:00
Eelco Dolstra
a7c8f5e419
debian: 8.8 -> 8.9 2017-07-26 20:02:17 +02:00
Antoine Eiche
0a4c43065c docker: do not import configuration and manifest from the base image
Fix #27632.
2017-07-26 20:01:41 +02:00
John Ericson
9be40841ea Merge remote-tracking branch 'upstream/master' into staging-base
Conflicts:
	pkgs/build-support/cc-wrapper/default.nix
	pkgs/build-support/gcc-wrapper-old/builder.sh
	pkgs/build-support/trivial-builders.nix
	pkgs/desktops/kde-4.14/kde-package/default.nix
	pkgs/development/compilers/openjdk-darwin/8.nix
	pkgs/development/compilers/openjdk-darwin/default.nix
	pkgs/development/compilers/openjdk/7.nix
	pkgs/development/compilers/openjdk/8.nix
	pkgs/development/compilers/oraclejdk/jdk-linux-base.nix
	pkgs/development/compilers/zulu/default.nix
	pkgs/development/haskell-modules/generic-builder.nix
	pkgs/misc/misc.nix
	pkgs/stdenv/generic/builder.sh
	pkgs/stdenv/generic/setup.sh
2017-07-26 13:46:04 -04:00
John Ericson
ea7d13cf1a stdenv-setup and misc hooks: Work with bash-3.4 for MacOS nix-shell
This is a temporary measure until this impurity is removed from Nix.
2017-07-26 09:08:01 -04:00
John Ericson
f6f40e3fe5 stdenv-setup and misc pkgs: Revert to space-deliminated propagated-* files
We cannot switch to line-delimited yet, because certain Nix commands do
not read in the entire file, but just the first line.
2017-07-26 09:07:55 -04:00
Robin Gloster
100107a3cd fetchpatch: add excludes parameter 2017-07-26 13:32:59 +02:00
Eelco Dolstra
47821f1cf0
cc-wrapper: More quadratic performance fixes
This eliminates the slow lookup of whether we've already seen an rpath
/ library path entry.

Issue #27609.
2017-07-25 18:46:49 +02:00
Antoine Eiche
e28d817c9a docker: lowercase image name and tag
The docker loading (docker 1.12.6) of an image with uppercase in the
name fails with the following message:
invalid reference format: repository name must be lowercase
2017-07-25 10:47:51 +02:00
Eelco Dolstra
aa4a92d2df
cc-wrapper/ld-wrapper: Minor speedup in string concatenation
There is still a O(n) pattern match in ld-wrapper, so we should
probably rewrite that code to use associative arrays.
2017-07-24 14:48:26 +02:00
John Ericson
b087618ac0 Revert "stdenv: Store one package per line in nix-support/propagated-*"
As @oxij points out in [1], this breakage is especially serious because
it changes the contents of built environments without a corresonding
change in their hashes. Also, the revert is easier than I thought.

This reverts commit 3cb745d5a6.

[1]: https://github.com/NixOS/nixpkgs/pull/27427#issuecomment-317293040
2017-07-24 01:05:30 -04:00
Frederik Rietdijk
29f91c107f Merge remote-tracking branch 'upstream/master' into HEAD 2017-07-23 11:23:43 +02:00
Thomas Tuegel
6a004bf9c8
Merge branch 'master' into bugfix/staging/stdenv 2017-07-21 20:36:34 -05:00
Thomas Tuegel
c25199f697
fetchurl: remove unpaired call to `stopNest'
Fixes #27406.

Commit 5d4efb2c81 added an assertion to `stopNest'
which requires it be correctly paired with `startNest'. `fetchurl' calls
`stopNest', but never calls `startNest'; the former calls are removed.
2017-07-21 15:45:29 -05:00
Shea Levy
1ea9a69376 Merge branch 'll-fix-fetchzip-darwin' of https://github.com/obsidiansystems/nixpkgs 2017-07-18 09:06:11 -04:00
Jamey Sharp
09bae7cb70 build-fhs-userenv: Propagate $XAUTHORITY
The `DISPLAY` environment variable is propagated into chroots built with
`buildFHSUserEnv`, but currently the `XAUTHORITY` variable is not. When
the latter is set, its value is usually necessary in order to connect to
the X server identified by the former.

This matters for users running gdm3, for example, who have `XAUTHORITY`
set to something like `/run/user/1000/gdm/Xauthority` instead of the X
default of `~/.Xauthority`, which doesn't exist in that setup.

Fixes #21532.
2017-07-18 00:03:22 -07:00
Thomas Tuegel
54520fce77 Merge pull request #27427 from ttuegel/bugfix/buildenv-propagated
buildenv: read propagated-user-env-packages line-by-line
2017-07-17 16:20:36 -05:00
luigy
eb6c45bcae Fix #27448 argument list too long in fetchzip for darwin.
Paired with @Ericson2314
2017-07-17 11:23:20 -04:00
Frederik Rietdijk
3eceecb90d Merge remote-tracking branch 'upstream/master' into HEAD 2017-07-17 13:52:01 +02:00
Thomas Tuegel
dce958ac39
buildenv: read propagated-user-env-packages line-by-line
Since 3cb745d5a6, the format of
propagated-user-env-packages has changed and propagated packages have not been
included by buildenv, including in the system environment.

The buildenv builder is modified to read propagated-user-env-packages
line-by-line, instead of expecting all packages on one line.
2017-07-16 16:06:06 -05:00
John Ericson
21136311c4 Merge pull request #27415 from obsidiansystems/cc-wrapper-prefix-binutils
cc-wrapper: Always export environment variables for binutils
2017-07-16 11:21:39 -04:00
John Ericson
3739858571 cc-wrapper: Use new bash uppercase subsitution syntax in setup hook
While this requires newer bash, stdenv's setup.sh now does across the
board anyways. This way is more concise.
2017-07-15 20:33:10 -04:00
John Ericson
093cc00cdd cc-wrapper: Always export environment variables for binutils
Before, this only happened when cross compiling.
2017-07-15 16:01:03 -04:00
Daiderd Jordan
90ff6b1d03 Merge pull request #27017 from LnL7/docker-pure-layer
docker-tools: set user/group when creating a pure layer
2017-07-15 12:22:53 +02:00
Vladimír Čunát
e2b7b09960
Merge branch 'master' into staging 2017-07-15 12:15:56 +02:00
John Ericson
aca5ba405e cc-wrapper: Unify and improve dynamic linker flag logic
Besides deduplicating overlapping logic, clear warning messages were
added for:

 - No glob/path for dynamic linker provided (use default glob)

 - Glob did not expand to anything (don't append flag)

 - glob expanded to multiple things (take first, like before)
2017-07-14 15:21:34 -04:00
Jörg Thalheim
ce39a9c837 Merge pull request #27160 from bkchr/makeautostartitem_fix
make-autostartitem: Use the right path for storing the desktop files
2017-07-14 13:47:13 +01:00
Domen Kožar
0eb4f6fd25
Merge commit 'a889454869e4f7d5ba6067ebcc0ba7fcd26e4417'
Merge staging. It includes fixes for cc-wrapper parsing speed and
some other minor things.

http://hydra.nixos.org/eval/1375094
2017-07-14 11:55:41 +02:00
Sarah Brofeldt
9e61958399 tarsum: Fix source path in docker.src 2017-07-13 23:09:04 +02:00
John Ericson
3cb745d5a6 stdenv: Store one package per line in nix-support/propagated-*
This makes those files a bit easier to read. Also, for what it's worth,
it brings us one baby step closer to handling spaces in store paths.

Also, I optimized handling of many transitive deps with read. Probably,
not very beneficial, but nice to enforce the pkg-per-line structure.
Doing so let me find much dubious code and fix it.

Two misc notes:

 - `propagated-user-env-packages` also needed to be adjusted as
   sometimes it is copied to/from the propagated input files.

 - `local fd` should ensure that file descriptors aren't clobbered
   during recursion.
2017-07-10 13:32:13 -04:00
Vladimír Čunát
986c17727e
Merge: more compatibility for git* fetchers
They're additional commits from #26877.
Changing names of the fetched stuff was changing very many hashes,
and I think it's better to avoid that for the moment to reduce work
needed by nixpkgs users.  The fetchers are expected to be commonly
used even outside nixpkgs, and the current naming wasn't that bad
usually.

(commit analogical to d10c3cc5eedf58e80e2; I haven't noticed the part of
the PR has already got to master)
2017-07-09 10:31:24 +02:00
Daiderd Jordan
980346592c
Merge branch 'staging' into master 2017-07-08 22:22:17 +02:00
Daiderd Jordan
83fbc0f035
docker-tools: fixup permssions for extraCommands 2017-07-08 13:57:04 +02:00