Commit graph

4582 commits

Author SHA1 Message Date
Ben Siraphob 82454e9df8 treewide: remove implicit use of stdenv.lib 2021-01-27 20:04:57 +07:00
Sandro 2ee93d61ad
Merge pull request #110913 from siraben/other-stdenv-lib 2021-01-27 10:13:05 +01:00
Ben Siraphob 36c91cea1d treewide: stdenv.lib -> lib 2021-01-27 13:08:40 +07:00
Ben Siraphob 02ee14b9d5 treewide: stdenvNoCC.lib -> lib 2021-01-27 13:01:51 +07:00
Daniël de Kok f46bfb972d emacs.pkgs.trivialBuild: add missing stdenv argument
Fix fallout of #110687 (generic.nix requires stdenv).
2021-01-26 16:15:03 +01:00
Vladimír Čunát a648a07c19
Merge #104742: linux bootstrap tools: fix tests on ppc64 2021-01-26 08:09:59 +01:00
André Silva 34fae590bf
build-fhs-userenv-bubblewrap: don't bind /etc/fonts from fhs environment 2021-01-26 00:53:59 +00:00
André Silva fe49d856b0
build-fhs-userenv: bind /etc/profiles 2021-01-26 00:41:50 +00:00
André Silva 65de42b9cc
build-fhs-userenv-bubblewrap: remove unused variable 2021-01-26 00:41:01 +00:00
Guillaume Girol 7f355dcc4e
Merge pull request #108427 from symphorien/chdir-appimage
appimage-run: fix #108426
2021-01-25 18:18:42 +00:00
Pavol Rusnak a6ce00c50c
treewide: remove stdenv where not needed 2021-01-25 18:31:47 +01:00
Ben Siraphob aa8868c7cc pkgs/build-support: stdenv.lib -> lib 2021-01-24 19:07:54 -08:00
John Ericson 0710308402 clang, cc-wrapper: Move --gcc-toolchain logic into CC wrapper
Take 2, after #94582 had to be reverted.

This reverts commit ac03cfa3c5.
2021-01-24 15:49:32 -05:00
Alexander Ben Nasrallah 226299e1a2
agdaPackages.mkDerivation: don't install Everything module
The Everthing module is not part of a library and should therefore
not be copied to the nix store.

This is particularly bad, if the Everything module is defined in
an agda library included directory, e.g. consider an agda-lib with

    include: .

and Everything.agda in the project root (.), in which case the
Everything module would become part of the library.
If multiple such projects are in the dependency tree, the Everything
module becomes ambiguous and the build would fail.
2021-01-24 17:30:01 +01:00
volth bc0d605cf1 treewide: fix double quoted strings in meta.description
Signed-off-by: Ben Siraphob <bensiraphob@gmail.com>
2021-01-24 19:56:59 +07:00
Pavol Rusnak 90f7338112
treewide: stdenv.lib -> lib 2021-01-24 01:49:49 +01:00
John Ericson 9c213398b3 lib: Clean up how linux and gcc config is specified
Second attempt of 8929989614589ee3acd070a6409b2b9700c92d65; see that
commit for details.

This reverts commit 0bc275e634.
2021-01-23 10:01:28 -05:00
Jonathan Ringer 0bc275e634
Revert "lib: Clean up how linux and gcc config is specified"
This is a stdenv-rebuild, and should not be merged
into master

This reverts commit 8929989614.
2021-01-22 14:07:06 -08:00
Alexander Ben Nasrallah b4b4e36921
agda.withPackages: use GHC with ieee754 as default
As mentioned in the package description of ieee on Hackage,
ieee is deprecated in favor of ieee754.
2021-01-22 16:13:46 +01:00
John Ericson 8929989614 lib: Clean up how linux and gcc config is specified
The `platform` field is pointless nesting: it's just stuff that happens
to be defined together, and that should be an implementation detail.

This instead makes `linux-kernel` and `gcc` top level fields in platform
configs. They join `rustc` there [all are optional], which was put there
and not in `platform` in anticipation of a change like this.

`linux-kernel.arch` in particular also becomes `linuxArch`, to match the
other `*Arch`es.

The next step after is this to combine the *specific* machines from
`lib.systems.platforms` with `lib.systems.examples`, keeping just the
"multiplatform" ones for defaulting.
2021-01-21 22:44:09 -05:00
Steven Pease b766673c6f Move disabling of gccForLibs for iOS to build-support cc-wrapper 2021-01-20 10:14:46 -08:00
zowoq 31f5dd3f36 treewide: editorconfig fixes
- remove trailing whitespace
- use spaces for indentation
2021-01-20 09:11:11 +10:00
adisbladis 6dfd1a2772
Merge pull request #108741 from lukegb/envoy
envoy: init at 1.16.2
2021-01-19 16:40:42 +01:00
Jonathan Ringer 9bb3fccb5b treewide: pkgs.pkgconfig -> pkgs.pkg-config, move pkgconfig to alias.nix
continuation of #109595

pkgconfig was aliased in 2018, however, it remained in
all-packages.nix due to its wide usage. This cleans
up the remaining references to pkgs.pkgsconfig and
moves the entry to aliases.nix.

