Commit Graph

4148 Commits

Author SHA1 Message Date
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
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
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
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