python3Packages.pkgconfig remained unchanged because
it's the canonical name of the upstream package
on pypi.
2021-01-19 01:16:25 -08:00
Jan Tojnar c0d2951fa6
Merge branch 'master' into staging-next 2021-01-15 17:46:46 +01:00
Robert Hensing 9797139cbb dockerTools: typo
Italian.
2021-01-15 14:23:51 +01:00
github-actions[bot] 83c50873f5
Merge master into staging-next 2021-01-15 06:40:38 +00:00
Milan 0d724ba2fc
dockerTools: fix build (#109420) 2021-01-15 03:56:38 +01:00
Jörg Thalheim 6e3f4c9079
stdenv/patchShebangs: avoid temporary time reference file
less commands -> faster
2021-01-14 20:00:58 +01:00
Jörg Thalheim cb1654ff92
stdenv/patchShebangs: consistent conditional tests
according to shellcheck [[ foo == "bla" ]] && [[ ... ]] has better posix
semantics over [ foo = "bla" -a ... ]. It is also easier to read.
2021-01-14 20:00:57 +01:00
Jörg Thalheim ab4c359822
stdenv/patchShebangs: use builtins where possible
builtins for small input sizes should be faster due to less forking.
2021-01-14 20:00:54 +01:00
Jan Tojnar b813710c04
Merge branch 'master' into staging-next 2021-01-14 02:24:17 +01:00
Luke Granger-Brown c7102b26ce buildBazelPackage: only rewrite relevant symlinks 2021-01-13 21:34:09 +00:00
adisbladis 4003f8cbc7
treewide: emacsPackages -> emacs.pkgs & emacsWithPackages -> emacs.pkgs.withPackages
The previous names are now aliases and shouldn't be used anywhere inside nixpkgs.
2021-01-13 17:13:10 +01:00
github-actions[bot] f47a1ddfe4
Merge master into staging-next 2021-01-12 18:47:24 +00:00
Lassulus ec4a1661b2
Merge pull request #109050 from xaverdh/rust-writer
writers: add writeRust and deduplicate binary stripping
2021-01-12 17:33:50 +01:00
Jörg Thalheim ba0910069d
Merge pull request #109030 from xaverdh/modules-closure-ignore-missing-firmware
nixos/modules-closure.sh: don't fail if firmware is missing
2021-01-12 14:30:41 +00:00
Dominik Xaver Hörl 14205a6429 writers: add test for rust 2021-01-12 11:03:08 +01:00
Dominik Xaver Hörl c6ff4f7143 writers: add rust 2021-01-12 09:20:31 +01:00
Dominik Xaver Hörl e4dae65515 writers: deduplicate binary stripping logic 2021-01-11 22:13:51 +01:00
github-actions[bot] 757ad34b82
Merge master into staging-next 2021-01-11 18:42:29 +00:00
Jonathan Ringer 741285611f fetchgit: add lfs support 2021-01-11 09:41:06 -08:00
Dominik Xaver Hörl 49130f93b7 nixos/modules-closure.sh: don't fail if firmware is missing
Since fdf32154fc, we no longer allow
missing modules in the initrd. Unfortunately since before this commit,
the modules-closure script would also fail on missing firmware, which
is a very common case (e.g. xhci-pci.ko.xz lists renesas_usb_fw.mem as
dependent firmware). Fix this by only issuing a warning instead.
2021-01-11 17:26:33 +01:00
Jan Tojnar 2b9372b2ca
Merge branch 'master' into staging-next 2021-01-11 13:36:42 +01:00
Profpatsch 4a7f99d55d treewide: with stdenv.lib; in meta -> with lib;
Part of: https://github.com/NixOS/nixpkgs/issues/108938

meta = with stdenv.lib;

is a widely used pattern. We want to slowly remove
the `stdenv.lib` indirection and encourage people
to use `lib` directly. Thus let’s start with the meta
field.

This used a rewriting script to mostly automatically
replace all occurances of this pattern, and add the
`lib` argument to the package header if it doesn’t
exist yet.

The script in its current form is available at
https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
2021-01-11 10:38:22 +01:00
Frederik Rietdijk 49f21e06d9 Merge staging-next into staging 2021-01-10 15:51:40 +01:00
Frederik Rietdijk 0c42bb5027 Merge master into staging-next 2021-01-10 15:50:49 +01:00
Jörg Thalheim 82115f0c4b
Merge pull request #107958 from ztzg/x-16304-ubuntu-determinism
vmTools.debClosureGenerator: Fix non-determinism in dependency graph
2021-01-10 12:37:15 +00:00
Frederik Rietdijk 379ca4ddcf Merge staging-next into staging 2021-01-09 13:29:53 +01:00
Michael Weiss 8ae8602bf7
Merge branch 'master' into staging-next
Manually resolved a conflict in
pkgs/development/libraries/libbladeRF/default.nix.
2021-01-09 12:16:11 +01:00
Cyril Cohen 9ffd16b385 coqPackages: refactor 2021-01-09 11:56:17 +01:00
github-actions[bot] 5846dbc4c2
Merge staging-next into staging 2021-01-08 18:38:00 +00:00
github-actions[bot] f89e74dbcc
Merge master into staging-next 2021-01-08 18:37:56 +00:00
Justin Humm 9038cc62fd
defaultCrateOverrides: override crates necessary for building sequoia
See https://git.sr.ht/~erictapen/sequoia for a flake using these
overrides.
2021-01-08 17:27:43 +01:00
Justin Humm 9df8a98fac
defaultCrateOverrides: pkgconfig -> pkg-config 2021-01-08 17:26:05 +01:00
Daniël de Kok 464633d5f7
Merge pull request #108581 from roberth/dockerTools-don't-apologize
dockerTools: Don't apologize
2021-01-08 13:58:46 +01:00
github-actions[bot] 18280919d6
Merge staging-next into staging 2021-01-08 06:29:07 +00:00
github-actions[bot] 67bbf2c845
Merge master into staging-next 2021-01-08 06:28:59 +00:00
Alyssa Ross 0f06d94a20 emacs: fix accidental double wrapper (Darwin)
This was already fixed on non-Darwin, but the fix missed that it was
also reintroduced for the Darwin code path at the same time.

Fixes: dd5d2482c9 ("emacs: Fix accidental double wrapping")
2021-01-08 05:45:15 +00:00
Jan Tojnar 0ea0dacc20
Merge branch 'staging-next' into staging 2021-01-07 13:06:41 +01:00
Jan Tojnar f19eb635b4
Merge branch 'master' into staging-next
b04fc593e7 seems to have accidentally changed mkDerivation function for dfilemanager and solarus-quest-editor so I have reverted that here.
2021-01-07 13:04:31 +01:00
Sandro 7ff9b3699d
Merge pull request #108081 from SuperSandro2000/silence-file-format-not-recognized
setup-hooks/strip: silence 'File format not recognized' errors again
2021-01-07 00:49:44 +01:00
Robert Hensing a31607f904 dockerTools: Don't apologize
Warning about future breaking changes is wrong.

 - It suggests that the maintainers don't value backwards compatibility.
   They do.
 - It implies that other parts of Nixpkgs won't ever break. They will.
 - It implies that a well-defined "public" interface exists. It doesn't.
 - If the reasons above didn't apply, it should have been in the manual
   instead.

Breaking changes will come, especially to the interface. That can be the
only way we can make progress without breaking the image _contents_.

I don't think dockerTools is any different from most of Nixpkgs in
these regards.
2021-01-06 13:02:19 +01:00
Guillaume Girol f54f718871 appimage-run: don't chdir to the appimage
this allows to pass relative paths to appimages as argument

fixes #108426
2021-01-05 20:26:24 +01:00
Robert Hensing 5540dd9b9b
Merge pull request #108416 from srhb/streamlayeredimage-symlinked-storepaths
dockerTools: Fix streamLayeredImage for symlinks
2021-01-05 10:00:28 +01:00
Sarah Brofeldt ffe5ff6009 dockerTools: Test buildLayeredImage with symlinks
This exercises layer creation in face of store path symlinks, ensuring
they are not dereferenced, which can lead to broken layer tarballs
2021-01-04 21:44:47 +01:00
Sarah Brofeldt 08b0d02944 dockerTools: Fix streamLayeredImage for symlinks
When archiving `/nix/store/foo` and `foo` is itself a symlink, we must
not traverse the symlink target, but archive the `foo` symlink itself
2021-01-04 19:47:34 +01:00
github-actions[bot] 07165c7226
Merge staging-next into staging 2021-01-03 18:38:32 +00:00
Kevin Cox bfa497bc2b
Merge pull request #107715 from NixOS/revert-106172-nix-gitignore-perf
Reverts https://github.com/NixOS/nixpkgs/pull/106172 ef3ed45c12

This change causes issues with negative patterns. Reverting now until those can be resolved.
2021-01-03 08:01:02 -05:00
Andreas Rammhold c2884c4011
Merge pull request #106954 from r-burns/randomseed
[staging] stdenv: trim random seed to avoid reference cycles
2021-01-02 11:01:34 +01:00
Sandro Jäckel 03ba885fa2
setup-hooks/strip: silence 'File format not recognized' errors again
This got lost in e4d17dc558.
2021-01-02 10:46:27 +01:00
kvtb 73853d0bfa
build-bazel-package: fix string escaping
\@ has no effect in single quoted strings
2020-12-31 23:51:49 +00:00
Frederik Rietdijk f3b4ae8402 Merge staging-next into staging 2020-12-31 13:29:55 +01:00
Daniël de Kok 67a10c88bb buildRustPackage: add cargoHash for SRI hashes of vendored deps
`buildRustPackage` currently accepts `cargoSha256` as a hash for
vendored dependencies. This change adds `cargoHash` which accepts SRI
hashes, setting `outputHashAlgo` to `null`.

The hash mismatch message still uses `cargoSha256` as an example,
which it probably should until we completely switch to SRI hashes.
2020-12-31 11:18:11 +01:00
github-actions[bot] 8eb607335b
Merge staging-next into staging 2020-12-30 12:24:51 +00:00
Damien Diederen 3363377530 vmTools.debClosureGenerator: Fix non-determinism in dependency graph
By default, Perl versions since 5.8.1 use randomization to make hashes
resistant to complexity attacks.

That randomization makes building VM images such as ubuntu1804x86_64
non-deterministic because the (imported) derivations built by
deb/deb-closure.pl are not stable.

This can easily be observed by repeating the following sequence of
commands and noting the path of the image's .drv:

    nix-instantiate -E '(import <nixpkgs> {}).vmTools.diskImageFuns.ubuntu1804x86_64 {}'
    nix-store --delete /nix/store/*ubuntu-18.04-bionic-amd64.nix

One source of non-determinism is the handling of Provides/Replaces,
which depends on the order of iteration over %packages.  Here is a
diff showing the corresponding change in output:

     >>> awk
    -virtual awk: using original-awk
    -    original-awk: libc6 (>= 2.14)
    +virtual awk: using mawk
    +    mawk: libc6 (>= 2.14)

    -    mawk: libc6 (>= 2.14)
    ->>> libc6

This patch sorts packages by name for Provides/Replaces processing,
which seems to result in stable output.

(If the above turns out not to be sufficient, one could also set the
PERL_HASH_SEED and PERL_PERTURB_KEYS environment variables, documented
in 'perlrun', to disable Perl's built-in randomization.  Complexity
attacks are not an issue as we control and trust all inputs.)
2020-12-30 11:37:37 +01:00
Jörg Thalheim 66c16e12fa
buildFhsUserenv: don't downgrade root user 2020-12-27 17:19:49 +01:00
Jörg Thalheim 61bbbcd1af
bintools-wrapper: skip dynamic linker for static binaries 2020-12-27 16:42:11 +01:00
Kevin Cox 11e522cb6e
Revert "nix-gitignore: Optimise performance" 2020-12-27 08:04:16 -05:00
DavHau 2efcf6dc26 autoPatchelf: add comment why ignore failing ldd/sed 2020-12-25 12:13:03 +01:00
DavHau 2fde1e63ba autoPatchelfHook: fix shellcheck errors 2020-12-25 12:13:03 +01:00
DavHau 4ac5d22654 autoPatchelfHook: fix bug introduced by #101142 2020-12-25 12:13:03 +01:00
John Ericson fb875dcf6f
Merge pull request #107507 from LibreCybernetics/add-zen-info
lib.systems: update processor architecture info
2020-12-24 10:23:10 -05:00
Florian Klink 8f5c939147
Merge pull request #107435 from flokli/gnats-cc-wrapper-format-unsupported
gnats: format hardened flag isn't supported
2020-12-24 02:25:27 +01:00
Fabián Heredia Montiel 2a9ac172c1 lib.systems: update processor architecture info 2020-12-23 18:57:59 -06:00
Ryan Burns 61a6d1aae2 stdenv: trim random seed to avoid reference cycles
Using the full store hash as the random seed occasionally caused
reference cycles when the invocation was stored in output artifacts.
For example, cross-compiled gcc was failing due to this:
https://hydra.nixos.org/eval/1631713#tabs-now-fail

Simply truncating the hash is sufficient to avoid this.
2020-12-23 16:46:39 -08:00
Florian Klink 07c4056179 gnats: format hardened flag isn't supported
When invoking a simple Ada program with `gcc` from `gnats10`, the
following warnings are shown:

```
$ gcc -c conftest.adb
gnat1: warning: command-line option ‘-Wformat=1’ is valid for C/C++/ObjC/ObjC++ but not for Ada
gnat1: warning: command-line option ‘-Wformat-security’ is valid for C/C++/ObjC/ObjC++ but not for Ada
gnat1: warning: ‘-Werror=’ argument ‘-Werror=format-security’ is not valid for Ada
$ echo $?
0
```

This is only spammy when compiling Ada programs inside a Nix derivation,
but certain configure scripts (such as the ./configure script from the
gcc that's built by coreboot's `make crossgcc` command) fail entirely
when getting that warning output.

https://nixos.wiki/wiki/Coreboot currently suggests manually running

> NIX_HARDENING_ENABLE="${NIX_HARDENING_ENABLE/ format/}" make crossgcc

… but actually teaching the nixpkgs-provided cc wrapper that `format`
isn't supported as a hardening flag seems to be the more canonical way
to do this in nixpgks.

After this, Ada programs still compile:

```
$ gcc -c conftest.adb
$ echo $?
0
```

And the compiler output is empty.
2020-12-23 01:51:14 +01:00
adisbladis f475529d44
Merge pull request #107284 from r3v2d0g/emacs-wrapper-nativecomp
emacs: replace 'emacs.nativeComp' in wrapper with 'nativeComp'
2020-12-23 00:07:44 +01:00
sternenseemann 697b46aa96 fetchFromGitHub: also use git if deepClone or leaveDotGit is used
leaveDotGit is only inherited if it is explicitly set, so fetchgit's
default value for leaveDotGit ? deepClone is respected.
2020-12-21 13:20:04 +01:00
Matthieu Le brazidec (r3v2d0g) bfec6c34b4
emacs: replace 'emacs.nativeComp' in wrapper with 'nativeComp' 2020-12-20 21:15:18 +01:00
sternenseemann 640d92513d buildDunePackage: use dune install instead of opaline 2020-12-21 00:43:33 +01:00
John Ericson ddeef0d322 tests.buildRustCrate: Fix after hashing method change
As @lopsided98 points out in #105305, since the hashes are now target
sensative, and until we find reason to actually care to test what they
are exactly, we are best just normalizing them away in the tests.
2020-12-19 19:05:07 +00:00
Linus Heckemann 14fbf575ec make-initrd: various improvements
- Generate a link to the initramfs file with an appropriate file
  extension, guessed based on the compressor by default
- Use correct metadata in u-boot images if generated, up to now this
  was hardcoded to gzip and would silently generate an erroneous image
  if another compressor was specified
- Document all the parameters
- Improve cross-building compatibility, by allowing passing either a
  string as before, or a function taking a package set and returning the
  path to a compressor in the "compressor" argument of the
  function.
- Support more compression algorithms
- Place compressor executable function and arguments in passthru, for
  reuse when appending initramfses

Co-Authored-By: Dominik Xaver Hörl <hoe.dom@gmx.de>
2020-12-17 11:37:04 +01:00
Linus Heckemann 3a3c9c9548 makeInitrd: include dotfiles at root 2020-12-17 11:10:37 +01:00
Linus Heckemann 85e0ae7827 makeInitrd: don't assume uImage => arm
mips for example might use uImages too
2020-12-17 11:10:37 +01:00
Linus Heckemann a343ff7e14 makeInitrd: make uinitrd behaviour optional 2020-12-17 11:10:36 +01:00
aszlig 1152978cda
vm: Remove runInWindowsVM implementation
Originally this was meant to support other Windows versions than just
Windows XP, but before I actually got a chance to implement this I left
the project that I implemented this for.

The code has been broken for years now and I highly doubt anyone is
interested in resurrecting this (including me), so in order to make this
less of a maintenance burden for everybody, let's remove it.

Signed-off-by: aszlig <aszlig@nix.build>
2020-12-17 07:03:36 +01:00
adisbladis dd5d2482c9
emacs: Fix accidental double wrapping
This makeWrapper invocation found it's way back via a rebase.
2020-12-17 02:44:37 +01:00
Tad Fisher a7cb8e36ac
emacs: Add comp-eln-load-path infrastructure 2020-12-16 19:45:07 +01:00
Daniël de Kok 00941cd747
Merge pull request #105787 from danieldk/build-rust-crate-njobs
buildRustCrate: set NUM_JOBS to NIX_BUILD_CORES
2020-12-16 13:38:43 +01:00
Lassulus 00b8fa792b
Merge pull request #106000 from Luis-Hebendanz/firefoxWrapperAddonSettings
firefox: wrapper updating an addon perserves addon settings
2020-12-15 22:16:48 +01:00
Luis Hebendanz 1c8c134972 firefox: wrapper updating an addon perserves addon settings 2020-12-15 22:02:34 +01:00
Robert Hensing 5cacf0fcec dockerTools: use go.GOARCH as default arch 2020-12-15 02:15:35 -08:00
Terin Stock 8f66dc94a7 dockerTools: normalize arch to GOARCH
Docker (via containerd) and the the OCI Image Configuration imply and
suggest, respectfully, that the architecture set in images matches those
of GOARCH in the Go Language document.

This changeset updates the implimentation of getArch in dockerTools to
return GOARCH values, to satisfy Docker.

Fixes: #106695
2020-12-15 02:14:01 -08:00
Mario Rodas eb9751c6d6 emacsWithPackages: fix application wrapper on darwin 2020-12-12 04:20:00 +00:00
Frederik Rietdijk 3b85d7d54f
Merge pull request #106321 from NixOS/staging-next
Staging next
2020-12-11 15:56:17 +01:00
Robert Hensing ba5e222245 fetchMavenArtifact: fix generated url 2020-12-11 13:58:19 +01:00
Robert Hensing f0568c2228 fetchMavenArtifact: switch mirrors to https
Maven repositories are disabling HTTP support for security.
Even though Nix adds some security with its own hash validation,
broken mirrors are a, well, suboptimal experience.
I don't know of any plans by sonatype, but it seems like a matter
of time.

https://www.lightbend.com/blog/lightbend-to-require-https-on-repos-starting-august-5-2020
2020-12-11 11:43:23 +01:00
github-actions[bot] 614876ef33
Merge master into staging-next 2020-12-11 00:40:21 +00:00
adisbladis 316094b8ab
Merge pull request #106606 from alyssais/elpa-meta
emacsPackages.elpaBuild: pass through meta
2020-12-11 00:22:42 +01:00
adisbladis 1ad3b14759
Merge pull request #106608 from alyssais/melpa-homepage
emacsPackages.melpaPackages: HTTPS for homepages
2020-12-11 00:10:01 +01:00
adisbladis 09e349206d
Merge pull request #106486 from alyssais/emacsWithPackages
emacsWithPackages: EMACSLOADPATH correctness fixes
2020-12-11 00:08:59 +01:00
Alyssa Ross 23d4bfb666
emacsWithPackages: don't tell sub-Emacs about pkgs
If I'm running an Emacs executable from emacsWithPackages as my main
programming environment, and I'm hacking on Emacs, or the Emacs
packaging in Nixpkgs, or whatever, I don't want the Emacs packages
from the wrapper to show up in the load path of that child Emacs.  It
results in differing behaviour depending on whether the child Emacs is
run from Emacs or from, for example, an external terminal emulator,
which is very surprising.

To avoid this, pass another environment variable containing the
wrapper site-lisp path, and use that value to remove the corresponding
entry in EMACSLOADPATH, so it won't be propagated to child Emacsen.
2020-12-10 22:52:31 +00:00
Alyssa Ross 0127013b0f
emacsWithPackages: mutate EMACSLOADPATH correctly
An empty entry in EMACSLOADPATH gets filled with the default value.
This is presumably why the wrapper inserted a colon after the entry it
added for the dependencies.  But this naive approach wasn't always
correct.

For example, if the user ran emacs with EMACSLOADPATH=foo, the wrapper
would insert the default value (by adding the trailing `:') even
though the user was trying to expressly opt out of it.

To do this correctly, here I've replaced makeWrapper with a bespoke
script that will actually parse the EMACSLOADPATH provided in the
environment (if given), and insert the wrapper's load path just before
the default value.  If EMACSLOADPATH is given but contains no default
value, we respect that and don't add the wrapped dependencies at all.
If no EMACSLOADPATH is given, we insert the wrapped dependencies
before the default value, just like before.  In this way, the wrapped
Emacs should now behave as if the wrapped dependencies were part of
Emacs's default load-path value.
2020-12-10 22:35:57 +00:00
Alyssa Ross 00a246c5ce
emacsPackages.melpaPackages: HTTPS for homepages 2020-12-10 22:15:21 +00:00
Alyssa Ross 5016fdb269
emacsPackages.elpaBuild: pass through meta
Previously, meta wasn't being passed through at all, because it's
removed from args without being used anywhere.  This made it so that
rcirc-menu wasn't being marked as broken even though it was supposed
to be.

This patch copies the meta handling from melpaBuild, including the
default home page (adapted for ELPA).
2020-12-10 22:03:20 +00:00
Guillaume Girol 4eb94d0ca1
Merge pull request #94960 from symphorien/gitignore
nix-gitignore: filter-out .git
2020-12-10 20:34:54 +00:00
Tad Fisher 3a5aeb1539
fetchFirefoxAddon: fix typo 2020-12-09 11:58:00 -08:00
github-actions[bot] faad8493f7
Merge master into staging-next 2020-12-09 18:15:18 +00:00
Martin Weinelt 6a4be92dd8
Merge pull request #106409 from jonringer/fix-steam
steam: fix paradox launchers, and electron apps
2020-12-09 17:08:05 +01:00
Emery Hemingway e9158eca70 fetchfirefoxaddon: support for SRI hashes 2020-12-09 15:09:49 +01:00
Jonathan Ringer 6c52434eb0
buildFHSUserEnvBubblewrap: expand unshare options 2020-12-08 18:40:51 -08:00
github-actions[bot] 7d6630d7db
Merge master into staging-next 2020-12-09 00:39:29 +00:00
Matthieu Coudron 3dd316723d mirrors: fix lua mirrors
Seems like urls in mirrors must end up with a / otherwise download fails.
2020-12-08 23:55:31 +01:00
Emery Hemingway e4d17dc558 setup-hooks/strip: more robust stripping
Use "find -exec" to strip rather than "find … | xargs …". The former
ensures that stripping is attempted for each file, whereas the latter
will stop stripping at the first failure. Unstripped files can fool
runtime dependency detection and bloat closure sizes.
2020-12-08 05:35:48 +01:00
Anderson Torres cef4502feb
Merge pull request #105818 from raboof/symlink-compressed-manpages-deterministically
compress-man-pages: symlink compressed manpages deterministically
2020-12-07 23:37:35 -03:00
github-actions[bot] a1b2303710
Merge staging-next into staging 2020-12-07 18:15:25 +00:00
adisbladis ef3ed45c12
nix-gitignore: Optimise performance
There are a few operations in this library that naively runs on every
iteration while they could be cached.

For a simple test repository with a small number of files and ~1000
gitignore patterns this brings memory usage down from ~233M to ~157M
and wall time from 2.6s down to 0.78s.

This should scale similarly with the number of files in a repository.
2020-12-07 14:14:20 +01:00
github-actions[bot] 6bc7a2c814
Merge staging-next into staging 2020-12-06 12:18:43 +00:00
Frederik Rietdijk b6e98f1895
Merge pull request #105584 from NixOS/staging-next
Staging next
2020-12-06 11:48:51 +01:00
Jörg Thalheim 1df84d17b9
Merge pull request #103755 from hlolli/feature/fetchmaven-classifiers 2020-12-06 08:37:15 +00:00
hlolli 38ad378228
add classifier as an argument 2020-12-05 18:56:46 +01:00
github-actions[bot] 899d916e1d
Merge staging-next into staging 2020-12-05 12:18:20 +00:00
github-actions[bot] 0947539ec1
Merge master into staging-next 2020-12-05 12:18:17 +00:00
Arnout Engelen 777cb35eb8
compress-man-pages: symlink compressed manpages deterministically
For example graphviz has chained symlinked manpages: dot2gxl.1 is
a symlink to gv2gxl.1 which is a symlink to gxl2gv.1

The second loop replaces each non-compressed symlink to a compressed
symlink. The target is determined with 'readlink -f', which follows
links recursively until the first name that is not a link (so either
the 'target name' or the first 'dangling' symlink).

This means that if the loop converted dot2gxl.1 before converting
gv2gxl.1 it would add a symlink `dot2gxl.1.gz->gxl2gv.1.gz`. When
it converted gv2gxl.1 first, it would then add a
`dot2gxl.1.gz->gv2gxl.1.gz` symlink.

Both are 'correct', but it's weird the result depends on the order
in which 'find' returns the files. This PR makes the behaviour
deterministic.

fixes #104708
2020-12-04 09:24:37 +01:00
Luke Granger-Brown 1f6d750097 fetchzip: get write permission on unpacked directory
This is a workaround for NixOS/nix#4295, which caused single-user Linux
Nix installations using sandboxed builds to start failing to build
fetchzip derivations after 4a5c49363a.

In short: removing write permissions for the entire directory is great,
except we then can't rename(2) it to the final Nix store path out of the
sandbox, because we don't have write permission on the directory and
thus cannot update the ".." directory entry.
2020-12-04 03:28:00 +00:00
github-actions[bot] 03619d4f2b
Merge staging-next into staging 2020-12-03 12:18:48 +00:00
github-actions[bot] 5b73e3087a
Merge master into staging-next 2020-12-03 12:18:45 +00:00
Daniël de Kok e87d457564 buildRustCrate: set NUM_JOBS to NIX_BUILD_CORES
Bofore this change, NUM_JOBS was set to 1. Some crates for building
C/C++ code (e.g. the cc and cmake crates), rely on this variable to
set the number of jobs. As a consequence, we were compiling embedded
libraries serially. Change this to NIX_BUILD_CORES to permit parallel
builds.

Prior discussion:

https://github.com/NixOS/nixpkgs/pull/50452#issuecomment-439407547
2020-12-03 12:44:12 +01:00
Frederik Rietdijk c7843cf6a2
Merge pull request #101142 from DavHau/improve-autopatchelf
autoPatchelfHook: optimize performance; better error handling
2020-12-03 12:34:05 +01:00
Jörg Thalheim 3cd6bc103d
Merge branch 'master' into firefox-nix-addon-support 2020-12-03 07:20:16 +00:00
github-actions[bot] 58274c4f8d
Merge master into staging-next 2020-12-03 00:36:28 +00:00
Florian Klink 7a34bcc2a3
Merge pull request #105685 from flokli/dockertools-fakenss
dockerTools.fakeNss: init
2020-12-02 23:34:46 +01:00
github-actions[bot] d3f5608624
Merge master into staging-next 2020-12-02 18:13:34 +00:00
John Ericson 8e21ce5fae
Merge pull request #105294 from Ericson2314/platform-config-improvements
Platform config improvements
2020-12-02 11:17:41 -05:00
Florian Klink e054694925 dockerTools.binSh: init 2020-12-02 14:57:23 +01:00
Florian Klink f7ee2706c2 dockerTools.fakeNss: init
This provides a /etc/passwd and /etc/group that contain root and nobody.

Useful when packaging binaries that insist on using nss to look up
username/groups (like nginx).

The current nginx example used the `runAsRoot` parameter to setup
/etc/group and /etc/passwd (which also doesn't exist in
buildLayeredImage), so we can now just use fakeNss there and use
buildLayeredImage.
2020-12-02 14:56:07 +01:00
github-actions[bot] 89e8bf0f2a
Merge master into staging-next 2020-12-02 12:30:55 +00:00
Jörg Thalheim 9712bbdf74
firefoxaddon: formatting nitpicks 2020-12-02 09:53:53 +01:00
Luis Hebendanz 5f8eca5461
Added missing sha1 and sha512 flags 2020-12-02 09:40:53 +01:00
Luis Hebendanz 397597f731
Added fetchfirefoxaddon 2020-12-02 09:40:53 +01:00
edef de88771a7d nix-prefetch-docker: output informational messages to stderr
Informational messages belong on stderr, not on stdout and intermixed
with structured output for programmatic use.

Change-Id: I34d094d04460494e9ec8953db7490f4e2292d959
2020-12-01 16:58:29 +00:00
Jan Tojnar 27b974d84b
Merge branch 'staging-next' into staging 2020-12-01 03:26:36 +01:00
Frederik Rietdijk 9a63b3d3d6
Merge pull request #104781 from NixOS/staging-next
Staging next
2020-11-30 18:27:29 +01:00
John Ericson 77816426b6
Merge pull request #105305 from lopsided98/build-rust-crate-platform-hash
buildRustCrate: add host platform to rlib hash suffix
2020-11-29 10:50:25 -05:00
Frederik Rietdijk 05d1c49209 Merge staging-next into staging 2020-11-29 13:51:33 +01:00
Frederik Rietdijk 0d8491cb2b Merge master into staging-next 2020-11-29 13:51:10 +01:00
Ben Wolsieffer 8c479059b9 buildRustCrate: add host platform to rlib hash suffix 2020-11-28 22:25:11 -05:00
Fabian Möller 50f54c5ca7 copyDesktopItems: add new setup-hook 2020-11-29 04:03:38 +01:00
John Ericson 73425f6c3b Merge remote-tracking branch 'upstream/master' into staging 2020-11-28 21:33:03 -05:00
Benjamin Hipple 9426084fec
Merge pull request #102114 from MetaDark/fetchzip
fetchzip: remove write permissions for unpacked files
2020-11-28 19:18:14 -05:00
John Ericson 04f6973200 lib, binutils: Move Risc-V bfdEmulation to be by the others 2020-11-29 00:03:51 +00:00
John Ericson 8ddf5c6907 Merge remote-tracking branch 'upstream/master' into aj-rust-custom-target 2020-11-28 18:10:38 +00:00
John Ericson c6617d28ef Merge remote-tracking branch 'upstream/master' into aj-rust-custom-target 2020-11-28 17:09:12 +00:00
Jan Tojnar 136152af80
Merge pull request #101537 from jtojnar/gtk-tracker 2020-11-28 01:37:37 +01:00
Frederik Rietdijk b2a3891e12 Merge master into staging-next 2020-11-27 15:09:19 +01:00
Florian Klink ae5764621d make-desktopitem: desktop-file-utils is a nativeBuildInput
This fixes cross-compilation of a NixOS with the manual enabled.
2020-11-27 01:17:32 +01:00
Sandro 3819fb300b
Merge pull request #101542 from wahjava/fix/fetchfossil
fetchfossil: Depend on cacert
2020-11-27 00:15:29 +01:00
MetaDark 4a5c49363a fetchzip: remove write permissions for unpacked files
Fixes https://github.com/NixOS/nixpkgs/issues/38649
2020-11-26 15:30:12 -05:00
Jan Tojnar acfc45bacc
wrapGAppsNoGuiHook: init 2020-11-26 14:06:07 +01:00
Ryan Burns 9682c1d0da linux bootstrap tools: fix tests on ppc64
The dynamic loader on powerpc64 is called ld64.so.2 rather than
ld-linux.so.*, and was not matched by the existing pattern.

We reuse the dynamicLinker name from binutils to match a wider set
of platforms and to avoid specifying this information in two places.
2020-11-24 18:32:12 -08:00
Graham Christensen bc49a0815a
utillinux: rename to util-linux 2020-11-24 12:42:06 -05:00
Jörg Thalheim 79086e5d55
Merge pull request #104769 from symphorien/appimage-run-locale
appimage-run: parse readelf's output in C locale
2020-11-24 15:39:35 +01:00
Symphorien Gibol 4d51f95638 appimage-run: parse readelf's output in C locale
fixes #101137
2020-11-24 13:55:04 +01:00
Jan Tojnar 6d99109b12
Merge branch 'staging-next' into staging 2020-11-24 05:44:44 +01:00
adisbladis 6847a5c12d
referencesByPopularity: Don't use buildPackages at call-site
It's cleaner to reference buildPackages directly in
build-support/docker directly.
2020-11-24 02:55:40 +01:00
Frederik Rietdijk 587538d087 Merge staging-next into staging 2020-11-23 18:10:33 +01:00
Kevin Cox 272744825d
Merge pull request #98325 from Atemu/fhsenv-bw-bash-lists
buildFHSUserEnvBubblewrap: use arrays for constructing argument list
2020-11-22 14:04:20 -05:00
Atemu 74c4a55e10 buildFHSUserEnvBubblewrap: use arrays for constructing argument list
Generally a cleaner way of doing it and prevents issues with spaces in paths

Used to fix #97234 but #101967 already didt this with a smaller scope
2020-11-22 19:26:59 +01:00
Frederik Rietdijk 54cb417ba0 Merge staging-next into staging 2020-11-21 08:43:46 +01:00
Frederik Rietdijk 1ffd7cf0d6 Merge master into staging-next 2020-11-21 08:43:10 +01:00
adisbladis b7b22c5814
dockerTools: Always cross compile for another arch in the cross example
The example fails to build on aarch64, so lets cross build for gnu64.
2020-11-20 12:57:58 +01:00
Jan Tojnar 66ef389efa
Merge branch 'staging-next' into staging 2020-11-20 01:38:58 +01:00
Jan Tojnar f6105d21e3
Merge branch 'master' into staging-next 2020-11-20 01:38:32 +01:00
adisbladis 5357abf49a
dockerTools: Add cross example 2020-11-19 18:13:21 +01:00
adisbladis 8a3b33baed
dockerTools: Set correct architecture when cross compiling 2020-11-19 18:13:21 +01:00
adisbladis 4313ac6b29
dockerTools.buildLayeredImage: Fix cross compilation 2020-11-19 14:32:22 +01:00
Andreas Rammhold 278b273d9a
Merge pull request #102251 from andir/random-seed
stdenv: introduce -frandom-seed
2020-11-19 01:07:28 +01:00
Frederik Rietdijk da12fc6838 Merge staging-next into staging 2020-11-18 15:36:56 +01:00
Frederik Rietdijk 986c2d36da Merge master into staging-next 2020-11-16 09:01:53 +01:00
John Ericson 86fedc3a92
Merge pull request #102766 from siraben/mmix
Initial implementation of cross-compilation to Knuth's MMIX
2020-11-14 12:46:24 -05:00
hlolli 49c789703c
fetchMavenArtifact: support artifact classifier syntax 2020-11-14 00:55:44 +01:00
zowoq 473b341fb1 bintools-wrapper: remove redundant arg
cctools 949.0.1 warns if min version is passed twice.
2020-11-14 07:11:29 +10:00
Samuel Dionne-Riel 6d8327ea96 Initial support for OpenRISC 1000 (or1k) 2020-11-09 22:32:11 -05:00
Ben Siraphob 445dde6304 Initial implementation of mmix cross-compile 2020-11-09 19:49:55 +07:00
Samuel Gräfenstein 0950c98059 docker: add final newline to detjson.py 2020-11-09 11:39:28 +00:00
Samuel Gräfenstein 22b73d1282 pkgs/*: add final newline to .nix files 2020-11-09 11:39:28 +00:00
DavHau 05fa0f1a2e improve things shellcheck complains about 2020-11-07 18:08:48 +07:00
Robert Hensing 06df74607f
Merge pull request #101403 from mickours
Fix broken pipe error on docker layer creation
2020-11-05 00:17:36 +01:00
Andrew Childs 5b82b8d094 dockerTools: fix absent /proc during runAsRoot
The chroot environment under mnt had /dev and /sys via bind mounts,
but nothing setting up /proc. The `--mount-proc` argument to unshare
defaults to /proc, which is outside of the chroot envirnoment.
2020-11-04 16:17:57 +09:00
Michael 24c5059468 docker: Fix broken pipe on docker layer creation
Add `-p` to the `tee` command to avoid exiting on breaking pipe due to
tarsum finishing before tar which creating docker layers.
2020-11-03 12:33:11 +01:00
Andreas Rammhold 83f0bccc89 stdenv: add -frandom-seed to NIX_CFLAGS_COMPILE for reproducibility
This adds -frandom-seed to each compiler invocation in stdenv. The
object here is to make the compierl invocations produce the same output
every time they are called (for the same derivation). When the
-frandom-seed option is not set the compiler will use a combination of
random numbers (in GCC's case from /dev/urandom) and the durrent time to
produce a "random" input per file. This can (among other things) lead to
different ordering of symbols in the produced object files.

For reason of reproducibility we prefer having the same derivation
produce the exact same outputs. This is not a silver bullet but one way
to tame the compiler.
2020-11-01 19:40:12 +01:00
Vladimír Čunát dfd3ede68d
Merge branch 'master' into staging-next 2020-10-31 14:30:44 +01:00
Jonathan Ringer ec38df81a9 buildFHSUserEnvBubblewrap: fix whitespace with root directories 2020-10-30 22:52:58 -07:00
Matthew Bauer 989b403c7f
Merge pull request #96318 from matthewbauer/provide-patchelf-in-native-stdenv
stdenv/native: provide patchelf on linux
2020-10-30 13:32:13 -05:00
Jörg Thalheim d420c85a55
Merge pull request #102123 from lopsided98/nginx-conf-cross
writers.writeNginxConfig: fix cross-compilation
2020-10-30 12:45:04 +01:00
Ben Wolsieffer 4366281075 writers.writeNginxConfig: fix cross-compilation
Native versions of awk, sed and gixy need to be used.
2020-10-29 21:39:22 -04:00
Matthieu Coudron 1f9ab74d4c buildBazelPackage: build name from pname/version
and updated bazel-remote accordingly.
2020-10-28 17:55:10 +01:00
DavHau 112f275f4d
autoPatchelfHook: fix typos in comments 2020-10-26 17:17:07 +07:00
Vladimír Čunát 89023c38fc
Recover the complicated situation after my bad merge
I made a mistake merge.  Reverting it in c778945806 undid the state
on master, but now I realize it crippled the git merge mechanism.
As the merge contained a mix of commits from `master..staging-next`
and other commits from `staging-next..staging`, it got the
`staging-next` branch into a state that was difficult to recover.

I reconstructed the "desired" state of staging-next tree by:
 - checking out the last commit of the problematic range: 4effe769e2
 - `git rebase -i --preserve-merges a8a018ddc0` - dropping the mistaken
   merge commit and its revert from that range (while keeping
   reapplication from 4effe769e2)
 - merging the last unaffected staging-next commit (803ca85c20)
 - fortunately no other commits have been pushed to staging-next yet
 - applying a diff on staging-next to get it into that state
2020-10-26 09:01:04 +01:00
Vladimír Čunát c778945806
Revert "Merge #101508: libraw: 0.20.0 -> 0.20.2"
I'm sorry; I didn't notice it contained staging commits.

This reverts commit 17f5305b6c, reversing
changes made to a8a018ddc0.
2020-10-25 09:41:51 +01:00
Ashish SHUKLA 4eb42a4f1d
fetchfossil: Depend on cacert
Without it, it'll not able to verify SSL certificates, rendering
it mostly useless
2020-10-24 16:43:05 +05:30
DavHau b9d2541a37
autoPatchelfHook: store dependant for dependency 2020-10-23 13:21:08 +07:00
DavHau f833f0406f
autoPatchelfHook: print dependant for missing deps 2020-10-23 13:16:23 +07:00
DavHau 11a08bcfad
Apply suggestions from code review
Co-authored-by: symphorien <symphorien@users.noreply.github.com>
Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
2020-10-22 10:15:42 +07:00
Symphorien Gibol a5a383a389 nix-gitignore: filter-out .git 2020-10-21 12:00:00 +00:00
Frederik Rietdijk 23890fc236 Merge staging-next into staging 2020-10-20 20:55:46 +02:00
DavHau 5c382b7f0e autoPatchelfHook: optimize performance, better error handling 2020-10-20 19:09:32 +07:00
Jan Tojnar 5c766c5c24
Merge branch 'staging-next' into staging 2020-10-18 21:21:03 +02:00
Daniël de Kok 48a20e9337 validatePkgConfig: fix variable scope
validatePkgConfig failed due to a wrong variable scope, as reported in
issue #100834. This change corrects the variable scoping.
2020-10-18 14:00:05 +02:00
Aaron Janse 512458c68a add sysroot lockfile update script then run it 2020-10-17 01:34:51 -07:00
Aaron Janse d884b2d877 NEEDS REVIEW: enable sysroot differently 2020-10-17 00:48:38 -07:00
Aaron Janse 7c92361028 enforce noCheck when useSysroot 2020-10-17 00:47:14 -07:00
Aaron Janse dec97eb3e9 minor clean up 2020-10-17 00:45:27 -07:00
Aaron Janse e745f9333e fix whitespace 2020-10-15 19:03:10 -07:00
Aaron Janse d906fda8d2 parameterize rustcSrc 2020-10-15 17:27:51 -07:00
Leon Vack f275b320d9
make-desktopitem: name was being used instead of desktopName
Name should be used as filename and desktopName for the name attribute of the desktop entry (according to docs).
2020-10-15 14:29:32 +02:00
Aaron Janse a153be896f use rustcSrc 2020-10-14 22:54:04 -07:00
maralorn ae2630c96a
Merge pull request #91790 from piegamesde/improve-makedesktopitem
make-desktopitem: refactoring, documentation and improvement
2020-10-15 02:42:12 +02:00
John Ericson c0df12de5d rust: Add support for managing target JSON in Nix 2020-10-14 04:20:23 +00:00
John Ericson 6866f26c89 Merge remote-tracking branch 'upstream/master' into aj-rust-custom-target 2020-10-14 02:54:31 +00:00
piegames 3a76d4caea make-desktopitem: minor fixes and code style 2020-10-14 01:19:43 +02:00
Frederik Rietdijk dc0aeee5db Merge staging-next into staging 2020-10-13 19:35:37 +02:00
Frederik Rietdijk 9e1943edc0 Merge master into staging-next 2020-10-13 19:34:34 +02:00
Aaron Janse 3f3491d64d fix some whitespace 2020-10-12 18:41:13 -07:00
Aaron Janse 0fca6ba580 fix compile error 2020-10-12 14:48:07 -07:00
John Ericson d3d55bcc81
Merge pull request #99066 from lopsided98/buildrustcrate-target-vars
buildRustCrate: fix target config environment variables on 32-bit ARM
2020-10-11 16:46:29 -04:00
Lily Ballard 03c9f6a647 installShellFiles: Add test suite 2020-10-08 15:08:40 -07:00
Lily Ballard 866a7de409 Fix doc comment for installManPage 2020-10-08 15:08:40 -07:00
Lily Ballard 7e1e8543fc installShellFiles: Enhance installShellCompletion
Teach installShellCompletion how to install completions from a named
pipe. Also add a convenience flag `--cmd NAME` that synthesizes the name
for each completion instead of requiring repeated `--name` flags.

Usage looks something like

    installShellCompletion --cmd foobar \
      --bash <($out/bin/foobar --bash-completion) \
      --fish <($out/bin/foobar --fish-completion) \
      --zsh <($out/bin/foobar --zsh-completion)

Fixes #83284
2020-10-08 15:08:40 -07:00
Aaron Janse f8ea4e0c3d makeRustPlatform: support custom targets 2020-10-08 14:32:49 -07:00
Frederik Rietdijk 692d219a93 Merge staging-next into staging 2020-10-06 10:25:58 +02:00
Ben Wolsieffer 91bc6128b9 buildRustCrateTests: support cross-compilation 2020-09-29 14:33:49 -04:00
Ben Wolsieffer f0fdecfbb4 buildRustCrate: fix target config environment variables on 32-bit ARM 2020-09-29 01:40:06 -04:00
John Ericson cffc0eaa98
Merge pull request #99050 from lopsided98/buildrustcrate-cross
buildRustCrate: support cross compilation
2020-09-29 00:13:26 -04:00
Ben Wolsieffer a0e7613509 defaultCrateOverrides: move pkgconfig to nativeBuildInputs
This fixes cross-compiling.
2020-09-28 19:47:52 -04:00
Ben Wolsieffer 295a6690f9 buildRustCrate: support cross compilation 2020-09-28 19:46:04 -04:00
Jan Tojnar 32b4375f10
Merge branch 'staging-next' into staging 2020-09-29 00:12:29 +02:00
Jan Tojnar d471c5d1f3
Merge branch 'staging-next' into staging 2020-09-24 23:09:00 +02:00
Vladimír Čunát a8cda11090
Merge #97597: stdenv wrappers: improve purity checking 2020-09-24 10:58:10 +02:00
zowoq e4c71e6c6c buildRustPackage: support setting test-threads 2020-09-24 07:19:58 +10:00
Shea Levy b694eb6e6a
firmware-manager: Init at 0.1.1 2020-09-23 06:01:05 -04:00
WORLDofPEACE 978e419abe Merge branch 'staging-next' into staging 2020-09-20 18:43:38 -04:00
WORLDofPEACE 34aaac6d7c Merge branch 'staging-next' into staging 2020-09-20 18:41:15 -04:00
zowoq 4482e5ec2c dotnetenv: editorconfig fixes 2020-09-21 08:30:58 +10:00
Lars Jellema 7ea5b08cfc gnat: fix build 2020-09-19 20:54:27 -07:00
Anderson Torres 6740a5998b
Merge pull request #93082 from cfhammill/cfh/fix-singularity-shell-copy
singularity-tools: Check for /bin/sh existence before symlink
2020-09-19 00:42:29 -03:00
Vladimír Čunát 372f89cc44
Merge branch 'master' into staging-next 2020-09-16 17:58:45 +02:00
Anderson Torres a5931fa6e3
Merge pull request #95409 from utdemir/stream_layered_image_fix
dockerTools.streamLayeredImage: Store the customisation layer as a tarball
2020-09-14 11:05:48 -03:00
WORLDofPEACE 4085eee678
Merge pull request #97801 from rycee/user-session-dbus2
Make socket activated user dbus session mandatory
2020-09-14 00:37:09 -04:00
WORLDofPEACE f5fdc6b240
Merge pull request #97894 from TethysSvensson/fixBusybox
busybox: Fix 404 error by using git instead
2020-09-13 14:25:22 -04:00
Tethys Svensson 43cd431b44 fetchgitlab: Escape a few more characters in the revision 2020-09-13 12:34:08 +02:00
Maximilian Bosch 25e60944c6
python3Packages.python-engineio: fix build w/glibc-2.32
Also had to wrap `__nss_files_fopen` in `libredirect` as this is the way
now `nss` uses to retrieve file-databases[1].

[1] https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=299210c1fa67e2dfb564475986fce11cd33db9ad;hp=469c03907b116c37c98d8ad7a9edac2bdbf3e934
2020-09-12 23:04:50 +02:00
Robert Helgesson fbc5093649
hooks: add moveSystemdUserUnitsHook
This hook moves systemd user service file from `lib/systemd/user` to
`share/systemd/user`. This is to allow systemd to find the user
services when installed into a user profile. The `lib/systemd/user`
path does not work since `lib` is not in `XDG_DATA_DIRS`.
2020-09-12 18:29:46 +02:00
Vladimír Čunát e88e14ec8d
Merge branch 'master' into staging-next
A few thousand rebuilds per platform have arrived in the meantime.
2020-09-11 14:24:13 +02:00
Tyson Whitehead 5796715bb7
Accept $TMP, $TMPDIR, $TEMP, and $TEMPDIR paths in purity check 2020-09-10 12:39:08 -04:00
John Ericson 5fd27509cf
Merge pull request #97387 from Ericson2314/fix-android-prebuilt
cc-wrapper: Fix for prebuilt android
2020-09-08 20:24:50 -04:00
John Ericson 204dc3a88b cc-wrapper: Fix for prebuilt android
We don't want to use Nix-built GCC's libs with prebuilt clang in this
case.
2020-09-07 15:08:11 -04:00
Dominik Xaver Hörl b20ec4f719 pkgs/build-support/writers: allow passing ghc arguments in writeHaskell 2020-09-07 19:36:58 +02:00
Frederik Rietdijk 5ceea5705a Revert "utils.bash: also "fix" cc-wrapper and pkg-config-wrapper"
Follow up to the revert in e560459c5b.

This reverts commit 1936b11f63.
2020-09-07 16:31:59 +02:00
Frederik Rietdijk be61518b91 Merge staging-next into staging 2020-09-07 16:31:37 +02:00
Frederik Rietdijk 1936b11f63 utils.bash: also "fix" cc-wrapper and pkg-config-wrapper 2020-09-07 07:19:26 +02:00
Frederik Rietdijk e560459c5b Revert "utils.bash: revert #93560 for darwin, unblocks channels"
Revert the hack and the original faulty commit.

This reverts commit 48264ee506105a2f5e61e5d327599e9f301bd77f.

Revert "Purity checking should accept $TMP and not just /tmp"

This reverts commit fb777be7d2.
2020-09-06 18:16:14 +02:00
Frederik Rietdijk 1d881848f8 Merge staging-next into staging 2020-09-06 18:15:07 +02:00
Frederik Rietdijk d362c0e54e Merge master into staging-next 2020-09-06 18:14:23 +02:00
Frederik Rietdijk 08eb704bc3 utils.bash: revert #93560 for darwin, unblocks channels
Temporary fix. We definitely do not want to have two separate
implementations.
2020-09-06 18:14:08 +02:00
Evan Stoll 19cb34b04b
buildSupport.rust: fix typo in verifyCargoDeps message (#97058) 2020-09-05 17:04:32 -04:00
Florian Klink 98d6b55fdc nixos/testing: remove remaining coverage-data logic
This isn't used anymore as per
https://github.com/NixOS/nixpkgs/pull/72354#discussion_r451031449.
2020-09-05 16:07:59 +02:00
Frederik Rietdijk af81d39b87 Merge staging-next into staging 2020-09-04 20:03:30 +02:00
Tyson Whitehead fb777be7d2 Purity checking should accept $TMP and not just /tmp 2020-09-04 19:58:46 +02:00
Jan Tojnar 5079e1cd3b
Merge pull request #96939 from jtojnar/drop-gst-010 2020-09-04 17:13:43 +02:00
Utku Demir ae82f81bfa
dockerTools.streamLayeredImage: Store the customisation layer as a tarball
This fixes as issue described here[1], where permissions set by 'extraCommands'
were ignored by Nix.

[1] https://github.com/NixOS/nixpkgs/pull/91084#issuecomment-669834938
2020-09-04 16:53:23 +12:00
Matthew Bauer 3a9b91b486
Merge pull request #96562 from obsidiansystems/bazel-add-dont-add-bazel-opts
build-bazel-package: add dontAddBazelOpts arg
2020-09-02 16:29:53 -05:00
John Ericson 1965a241fc
Merge pull request #61019 from volth/gcc.arch-amd
platform.gcc.arch: support for AMD CPUs
2020-09-01 22:31:16 -04:00
Jan Tojnar d2d24c9a2b
appimage: remove ancient gst dep
it is insecure and broken
2020-09-02 02:24:07 +02:00
Matthew Bauer 27fb209194 build-bazel-package: add dontAddBazelOpts arg
This adds an option to skip adding --copt and --linkopt to Bazel
flags. In some cases, Bazel doesn’t like these flags, like when a
custom toolchain is being used (as opposed to the builtin one. The
compiler can still get the dependencies since it is invoked through
gcc wrapper and picks up the NIX_CFLAGS_COMPILE / NIX_LDFLAGS.
2020-08-28 15:10:59 -05:00
Linus Heckemann 86fa61033a
Merge pull request #96008 from baloo/baloo/bugfixes/make-modules-closure_firmware
makeModulesClosure: fixup firmware extraction
2020-08-28 14:04:10 +02:00
Daniël de Kok 923c9f62c4 fetchCrate: accept pname besides crateName
This enables short argument attrsets similar to fetchPypi:

src = fetchCrate {
  inherit pname version;
  sha256 = "02h8pikmk19ziqw9jgxxf7kjhnb3792vz9is446p1xfvlh4mzmyx";
};
2020-08-28 08:34:22 +02:00
Arthur Gautier 70bc1a3f49 makeModulesClosuse: read modules from corrent kernel version
Before this commit, the firmware information would be loaded from the
currently running kernel, not from the kernel to be loaded.

This commit ensures the correct kernel version and modules are read.
2020-08-27 10:48:18 -07:00
Arthur Gautier ee8572d6b3 makeModulesClosure: fixup firmware extraction
After a recent upgrade of modinfo, its output is now incorrect for
builtin modules. This commit filters out the output until a fix is made
available upstream
2020-08-27 10:45:23 -07:00
Matthew Bauer 4830967736 Fix cc-wrapper in native stdenv 2020-08-26 14:36:26 -05:00
Jan Tojnar 58377555ed
Merge branch 'staging-next' into staging 2020-08-23 02:18:27 +02:00
Jan Tojnar 91104b5417
Merge branch 'master' into staging-next 2020-08-23 02:00:50 +02:00
Jörg Thalheim 542f4e4ad0
Merge pull request #95622 from marsam/buildrustpackage-parallel-build
buildRustPackage: add support for parallel build
2020-08-19 17:33:46 +01:00
Jörg Thalheim bd0e645f02
Merge pull request #94442 from Atemu/buildFHSUserEnvBw 2020-08-19 17:28:02 +01:00
Frederik Rietdijk 0ac85bc455 Merge master into staging-next 2020-08-17 14:54:39 +02:00
Jörg Thalheim b1d86d0e51 build-fhs-user-env-bubblewrap: consistent camelCase 2020-08-17 10:05:25 +02:00
Michael Eden 8c91b3c5b7 fhs-userenv-bubblewrap: bind mount host's devfs
Allows us to talk to devices
2020-08-17 08:49:34 +02:00
Michael Eden 2da4f24e22 fhs-userenv-bubblewrap: bind mount parts of host etc directly 2020-08-17 08:49:29 +02:00
Michael Eden 2ddb43ec24 fhs-userenv-bubblewrap: change to using bubblewrap over chrootenv 2020-08-17 08:49:24 +02:00
Atemu fafbfd2305 fhs-userenv-bubblewrap: start with build-fhs-userenv
Just here to track @illegalprime's actual changes to build-fhs-userenv in the
next commits
2020-08-17 08:48:31 +02:00
Mario Rodas b52808f1ad
buildRustPackage: add support for parallel build 2020-08-16 10:00:00 -05:00
Vladimír Čunát 3937923f81
nixos/systemd.tmpfiles.packages: fix an edge case
symlinkJoin can break (silently) when the passed paths contain symlinks
to directories.  This should work now.

Down-side: when lib/tmpfiles.d doesn't exist for some passed package,
the error message is a little less explicit, because we never get
to the postBuild phase (and symlinkJoin doesn't provide a better way):
/nix/store/HASH-NAME/lib/tmpfiles.d: No such file or directory

Also, it seemed pointless to create symlinks for whole package trees
and using only a part of the result (usually very small part).
2020-08-16 10:23:53 +02:00
Frederik Rietdijk cfe6081cee Merge staging-next into staging 2020-08-15 09:12:42 +02:00
Frederik Rietdijk d59c57f8a6
Merge pull request #92412 from matthewbauer/blas-cross
Blas/Lapack cross fixes
2020-08-15 08:55:57 +02:00
Jörg Thalheim 1f2c19f158
Merge pull request #68524 from nspin/pr/repo-manifest-name
fetchRepoProject: add manifestName parameter
2020-08-14 20:08:25 +01:00
Linus Heckemann efc739f1d2
Merge pull request #92081 from CrystalGamma/modules-closure
makeModulesClosure: handle builtin modules better
2020-08-13 22:37:36 +02:00
Frederik Rietdijk f707715136 Merge master into staging-next 2020-08-11 10:26:35 +02:00
zowoq 1439eaf07b buildRustCrate: editorconfig fixes 2020-08-09 17:47:12 +10:00
volth cf7b63df5b gcc.arch: refactor, move tables under lib/ 2020-08-05 11:18:26 +00:00
volth 463db72e63 platform.gcc.arch: support for AMD CPUs 2020-08-05 02:32:48 +00:00
John Ericson b5f7ed6846
Merge pull request #91293 from Ericson2314/cxx-wrapper-debt-part-2
treewide: Get rid of `cc.gcc`
2020-08-02 20:42:20 -04:00
John Ericson 92f96f47b0 treewide: Get rid of cc.gcc
Instead, we have a new `gccForLibs`, which has the appropriate
definition for e.g. avoiding `x86_32` linking problems.
2020-08-02 17:12:05 +00:00
Frederik Rietdijk 50c060d13d Merge master into staging-next 2020-08-01 19:37:20 +02:00
Johan Thomsen f5db415e2f nixos/tests/dockerTools: add test for running non-root containers with buildLayeredImage
Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
2020-07-31 10:14:07 +02:00
Johan Thomsen 9f86685cc7 dockerTools: fix permissions on /nix/store 2020-07-30 16:20:50 +02:00
Vladimír Čunát 60d89e5793
Merge branch 'master' into staging 2020-07-29 18:40:28 +02:00
John Ericson cd719c1eae
Merge pull request #91974 from Mic92/nostdinc
stdenv: make -nostdinc work as intended
2020-07-28 19:49:42 -04:00
Jan Tojnar d489409aaa
Merge pull request #85976 from jtojnar/wrap-gapps-hook-tests 2020-07-26 13:55:35 +02:00
Vladimír Čunát 2b7c0dcdaa
Merge branch 'staging-next'
Rebuild on Hydra seems OK-ish.
mongodb.nix needed some conflict resolution (scons versions);
all four versions seem to build fine.
2020-07-25 16:18:40 +02:00
Adrian a6133b7a39
writers.makeScriptWriter: fix on Darwin\MacOS (#93757)
* writers.makeScriptWriter: fix on Darwin\MacOS

On Darwin a script cannot be used as an interpreter in a shebang line, which
causes scripts produced with makeScriptWriter (and its derivatives) to fail at
run time if the used interpreter was wrapped with makeWrapper (as in the case
of python3.withPackages).

This commit fixes the problem by detecting if the interpreter is a script
and prepending its shebang to the final interpreter line.

For example if used interpreter is;
```
/nix/store/ynwv137n2650qy39swcflxbcygk5jwv1-python3-3.8.3-env/bin/python
```

which is a script with following shebang:
```
#! /nix/store/knd85yc7iwli8344ghav3zli8d9gril0-bash-4.4-p23/bin/bash -e
```

then the shebang line in the produced script will be
```
#! /nix/store/knd85yc7iwli8344ghav3zli8d9gril0-bash-4.4-p23/bin/bash -e /nix/store/ynwv137n2650qy39swcflxbcygk5jwv1-python3-3.8.3-env/bin/python
```

This works on Darwin since there does not seem to be a limit to the length
of the shabang line and the shebang lines support multiple arguments to
the interpreters (as opposed to linux where the kernel imposes a strict limit
on shebang lengh and everything following the interpreter is passed to it
as a single string).

fixes; #93609
related to: #65351 #11133 (and probably a bunch of others)

NOTE: scripts produced on platforms other than Darwin will remain unmodified
by this PR. However it might worth considering extending this fix to BSD systems
in general. I didn't do it since I have no way of testing it on systems other
than MacOS and linux.

* writers.makeScriptWriter: fix typo in comment

* writers.makeScriptWriter: fail build if interpreter of interpreter is a script
2020-07-25 11:47:20 +02:00
Lassulus a2ba53f4e1
Merge pull request #93758 from adrian-gierakowski/improve-writers.writePython
writers.writePython2 and writePython3: use "bare" python if no deps are needed
2020-07-25 11:43:56 +02:00
Jörg Thalheim 0216dbd769
Merge pull request #93165 from jbedo/singularity
singularity: 3.2.1 -> 3.6.1
2020-07-24 16:57:59 +01:00
Adrian Gierakowski 76437a88bb writers.writePython2 and writePython3: use "bare" python if no deps are needed
`python.withPackages` has a runtime dependecy on bash since it's wrapped with
`makeWrapper`. This fix avoids bash as runtime dependency when it's not
needed.

as discussed here: https://github.com/NixOS/nixpkgs/issues/93609#issuecomment-662880047
2020-07-24 11:39:01 +01:00
adisbladis e890823467
emacs: Add native builds for nativeComp enabled emacsen 2020-07-24 03:16:17 +02:00
Jan Tojnar 0be3b18d3e
wrapGAppsHook: add comments 2020-07-24 00:36:12 +02:00
Jan Tojnar 49b89afcc2
wrapGAppsHook: add tests 2020-07-24 00:36:04 +02:00
Jan Tojnar 69b89979ba
wrapGAppsHook: move to a separate file 2020-07-23 22:08:18 +02:00
Jörg Thalheim 96092dc936
stdenv: make -nostdinc work as intended
Right now we add glibc to search path also -nostdinc was provided,
which breaks projects providing their own gcc.
2020-07-23 08:39:46 +01:00
Frederik Rietdijk df0eab2726 Merge staging-next into staging 2020-07-22 16:50:25 +02:00
Daniël de Kok 68bd1c8552 blas: do not report an empty line for every checked symbol 2020-07-22 10:24:50 +02:00
Vladimír Čunát 7a5c6fee0f
Merge branch 'master' into staging-next
Some rebuilds, e.g. all of haskell.
Hydra nixpkgs: ?compare=1601713
2020-07-22 08:37:19 +02:00
Justin Bedo 712f1ee9aa
singularity: 3.2.1 -> 3.6.1 2020-07-22 08:51:37 +10:00
Ryan Mulligan b78ffda2b5
Merge pull request #93398 from IvarWithoutBones/appimage-run-fix
appimage: switch to gst-plugins-base 1.0
2020-07-21 08:12:13 -07:00
Vladimír Čunát 4244b73917
Merge branch 'master' into staging 2020-07-18 17:50:23 +02:00
IvarWithoutBones 0269421b7b appimage: switch to gst-plugins-base 1.0 2020-07-18 11:51:05 +02:00
zowoq 0f19b9ba72
Revert "Group packages by language/builder via dummy maintainer" 2020-07-18 17:45:08 +10:00
Luke Granger-Brown d7d4a92695 buildBazelPackage: add "fetchConfigured" for fetching only things required for the build
"bazel fetch" will, by default, fetch everything that _might_ be used,
including things that will later be discarded due to the way the build
is configured.

Concretely, this means that for some builds of Java packages, this will
avoid failures where the builder tries to retrieve the JDK from /usr/share/java
(or equivalent).

This also means that for most packages we can fetch _fewer_ dependencies,
since the standard tree pruning for artifacts to fetch will take effect.

fetchConfigured is disabled by default since it changes the fetch hashes
of tensorflow/tensorflow2 (since it ends up fetching less).
2020-07-17 18:29:58 +02:00
zowoq 2613e6d0e7 buildRustPackage: add nixpkgs-rust maintainer 2020-07-17 11:16:54 +10:00
CrystalGamma b155b1dafb makeModulesClosure: handle builtin modules better
The previous code discarded entire dependency trees if the first entry in the dependency list compiled by `modprobe --show-depends` is a builtin and otherwise handled its output in a rather hackish way.
2020-07-16 20:44:07 +02:00
Robert Hensing c1908bf802
Merge pull request #92934 from hercules-ci/dockerTools-set-imageTag
dockerTools: Always set imageTag attribute
2020-07-16 17:05:58 +02:00
Maximilian Bosch d2694d936e
rustPlatform: don't install artifacts modified by checkPhase
While the artifacts from `buildPhase` should be used for testing as
well, it should be avoided that those are modified during `checkPhase`.

This can happen if a package is built e.g. with special
`cargoBuildFlags` that don't apply to the `checkPhase`. In that case, a
binary would be installed into `$out` without those flags since
`checkPhase` overrides the binary in the `target`-directory.

This patch copies the state of `target/release` into a temporary
location at the end of the `buildPhase` and installs the results from
that temporary directory into `$out` while `checkPhase` can continue
using the configured build-dir.

cc #91689
Closes #93119
Closes #91191
2020-07-15 20:08:30 +02:00
Maximilian Bosch 7713fba8f8
Revert "buildRustPackage: fix cargoBuildFlags"
This reverts commit deb78151a9.

Mixing up two distinct phases of a derivation's build is not a good idea. See
also https://github.com/NixOS/nixpkgs/pull/91689#issuecomment-657813954.
2020-07-14 17:39:09 +02:00
cfhammill 8975b7b0e2 singularity-tools: Check for /bin/sh existence before symlink
Fixes the case where the user has bashInteractive in the
container contents
2020-07-13 17:20:14 -04:00
Robert Hensing 8c0459f611 dockerTools: Always set imageTag attribute
The image tag can be specified or generated from the output hash.
Previously, a generated tag could be recovered from the evaluated
image with some string operations.

However, with the introduction of streamLayeredImage, it's not
feasible to compute the generated tag yourself.

With this change, the imageTag attribute is set unconditionally,
for the buildImage, buildLayeredImage, streamLayeredImage functions.
2020-07-11 16:58:25 +02:00
Frederik Rietdijk ae8eee9c3f Merge master into staging-next 2020-07-11 08:59:54 +02:00
Jos van Bakel 66737168a4
dockerTools.buildLayeredImage: fix created=now 2020-07-09 09:34:18 +02:00
Matthew Bauer 669eb09bd5
Merge branch 'master' into fetchurl-no-hash 2020-07-06 14:40:49 -04:00
Utku Demir 06db331922
dockerTools: Verify nix-store contents on buildLayeredImage test 2020-07-06 16:59:58 +12:00
Utku Demir 2ae2186dfd
dockerTools.streamLayeredImage: Correctly copy hardlinks 2020-07-06 16:42:03 +12:00
Matthew Bauer e7ea3de835 blas: use $NM instead of nm
This is the right one on cross compilation.
2020-07-06 00:25:32 -04:00
Matthew Bauer f42aa7e1d7 cc-wrapper: set FC when langFortran is on
We need to set FC so that CMake and other tools can find the fortran
compiler. Also we need to limit the hardening flags since fortify and
format don’t work with fortran.

Fixes #88449
2020-07-06 00:22:19 -04:00
Utku Demir cc46362929
dockerTools: Support files directly under /nix/store
Also makes sure that the files inside a layer added in a sorted order
to make the results more deterministic.
2020-07-04 22:00:57 +12:00
Flakebi deb78151a9 buildRustPackage: fix cargoBuildFlags
When features were supplied in cargoBuildFlags, the binaries were built
with these features enabled. Unless checking was disabled, `cargo test`
was executed without these build flags, meaning the binaries were
rebuilt and overwritten without the specified features.

Fix this bug by running tests after the installation phase.
2020-07-03 08:53:57 +10:00
Vladimír Čunát 9dcb508f2d
Merge #92089: {cc,bintools}-wrapper: Some fixes 2020-07-02 23:23:04 +02:00
Frederik Rietdijk c33ca7c5ce Merge staging-next into staging 2020-07-02 17:14:53 +02:00
Vincent Laporte 885fb1406d ocamlPackages.buildOasis: fix handling of installation prefix 2020-07-02 07:13:34 +02:00
John Ericson 704daf7a6e {bintools,cc}-wrapper: Ensure nix-support/*-flags files exist
This will unbreak firefox and a few other packages which try to grab
some of the libcxx flags.
2020-06-30 18:26:37 +00:00
John Ericson 1085403acd {cc,bintools}-wrapper: Comments no longer spliced
This means we can freely keep the comments up to date without the
penalty of a mass rebuild.
2020-06-30 15:04:10 +00:00
piegames 51cc553307 make-desktopitem: refactoring, documentation and improvement
- New parameter `extraDesktopEntries` to easily add some less usual entries to the desktop file
- Rewrite of the core logic. Instead of a key-value-list, use an attribute set with nullable values to make it overridable
- Added some comments
- Some cosmetic/readability code refactors
	- I didn't like the doubly nested strings around the `fileValidation`
2020-06-29 23:23:50 +02:00
Alyssa Ross 1421404d42 stdenv: fix backward multiple outputs conditional
This is supposed to shareDocName to a fallback value if it can't be
determined from looking at the configure script.  But the conditional
checked whether shareDocName was set, rather than if it wasn't.  This
meant that if shareDocName had been detected from a configure script,
it would be immediately overridden by the package name, and if it
couldn't be detected, shareDocName would remain unset.

This resulted in QEMU installing files like $out/share/doc/index.html,
which should of course have been in $out/share/doc/qemu/index.html.

An interesting side effect of this is that, since
9f8751528c when this code was added, the
detected package name has never actually been used for installing
documentation, because it would always be overridden.  So this patch
will actually enable that for the first time, four years later.

Fixes: https://github.com/NixOS/nixpkgs/issues/90486
2020-06-29 13:56:27 +00:00
John Ericson fa54dd346f
Merge pull request #85189 from Ericson2314/cxx-wrapper-debt
C++ compilers: Be sane with standard libraries
2020-06-22 10:38:34 -04:00
DavHau c8c09b7dda add autoPatchelfIgnoreMissingDeps to auto-patchelf.sh 2020-06-22 10:41:35 +02:00
John Ericson f3f7612a40 C++ Compilers: Systematize handling of standard libraries 2020-06-22 04:24:44 +00:00
Utku Demir fa8f2bf34f
stream_layered_image: Use pathlib module for directory traversal 2020-06-22 15:11:04 +12:00
Utku Demir 16199521ea
stream_layered_image: Always set uid and gid to root 2020-06-21 12:35:39 +12:00
Utku Demir fe71abfc12
stream_layered_image: Clarify assertion failure 2020-06-21 12:35:39 +12:00
Utku Demir 87a538e149
stream_layered_image: Use more descriptive variable name 2020-06-21 12:35:39 +12:00
Utku Demir 4bff5b7f3d
dockerTools: Properly quote a shell variable 2020-06-21 12:35:39 +12:00
Utku Demir f1d7a09146
stream_layered_image: Add docstrings to functions 2020-06-21 12:35:38 +12:00
Utku Demir 26402290bf
stream_layered_image: Add main method 2020-06-21 12:35:38 +12:00
Utku Demir 307804d97d
dockerTools.streamLayeredImage: comments 2020-06-21 12:35:38 +12:00
Utku Demir 4ab7baf6f6
stream_layered_image.py: comments 2020-06-21 12:35:38 +12:00
Utku Demir a5a611cacb
Set mtime in even more places 2020-06-21 12:35:38 +12:00
Utku Demir 4e0109f873
Set mtime to get more deterministic builds 2020-06-21 12:35:37 +12:00
Utku Demir 560201da66
Implement dockerTools.streamLayeredImage 2020-06-21 12:35:32 +12:00
Robert Hensing 06469493de
Merge pull request #91085 from hercules-ci/fix-dockerTools-nix-symlinks
Fix docker tools nix symlinks
2020-06-19 12:01:47 +02:00
Robert Hensing 2dd94af186 dockerTools: keep symlinks to nix intact 2020-06-19 10:08:34 +02:00
Robert Hensing caf47063b4 dockerTools: test that tar keeps nix binary symlinks intact 2020-06-19 10:08:34 +02:00
Robert Hensing 11b0106cf9 dockerTools: add isExe to streamLayeredImage result 2020-10-05 10:48:17 +02:00
Frederik Rietdijk 4af4a49251 Merge master into staging-next 2020-06-16 18:05:38 +02:00
Andreas Rammhold d282a7e07f
Merge pull request #90193 from danieldk/build-rs-feature-env
buildRustCrate: set CARGO_FEATURE_* when running the build script
2020-06-16 14:19:56 +02:00
Lassulus 453014b456
Merge pull request #89245 from alexarice/agda-literate
agda: install literate files
2020-06-16 14:11:01 +02:00
Daniël de Kok fe50bab788 buildRustCrate: set CARGO_FEATURE_* when running the build script
Cargo sets `CARGO_FEATURE_*` for all features when running a build
script:

https://doc.rust-lang.org/cargo/reference/environment-variables.html#environment-variables-cargo-sets-for-build-scripts

Some crates have build scripts (e.g. openblas-src) that rely on the
feature variables being properly set.

Since we now need several representations of features, this change
also updates `createFeatures` to be a list of features, rather than
`rustc` feature arguments. `configureCrate` and `buildCrate` then
build the required representations as-needed.

Fixes #68978
2020-06-13 14:09:06 +02:00
Frederik Rietdijk 2e4b4e3300 Merge staging-next into staging 2020-06-13 11:03:26 +02:00
Frederik Rietdijk 1523382160 Merge master into staging-next 2020-06-13 11:02:21 +02:00
volth 54c4223e55 treewide: central.maven.org -> repo1.maven.org 2020-06-12 14:26:08 +00:00
Frederik Rietdijk febc27b59a Merge master into staging-next 2020-06-12 08:57:26 +02:00
Matthew Bauer f5c1ab06af
Merge pull request #89351 from dwarfmaster/fix-emacs-build
Fix building of emacsWithPackages not findind subdirs.el
2020-06-11 10:52:25 -05:00
José Romildo Malaquias 87eb2f4342
Merge pull request #90004 from romildo/buildenv
buildenv: paths to link resolving to the same absolute path is not a conflict
2020-06-11 12:50:31 -03:00
José Romildo Malaquias 4a1ef63c55 buildenv: paths to link resolving to the same absolute path is not a conflict
When building an environment if two paths conflict but one or both are
symbolic links and they resolve to the same real path, the conflict is
discarded because the contents of both paths are the same. One of them
is chosen and there is no need to recur into them in order to build
deeper symbolic links.
2020-06-10 06:42:48 -03:00
Matthew Bauer 0046802ab6 fetchurl: only allow empty hash when cacert is available
We can use cacert to validate that the data passes SSL certificates.
Normally, this doesn’t happen because we already have the hash, but in
the hash = "" case we don’t.
2020-06-09 12:56:27 -05:00
Matthew Bauer f2e9046de5 fetchurl: allow empty hash
Meant as a companion to https://github.com/NixOS/nix/pull/3674

This just resets outputHash if nothing is passed in.
2020-06-09 01:37:10 -05:00
Frederik Rietdijk 8576d24b2a Merge staging-next into staging 2020-06-08 12:08:51 +02:00
Frederik Rietdijk dc33419285 Merge master into staging-next 2020-06-08 12:06:12 +02:00
hyperfekt 0a8fb89fca rustPlatform: fix cross-compiling by using native diff 2020-06-08 10:05:00 +05:30
Frederik Rietdijk 1c68570ab2 Merge staging-next into staging 2020-06-05 19:42:16 +02:00
Frederik Rietdijk 43f71029cc Merge master into staging-next 2020-06-05 19:40:53 +02:00
Jörg Thalheim f0396574ab
buildRustPackage: add documentation on how to create cargo.lock patches 2020-06-05 10:41:46 +01:00
Vladimír Čunát 677e3960b5
Merge #82342: rustPlatform: increase build-speed of checkPhase
...for rust-packages (into staging)
2020-06-05 09:12:30 +02:00