Commit Graph

6247 Commits

Author SHA1 Message Date
Artturi
3653f4ece2
Merge pull request #211260 from Artturin/testtweaks1 2023-01-19 13:12:18 +02:00
Yureka
8647006492
rustPlatform.importCargoLock: pass allRefs to builtins.fetchGit (#211298) 2023-01-18 01:57:36 +01:00
Robert Hensing
c696a19bfa multiple-outputs.sh: Apply suggestions from code review
Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
2023-01-17 21:18:59 +01:00
Artturin
3f3ca2d90d tests.testers.testBuildFailure.helloDoesNotFail: fix confusing output
the output made me think that the test failed but did not fail

testBuildFailure-helloDoesNotFail> Checking /nix/store/x6403x1llpk00i59cmr96iy92mx1f7hb-hello-2.12.1/testBuildFailure.log
testBuildFailure-helloDoesNotFail> testBuildFailure: The builder did not fail, but a failure was expected!
2023-01-17 20:49:24 +02:00
Artturin
40197595ce test.testers: fix getAllOutputNames not found 2023-01-17 20:34:36 +02:00
mdarocha
08e378f0d4 buildDotnetModule: proper escaping of disabledTests 2023-01-17 16:46:13 +01:00
Robert Hensing
d16e068b14 testers.testBuildFailure: Fix
A call to getAllOutputNames was added as part of the structuredAttrs
effort, but this script does not source `setup.sh`, so I repeat the
definition here.
Should be a bit quicker than `source setup.sh`.
2023-01-16 12:57:01 +01:00
Robert Hensing
01d7f19346 multi-outputs.sh: Improve _assignFirst error message
Closes #16182

This improves the error message

    Error: _assignFirst found no valid variant!

which occurred when the set of outputs was not sufficient to set
the various outputDev, outputBin, etc variables. Specifically, this
would mean that "out" is not among the outputs, which is valid for
a derivation.

This changes the message to something like

    error: _assignFirst: could not find a non-empty variable to assign to outputDev. The following variables were all unset or empty: dev out.
          If you did not define an "out" output, make sure to define all the specific required outputs: define an output for one of the unset variables.

While this isn't a full explanation of what stdenv can and can not do,
I think it's vast improvement over the 0 bits of information that it
used to provide. This at least gives a clue as to what's going on, and
even suggests a fix, although probably multiple such fixes are required
in an instance where someone starts with a no-out derivation from scratch
(and decide to persist).
2023-01-16 12:57:01 +01:00
Artturin
fe1c7a1945 treewide: remove usages of header and stopNest
they're obsolete
2023-01-16 00:08:12 +02:00
Guillaume Maudoux
aa7cfc3aed
Merge pull request #210908 from Yarny0/auto-patchelf
autoPatchelfHook: fix symlink handling
2023-01-15 17:18:01 +01:00
Yarny0
818d0f8cf1 auto-patchelf: don't resolve symlinks if basenames don't match
The auto-patchelf python script assembles a list of
library (so=shared object) file names and their paths.
This helps speed up the discovery of
library files later when patching elf files.
As further optimization, if a symlink points to a library file,
the script uses the resolved path and file name.
However, this produces a broken list entry if the
symlink's target name doesn't match the symlink's name.

A symptom of the bug, affecting the `tsm-client` package,
is fixed in https://github.com/NixOS/nixpkgs/pull/172372 .

The commit at hand stops resolving symlinks if
the target name differs from the symlink's name.
The commit has been authored by
layus (Guillaume Maudoux <layus.on@gmail.com>)
in pull request comment

https://github.com/NixOS/nixpkgs/pull/172372#issuecomment-1194687183
2023-01-15 10:57:22 +01:00
github-actions[bot]
142d3af1cb
Merge staging-next into staging 2023-01-15 00:03:07 +00:00
Mateusz Kowalczyk
22770e2381 buildRustCrate: fixup integration test mod name
Fixes #204051. I have tried this on the reproducer stated in the ticket.

```
[nix-develop]$ $(nix-build  -I nixpkgs=/home/shana/programming/nixpkgs --no-out-link)/tests/foo

running 1 test
test check_module_name ... ok

test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
```
2023-01-14 14:18:09 -05:00
github-actions[bot]
5ad514cb7e
Merge staging-next into staging 2023-01-14 18:01:41 +00:00
Artturi
1121c8fcb7
Merge pull request #185005 from amjoseph-nixpkgs/pr/fetchgit/fix-comment 2023-01-14 19:50:20 +02:00
Martin Weinelt
b974cf6522
Merge pull request #209180 from NixOS/staging-next 2023-01-14 16:26:39 +00:00
Artturin
6694168ccd unblock tarball job
nixpkgs-release-checks> Nixpkgs is not allowed to use <nixpkgs> to refer to itself.
nixpkgs-release-checks> The offending files: /nix/store/mpwvmd4mr2nx1ymw1b2r44lm34ff2vs7-source/pkgs/build-support/deterministic-uname/default.nix
2023-01-14 17:51:01 +02:00
Sergei Trofimovich
ca4da963f8 Merge remote-tracking branch 'origin/staging-next' into staging
Conflicts:
    pkgs/development/libraries/audio/roc-toolkit/default.nix
2023-01-14 11:07:42 +00:00
Sergei Trofimovich
67a3a14f24
Merge pull request #210004 from trofi/cc-fake-sysroot
build-support/cc-wrapper: pass in non-existent --sysroot= to untangle…
2023-01-14 08:18:56 +00:00
github-actions[bot]
4712ed9439
Merge master into staging-next 2023-01-14 00:02:26 +00:00
Artturi
3c3b3ab88a
Merge pull request #196334 from alyssais/pkg-config-cleanup 2023-01-13 22:22:39 +02:00
Artturi
567e81c363
Merge pull request #210102 from Artturin/fakeunameinit 2023-01-13 20:20:26 +02:00
github-actions[bot]
49722fd14a
Merge master into staging-next 2023-01-13 18:01:34 +00:00
Vladimír Čunát
befc83905c
Merge #209423: gnat12: add for x86_64-darwin 2023-01-13 18:32:21 +01:00
Adam Joseph
9297b5382f
default-crate-overrides.nix: add graphene-sys 2023-01-13 16:43:39 +00:00
Adam Joseph
e40de94c42 default-crate-overrides: add pkg-config to evdev-sys 2023-01-13 16:31:15 +00:00
Adam Joseph
62d571148a default-crate-overrides: servo-fontconfig-sys needs fontconfig 2023-01-13 16:18:27 +00:00
Alyssa Ross
979a975dbe
pkg-config: use dontUnpack instead of no-op phase 2023-01-13 16:01:13 +00:00
github-actions[bot]
9e72ff5c31
Merge staging-next into staging 2023-01-13 00:02:48 +00:00
Martin Weinelt
5342b695b1 Merge remote-tracking branch 'origin/master' into staging-next 2023-01-12 23:07:01 +01:00
Naïm Favier
bbb6af88eb agda: pass through meta 2023-01-12 22:26:05 +01:00
figsoda
b9259df616 rustPlatform.buildRustPackage: fix cross compiling auditable packages 2023-01-12 12:22:59 -05:00
Artturin
96ebc83053 deterministic-uname: init
for reproducibility

deterministic-uname: dont hardcode OPERATING_SYSTEM_VAL to GNU/Linux
2023-01-12 18:29:14 +02:00
github-actions[bot]
db669efe0d
Merge staging-next into staging 2023-01-11 06:02:05 +00:00
Martin Weinelt
c1e6c6af69 Merge remote-tracking branch 'origin/master' into staging-next 2023-01-11 03:51:33 +01:00
Adam Joseph
dfa3f14493 cc-wrapper: -march= is not allowed on powerpc
Gcc does not allow `-march=` on PowerPC:

  https://gcc.gnu.org/onlinedocs/gcc-12.2.0/gcc/RS_002f6000-and-PowerPC-Options.html#RS_002f6000-and-PowerPC-Options

Instead, `-mcpu=` should be used to set the minimum instruction set
and `-mtune=` is used to optimize instruction scheduling for a
specific processor.  Both flags take the same set of valid values,
which includes `native`.

This commit causes `isGccArchSupported` to return `false` for PowerPC
targets so we never pass an `-march=` flag, since that will always be
rejected by gcc.
2023-01-10 14:05:03 +01:00
Sergei Trofimovich
8c80bd08b7 build-support/cc-wrapper: pass in non-existent --sysroot= to untangle from libc
I would like to add an extra `gcc` build step during linux bootstrap
(https://github.com/NixOS/nixpkgs/issues/208412). This makes it early
bootstrap compiler linked and targeted against `bootstrapTools` `glibc`
including it's headers.

Without this change `gcc`'s spec files always prefer `bootstrapTools` `glibc`
for header search path (passed in as --with-native-system-header-dir=). We'can't
override it with:

- `-I` option as it gets stacked before gcc-specific headers, we need to keep
  glibc headers after gcc as gcc cleans namespace up for C standard by using
  #include_next and by undefining system macros.
- `-idirafter` option as it gets appended after existing `glibc`-includes

This `--sysroot=/nix/store/does/not/exist` hack allows us to remove existing
`glibc` headers and add new ones with `-idirafter`.

We use `cc-cflags-before` instead of `libc-cflags` to allow user to define
their own `--sysroot=` (like `firefox` does).

To keep it working prerequisite cross-symlink in gcc.libs is required:
https://github.com/NixOS/nixpkgs/pull/209153
2023-01-10 07:54:13 +00:00
Artturi
386f2bb148
Merge pull request #209255 from Artturin/stdenvupdate1
stdenv: don't fail installPhase on missing makefile
2023-01-10 03:48:17 +02:00
Artturi
27c1ec2ecf
Merge pull request #209816 from Artturin/deprecate-top-level-platform-aliases 2023-01-09 22:15:50 +02:00
Artturin
2eeb34c273 treewide: {build,host,target}Platform -> stdenv.{build,host,target}Platform 2023-01-09 21:13:22 +02:00
github-actions[bot]
33aa224777
Merge master into staging-next 2023-01-09 18:01:24 +00:00
Erik Arvstedt
89c457d847
build-dotnet-module: fix mktemp
Re-add missing `-t` arg which I erroneously removed in
a98e520855.

Without it, the tmpdir is created in $PWD.
2023-01-09 17:33:10 +01:00
Pavol Rusnak
9ede79d58b
Merge pull request #209357 from erikarvstedt/fix-dotnet-fetch-deps-tmpdir
build-dotnet-module: avoid `/run/user` for downloading packages
2023-01-09 16:12:38 +00:00
Artturin
033ec05960 setup-hooks/strip.sh: redirect stdout to dev/null
to not unnecessarily print

```
hello> ++ type -f strip
hello> strip is /nix/store/xzqzq99kbbkad23s2bf4bbrjppg6x0vj-bootstrap-stage2-gcc-wrapper-/bin/strip
```

printing what the strip command is is already done in stripDirs

`echo "stripping (with command $cmd and flags $stripFlags) in $paths"`
2023-01-08 21:02:22 +02:00
github-actions[bot]
b60b0a223e
Merge master into staging-next 2023-01-08 06:01:06 +00:00
Nick Cao
46ee37ca1d rustPlatform.bindgenHook: use the same clang/libclang as rustc 2023-01-08 15:22:04 +10:00
figsoda
45fc1f185f rustPlatform.fetchCargoTarball: default outputHashAlgo to sha256 2023-01-07 17:53:21 -05:00
Erik Arvstedt
a98e520855
build-dotnet-module: avoid /run/user for downloading packages
Inside `nix-shell`, `TMPDIR` (used by `mktemp`) is set to
`/run/user/<uid>` which is usually a tmpfs stored in RAM.

When fetching a large dotnet deps tree to this tmpdir from a
nix-shell (e.g. via `btcpayserver/update.sh`), this can easily exceed
system RAM and `fetch-deps` fails.

mktemp arg `-t` is deprecated and can be omitted.
2023-01-07 17:59:34 +01:00
Boey Maun Suang
a584587bea cc-wrapper: Wrap/link all other GNAT commands 2023-01-07 18:32:12 +11:00
Boey Maun Suang
c1308ac58c cc-wrapper: Fix gnatmake wrapper
Switches that gnatmake needs to pass to gcc must be given as
"-cargs <gcc_switches>" after at least the files to compile (see the
gnatmake docs for all the subtleties).  This commit makes that happen,
in a way that triggers rebuilds only for things that actually depend on
GNAT, and not the other compilers contained in GCC.
2023-01-07 18:32:12 +11:00
Boey Maun Suang
82b88d2db6 bintoolsDualAs: Add package
For reasons explained in the commit contents, in order to build the
native gnat package for x86_64-darwin, the native gnatboot package for
x86_64-darwin must have access to both the Clang integrated assembler
and the cctools GNU assembler for that platform.  This commit creates a
package with both of those assemblers that x86_64-darwin gnatboot can
then be wrapped with.
2023-01-07 18:32:12 +11:00
Martin Weinelt
5b308cd1df Merge remote-tracking branch 'origin/master' into staging-next 2023-01-06 19:10:05 +01:00
sternenseemann
c98cda29f7 srcOnly: prevent phases being skipped
Previously srcOnly would not work for e.g.
`srcOnly haskell.compiler.ghcjs`, as the custom `installPhase` would be
skipped if `dontInstall` is set. Consequently, we need to ensure that
the two skippable phases we need will always be executed.
2023-01-06 19:02:50 +01:00
Artturin
ba11c6f123 setup-hooks/make-symlinks-relative.sh: match what other hooks do so
the hook doesn't output the following if $prefix doesn't exist

find: '/nix/store/...': No such file or directory

some other hooks that do this: prune-libtool-files.sh, audit-tmpdir.sh separate-debug-info.sh
2023-01-06 18:56:54 +02:00
github-actions[bot]
ea5e5050f1
Merge master into staging-next 2023-01-06 06:01:11 +00:00
Jeremy Schlatter
2581bc08da
writers: fix typo in comment 2023-01-05 20:26:25 -08:00
Winter
8442601c64 rust: fix on aarch64-linux by using GCC 11 and passing -lgcc
This change switches to using GCC 11 by default on aarch64-linux, as well as passing `-lgcc` to the linker, per #201485.

See #201254 and #208412 for wider context on the issue.
2023-01-04 18:15:20 -05:00
Jan Tojnar
5810109b42 Merge branch 'staging-next' into staging
- readline6 attribute removed from all-packages.nix in d879125d61
- readline attribute was bumped to readline82 in 50adabdd60
2023-01-02 03:04:32 +01:00
Artturi
4c5307057a
Merge pull request #208358 from Artturin/makepkgconfigitemfixcross 2022-12-30 15:19:01 +02:00
Artturin
38602ad5c3 makePkgconfigItem: fix cross 2022-12-30 14:51:17 +02:00
Pol Dellaiera
8cd511dde1
feat: add passthru flags in PHP extension builder
So they can be handled correctly by `nix-update` tool
2022-12-29 18:19:12 +01:00
github-actions[bot]
351a07ba79
Merge staging-next into staging 2022-12-29 00:03:11 +00:00
markuskowa
fbc4d64b50
Merge pull request #207822 from quyse/vm_tools_ubuntu_2204
vmTools: add ubuntu 22.04
2022-12-28 19:23:33 +01:00
Sergei Trofimovich
092d57c076 Merge remote-tracking branch 'origin/staging-next' into staging
Conflicts:
    pkgs/development/tools/language-servers/ansible-language-server/default.nix
2022-12-28 09:35:37 +00:00
Artturi
f93a244d7c
Merge pull request #190613 from amjoseph-nixpkgs/pr/build-rust-crate/atk 2022-12-27 19:49:40 +02:00
Artturi
c584919520
Merge pull request #190614 from amjoseph-nixpkgs/pr/build-rust-crate/pangocairo 2022-12-27 19:48:23 +02:00
Artturi
3cb4b5cac4
Merge pull request #190603 from amjoseph-nixpkgs/pr/build-rust-crate/g_k4 2022-12-27 19:37:35 +02:00
Adam Joseph
b1a9bf530c
default-crate-overrides.nix: add pango-sys (#190604) 2022-12-27 19:36:30 +02:00
Artturi
88eb7d5d3f
Merge pull request #186761 from amjoseph-nixpkgs/pr/rust/default-crate-overrides/fix 2022-12-27 19:35:06 +02:00
Artturi
c1deac22a5
Merge pull request #190602 from amjoseph-nixpkgs/pr/build-rust-crate/cairo-sys-rs 2022-12-27 19:32:13 +02:00
Atemu
3eec3c8fed buildRustPackage: remove git from nativeBuildInputs
Having git in nativeBuildInputs causes thousands of rebuilds when git is touched
because every derivation that somehow transiently depends on a rust package will
change. See https://github.com/NixOS/nixpkgs/pull/205682 for instance.

AFAICT git is unused. Only the fetcher needs git which it has already.

Fixes https://github.com/NixOS/nixpkgs/issues/205804
2022-12-27 18:37:21 +10:00
Alexander Bich
aaa4244387 vmTools: add ubuntu 22.04 2022-12-26 10:58:52 +00:00
figsoda
b6c0e7f563
Merge pull request #205935 from figsoda/cargo-lock
rustPlatform.importCargoLock: add allowBuiltinFetchGit option
2022-12-25 19:38:36 -05:00
Jan Tojnar
72c37eddec Merge branch 'staging-next' into staging 2022-12-25 01:30:47 +01:00
figsoda
ca370da6d3
Merge pull request #206270 from figsoda/rustc
rustc: 1.65.0 -> 1.66.0
2022-12-23 18:09:56 -05:00
Winter
b1834a461e Revert "rustc: propagate libiconv on darwin"
This reverts commit b6fc00b8f4.

Rust 1.66.0 contains a fix for libiconv being linked unconditionally on macOS, but this only applies to packages that don't depend on older versions of `libc`.

For now, let's go back to including libiconv in `buildInputs` by default for packages that use `buildRustPackage`. As packages bump their `libc` versions, we can eventually stop including it by default, and manually add it where needed.
2022-12-23 13:55:46 -05:00
Artturi
0fbd19f3d9
Merge pull request #207315 from Artturin/fixcrossevalissues1 2022-12-23 18:50:57 +02:00
Walter Franzini
d2b0f9a9f6 dockerTools: make gzipped docker images faster to update by rsync
This passes --rsyncable / -R to pigz for input-determined block
locations, to improve rsync-ability.
2022-12-23 13:22:16 +01:00
Artturin
b36d9696c5 treewide: fix error: attribute 'runtimeShell' missing 2022-12-22 20:50:27 +02:00
Alok Parlikar
272bb3dfa6 pkg-config: prepend added flags
The go toolchain calls pkg-config using "--" to separate flags and
packages. For example:

pkg-config --cflags -- zlib

This breaks if addFlags are appended. This commit therefore prepends the
addFlags to the command.
2022-12-22 17:13:11 +00:00
Jan Tojnar
3c5fffed82
Merge pull request #206291 from jtojnar/mk-gsettings-patch
makeHardcodeGsettingsPatch: Support other constructors
2022-12-20 22:13:25 +01:00
Sandro
9c624f5879
Merge pull request #203117 from sikmir/vmtools
vmTools: update current maintained debian versions
2022-12-20 15:51:50 +01:00
Winter
865387061f npmHooks.npmBuildHook: fix diagnostic
Single quotes must be used when using graves in a quote, else Bash will interpret it as a command to run.

Thanks to Dimitri for catching this (8e651111b7 (commitcomment-92100762)).
2022-12-19 18:47:09 -05:00
Lily Foster
669f019379 npmHooks.npmConfigHook: make diagnostic match prefetch-npm-deps
This updates the diagnostic message for a missing package-lock.json to
match what fetchNpmDeps currently says
2022-12-19 18:47:09 -05:00
figsoda
424480f056
Merge pull request #206815 from SuperSandro2000/misc-cleanup
build-support: order comments above corresponding line
2022-12-19 16:46:18 -05:00
David McFarland
824d40aa04 build-dotnet-module: restore for current runtime by default 2022-12-19 15:36:25 -04:00
David McFarland
4c861dd26c build-dotnet-module: add useAppHost parameter so it can be disabled 2022-12-19 15:36:25 -04:00
David McFarland
62ecb39a1f buildDotnetModule: run tests on projectFile if testProjectFile is unset 2022-12-19 15:36:25 -04:00
David McFarland
507eff880d build-dotnet: make passthru.packages a derivation 2022-12-19 15:36:25 -04:00
David McFarland
06e4d89943 build-dotnet-module: strip --runtime flags without using rid 2022-12-19 15:36:25 -04:00
David McFarland
3fdb6c5a90 dotnetCorePackages: move systemToDotnetRid out of sdk 2022-12-19 15:36:25 -04:00
Jan Tojnar
4346dee424 makeHardcodeGsettingsPatch: Support other constructors
In addition to `g_settings_new`, there are three other GSettings constructors:
https://docs.gtk.org/gio/ctor.Settings.new.html
2022-12-19 17:38:57 +01:00
Jan Tojnar
35d24b51f5 makeHardcodeGsettingsPatch: Rename from glib.mkHardcodeGsettingsPatch
glib expression is messy enough as is.

Also rename the `glib-schema-to-var` argument to `schemaIdToVariableMapping` to better match Nixpkgs coding style.
2022-12-19 17:17:32 +01:00
Sandro Jäckel
b33ee831d3
build-support: order comments above corresponding line 2022-12-19 08:47:54 +01:00
github-actions[bot]
dc7ebb0163
Merge staging-next into staging 2022-12-18 18:01:41 +00:00
figsoda
ec8cb34358 treewide: fix typos 2022-12-17 19:39:44 -05:00
github-actions[bot]
f61e6f8d8e
Merge staging-next into staging 2022-12-16 18:02:14 +00:00
github-actions[bot]
ac36665726
Merge master into staging-next 2022-12-16 18:01:38 +00:00
Robert Hensing
922556a3d3
Merge pull request #191355 from GenericNerdyUsername/fetchzip-include-hidden
fetchzip: don't error out if the directory inside the archive starts with a "."
2022-12-16 18:08:36 +01:00
GenericNerdyUsername
725f4bc5be
fetchzip: don't error out if the directory inside the archive starts with a "." 2022-12-16 16:26:03 +00:00
Vladimír Čunát
59a68f487d
Merge branch 'staging-next' into staging 2022-12-16 11:20:50 +01:00
github-actions[bot]
b9ac6ee4d9
Merge master into staging-next 2022-12-16 00:02:17 +00:00
Artturin
05a2dfd674 lib.replaceChars: warn about being a deprecated alias
replaceStrings has been in nix since 2015(nix 1.10)

so it is safe to remove the fallback

d6d5885c15
2022-12-15 22:25:51 +02:00
github-actions[bot]
722750c19c
Merge staging-next into staging 2022-12-14 12:01:53 +00:00
github-actions[bot]
96a0e614c8
Merge master into staging-next 2022-12-14 12:01:19 +00:00
Artturi
7484378899
Merge pull request #205874 from Artturin/shellcheckunwrapped
trivial-builders.writeShellApplication: use unwrapped pandoc
2022-12-14 13:21:52 +02:00
Artturi
98dc68cb82
Merge pull request #205623 from Artturin/structuredtests1
tests.stdenv.hooks: add more tests
2022-12-13 19:43:57 +02:00
figsoda
cce3dc63a0 rustPlatform.importCargoLock: add allowBuiltinFetchGit option 2022-12-13 11:27:26 -05:00
Artturin
62e1d58a6f trivial-builders.writeShellApplication: use unwrapped pandoc
writeShellApplication does not need shellcheck docs

it takes ~1 hour to compile the dependencies of pandoc on r9 5900x
because haskell is so slow

$ nix path-info -r ".#sway" --derivation | wc -l
2357

$ nix path-info -r ".#sway" --derivation | wc -l
2055
2022-12-13 05:39:58 +02:00
github-actions[bot]
8506553217
Merge staging-next into staging 2022-12-13 00:02:51 +00:00
github-actions[bot]
a680c884cc
Merge master into staging-next 2022-12-13 00:02:19 +00:00
Artturin
3b3ef7b766 audit-tmpdir.sh: fix on darwin
compress-man-pages.sh uses `find ... | while ...; do...` so this works
on darwin

vcunat says the following in https://github.com/NixOS/nixpkgs/commit/94d164dd7#r22030369

> Unfortunately, process substitution doesn't work during early darwin bootstrap. http://hydra.nixos.org/build/52433342 We've run into that before.
> I think it should work to have `find ... | while ...; do...`
2022-12-13 00:57:35 +02:00
Artturin
af70ba03d3 build-support/setup-hooks: change shebang to shellcheck directive 2022-12-13 00:24:33 +02:00
Artturin
daab80e08d move-docs.sh: update comment
_multioutDocs is in multiple-outputs.sh
2022-12-12 21:39:56 +02:00
Bernardo Meurer
fc6c79f771
Merge pull request #204378 from Madouura/pr/rocm-related
Fixes https://github.com/NixOS/nixpkgs/issues/203949
2022-12-12 15:55:21 -03:00
Robert Hensing
16f5747575
Merge pull request #175649 from Artturin/opt-in-structured-attrs
stdenv: support opt-in __structuredAttrs
2022-12-10 21:12:43 +01:00
Madoura
72f5af191f
fetchGitHub: inherit owner and repo for use with rocmUpdateScript 2022-12-10 13:35:47 -06:00
figsoda
cfc6213879
Merge pull request #204686 from figsoda/auditable
rustPlatform.buildRustPackage: build auditable binaries
2022-12-09 16:46:45 -05:00
Artturi
91d19a6e66
Merge pull request #204692 from Artturin/relative-links-fix-error
make-symlinks-relative: fix no such file or directory if output is cr…
2022-12-09 19:27:41 +02:00
Vladimír Čunát
9c497bb8d6
Merge branch 'staging-next' into staging 2022-12-09 10:27:46 +01:00
Robert Hensing
454d2307ae nixosTests.docker-tools: Fix nginx test 2022-12-08 22:29:10 +01:00
Robert Hensing
3e28f972fc dockerTools: refactor, rename internal variable
> has to fit its domain, which is the OCI spec, which uses
> `architecture`. The `defaultArch` and `GOARCH` names are irrelevant.
2022-12-08 20:29:10 +01:00
Christian Kemper
f6ae4479ea dockerTools: allowing architecture to be specified
... for buildImage, buildLayeredImage and streamLayeredImage,
adding docs and tests.
2022-12-08 20:29:09 +01:00
Artturin
c01f509e44 treewide: source .attrs in builders
if theres a source $stdenv then this is needed

for structuredAttrs
2022-12-08 21:09:02 +02:00
Artturin
adc8900df1 treewide: fix some core package structuredAttrs 2022-12-08 21:05:28 +02:00
Yureka
03b2a82ca9 runInLinuxVM: fix on musl 2022-12-08 18:36:59 +01:00
Artturin
734d7df235 allow derivation attributes in env
derivations can be coerced to their output paths
2022-12-08 06:13:19 +02:00
Artturin
238a6053c4 stdenv: support opt-in __structuredAttrs
Co-authored-by: Robin Gloster <mail@glob.in>

stdenv: print message if structuredAttrs is enabled

stdenv: add _append

reduces the chance of a user doing it wrong

fix nix develop issue

output hooks don't work yet in nix develop though

making $outputs be the same on non-structuredAttrs and structuredAttrs
is too much trouble.

lets instead make a function that gets the output names

reading environment file '/nix/store/2x7m69a2sm2kh0r6v0q5s9z1dh41m4xf-xz-5.2.5-env-bin'
nix: src/nix/develop.cc:299: std::string Common::makeRcScript(nix::ref<nix::Store>, const BuildEnvironment&, const Path&): Assertion `outputs != buildEnvironment.vars.end()' failed.

use a function to get all output names instead of using $outputs

copy env functionality from https://github.com/NixOS/nixpkgs/pull/76732/commits
2022-12-08 06:13:19 +02:00
figsoda
a6137b73f9 cargo-auditable-cargo-wrapper: init 2022-12-07 00:23:43 -05:00
John Ericson
8890f3b893
Merge pull request #203766 from obsidiansystems/build-rust-crate-link-flags
buildRustCrate: Support `cargo:rustc-link-arg` and some friends from build.rs
2022-12-06 21:48:07 -05:00
Greg Pfeil
58eb3d3806 mkshell: refactor Bash snippet
I’ve been using https://github.com/Fuuzetsu/shellcheck-nix-attributes on most of
my derivations, and attaching it to one derived from `mkShell` resulted in

```
shellcheck_buildPhase

In /nix/store/8774inwznc87dwhac90winc9b5k6gmkb-nix-shell_shellcheck_buildPhase line 1:
echo "------------------------------------------------------------" >>$out
^-- SC2129 (style): Consider using { cmd1; cmd2; } >> file instead of individual redirects.
                                                                      ^--^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean:
echo "------------------------------------------------------------" >>"$out"

In /nix/store/8774inwznc87dwhac90winc9b5k6gmkb-nix-shell_shellcheck_buildPhase line 2:
echo " WARNING: the existence of this path is not guaranteed." >>$out
                                                                 ^--^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean:
echo " WARNING: the existence of this path is not guaranteed." >>"$out"

In /nix/store/8774inwznc87dwhac90winc9b5k6gmkb-nix-shell_shellcheck_buildPhase line 3:
echo " It is an internal implementation detail for pkgs.mkShell."   >>$out
                                                                      ^--^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean:
echo " It is an internal implementation detail for pkgs.mkShell."   >>"$out"

In /nix/store/8774inwznc87dwhac90winc9b5k6gmkb-nix-shell_shellcheck_buildPhase line 4:
echo "------------------------------------------------------------" >>$out
                                                                      ^--^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean:
echo "------------------------------------------------------------" >>"$out"

In /nix/store/8774inwznc87dwhac90winc9b5k6gmkb-nix-shell_shellcheck_buildPhase line 5:
echo >> $out
        ^--^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean:
echo >> "$out"

In /nix/store/8774inwznc87dwhac90winc9b5k6gmkb-nix-shell_shellcheck_buildPhase line 7:
export >> $out
          ^--^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean:
export >> "$out"

For more information:
  https://www.shellcheck.net/wiki/SC2086 -- Double quote to prevent globbing ...
  https://www.shellcheck.net/wiki/SC2129 -- Consider using { cmd1; cmd2; } >>...
```
——— https://garnix.io/build/qgxbameB

This addresses the shellcheck complaints.
2022-12-07 01:25:48 +01:00
Martin Weinelt
60f52f6c83 Merge remote-tracking branch 'origin/staging-next' into staging 2022-12-06 01:27:11 +01:00
github-actions[bot]
0ac4c6779e
Merge master into staging-next 2022-12-06 00:02:32 +00:00
figsoda
0e5137f267 rustPlatform.buildRustPackage: make it not auditable by default 2022-12-05 18:46:00 -05:00
figsoda
ff93685724
Merge pull request #199371 from figsoda/fetchCrate
fetchCrate: rewrite in terms of fetchzip
2022-12-05 18:15:33 -05:00
Artturin
6c01681679 make-symlinks-relative: fix no such file or directory if output is created in postFixup
wlroots(and others) have
```
wlroots> +++ find /nix/store/3a0xwszw8n5dzzhsgfnilvsqi4hk565s-wlroots-0.15.1-examples -type l -print0
wlroots> find: '/nix/store/3a0xwszw8n5dzzhsgfnilvsqi4hk565s-wlroots-0.15.1-examples': No such file or directory
```

because the examples output is created in postFixup while this hook runs in fixupPhase
2022-12-06 00:08:11 +02:00
figsoda
8a041c63c0 rustPlatform.buildRustPackage: build auditable binaries 2022-12-05 16:18:17 -05:00
Sandro
4484c12d81
Merge pull request #196449 from natto1784/crate-overrides 2022-12-05 22:00:51 +01:00
Jörg Thalheim
1a70303230
Merge pull request #204497 from Mic92/go-build
buildGo{module,package}: do not build with verbose flags
2022-12-05 13:43:36 +01:00
Martin Weinelt
2c56dc4832 Merge remote-tracking branch 'origin/staging-next' into staging 2022-12-04 22:07:03 +01:00
Martin Weinelt
fe8eef1ae4 Merge remote-tracking branch 'origin/master' into staging-next 2022-12-04 22:06:42 +01:00
Jörg Thalheim
4a94d77712 buildGo{module,package}: do not build with verbose flags
This creates a lot of noise that can hide actual compile errors.
2022-12-04 16:42:53 +01:00
figsoda
75c01e730d
Merge pull request #203520 from figsoda/nextest
rustPlatform.buildRustPackage: add cargo-nextest support
2022-12-03 19:03:34 -05:00
Luke Granger-Brown
d6b617b124
Merge pull request #203743 from lukegb/yubioath-flutter
yubioath-flutter: init at 6.0.2
2022-12-03 12:10:43 -08:00
github-actions[bot]
1ac9e3255b
Merge staging-next into staging 2022-12-03 06:02:18 +00:00
github-actions[bot]
7ec4183673
Merge master into staging-next 2022-12-03 06:01:28 +00:00
Sandro
02e6e7a535
Merge pull request #202765 from mdarocha/roslyn-update 2022-12-03 05:27:19 +01:00
Martin Weinelt
e3da5a807b Merge remote-tracking branch 'origin/staging-next' into staging 2022-12-03 01:28:01 +01:00
github-actions[bot]
a83c4dd193
Merge master into staging-next 2022-12-03 00:02:19 +00:00
Zane van Iperen
1d0b9702fc bintools-wrapper: add dlltool, dllwrap, windmc, and windres 2022-12-03 00:28:59 +01:00
Guillaume Girol
c1c6998684
Merge pull request #203598 from symphorien/appimage-owd
appimage-run: export OWD
2022-12-02 20:12:49 +00:00
Robert Hensing
dbdd8fad26 testers.testBuildFailure: Read last log line without final newline 2022-12-02 16:12:50 +00:00
Victor Engmark
f7cbf3f7ca build-support: Quote expansions inside ${…}
As per ShellCheck:

> SC2295 (info): Expansions inside ${..} need to be quoted separately,
> otherwise they match as patterns.
2022-12-02 04:59:43 -05:00
Luke Granger-Brown
8a4ef88653 mkFlutterApp: support apps which don't produce a .packages 2022-12-02 03:22:52 +00:00
github-actions[bot]
7ea4004879
Merge master into staging-next 2022-12-01 06:01:22 +00:00
Robert Hensing
c2f071abc2
Merge pull request #182250 from Artturin/fetchpatch2
fetchpatch2: init
2022-12-01 01:31:46 +00:00
github-actions[bot]
cb51cfe745
Merge master into staging-next 2022-11-30 18:01:11 +00:00
Nick Cao
994deb2bf1 cc-wrapper: fix path to libcxx includes for cross compilers 2022-11-30 18:46:16 +01:00
John Ericson
fde3b57055 buildRustCrate: Support cargo:rustc-link-arg and some friends from build.rs
See https://doc.rust-lang.org/nightly/cargo/reference/build-scripts.html#rustc-link-argfor details. We are supporting:

 - `cargo:rustc-link-arg`
 - `cargo:rustc-link-arg-bins`
 - `cargo:rustc-link-arg-lib`

at this time.

`cargo:rustc-link-arg-bin` is left as future work because the per-binary
flag keeping is more difficult.
2022-11-30 11:40:50 -05:00
github-actions[bot]
aff62e907a
Merge master into staging-next 2022-11-30 06:01:30 +00:00
Izorkin
fc7eef65a2 dockerTools: fix nginx test 2022-11-30 15:23:43 +10:00
github-actions[bot]
843fc7a4a5
Merge master into staging-next 2022-11-29 18:01:54 +00:00
figsoda
1341c60941
Merge pull request #203561 from l0b0/fix/macos-sierra-reexport-hack-SC2242
build-support: Use equivalent valid exit code
2022-11-29 11:41:21 -05:00
Guillaume Girol
c0cdf0ad4b appimage-run: export OWD
documented here: https://docs.appimage.org/packaging-guide/environment-variables.html

Fixes #203330
2022-11-29 12:00:00 +00:00
Victor Engmark
2a028c4f46 build-support: Use equivalent valid exit code
`exit -1` is equivalent to `exit 255`, since Bash does modulo 256 on the
number.

As per ShellCheck:

> SC2242 (error): Can only exit with status 0-255. Other data should be
> written to stdout/stderr.
2022-11-29 19:11:45 +13:00
figsoda
d3eb606296 rustPlatform.buildRustPackage: add useNextest option to check with cargo-nextest 2022-11-28 17:00:17 -05:00
figsoda
0643540f97 rustPlatform.cargoNextestHook: init 2022-11-28 16:59:52 -05:00
github-actions[bot]
38af11b9ce
Merge staging-next into staging 2022-11-27 18:01:39 +00:00
Robert Schütz
547b3d2131
Merge pull request #202767 from dotlambda/appimageTools-python3
appimageTools: remove python2 from FHS env
2022-11-27 09:51:35 -08:00
Artturi
91f186baa6
Merge pull request #201611 from Artturin/removealiasusages
Cleanup
2022-11-27 15:13:35 +02:00
github-actions[bot]
86adbaf70c
Merge staging-next into staging 2022-11-27 12:01:45 +00:00
Vladimír Čunát
94d6c732d1
dockerTools: fixup evaluation without allowed aliases
This is a regression from PR #172736
2022-11-27 10:37:55 +01:00
github-actions[bot]
d3e80e4be3
Merge staging-next into staging 2022-11-27 06:01:56 +00:00
figsoda
4e86ddcdc7
Merge pull request #202957 from figsoda/appimage
appimageTools.wrapType2: passthru src to make nix-update work
2022-11-27 00:17:34 -05:00
github-actions[bot]
f1f9569cde
Merge staging-next into staging 2022-11-27 00:03:04 +00:00
Nikolay Korotkiy
dd1c4ff5fc
vmTools: update current maintained debian versions 2022-11-26 23:53:24 +03:00
Silvan Mosberger
a566d0842e
Merge pull request #172736 from infinisil/docker-nix-shell 2022-11-26 20:21:59 +01:00
figsoda
e2b62ea76c appimageTools.wrapType2: passthru src to make nix-update work 2022-11-25 21:41:37 -05:00
github-actions[bot]
627e652b73
Merge staging-next into staging 2022-11-26 00:02:47 +00:00
Winter
7ab5323cfb npmHooks.npmInstallHook: pass --no-save to prune 2022-11-25 15:47:05 -05:00
Sandro Jäckel
fde0382efd buildNpmPackage: forward pre/postPatch to fetchNpmDeps 2022-11-25 15:47:05 -05:00
Sandro
84477691f7 fetchNpmDeps: allow package-json.lock symlinks, update hint 2022-11-25 15:47:05 -05:00
mdarocha
8e7296e984 buildDotnetModule: generate a NuGet.config with source
Some references, like <Sdk />, ignore the --source argument.
To fix that, we generate a simple NuGet.config containing only
the given nuget source.
2022-11-25 18:50:44 +01:00
Robert Schütz
f76fb4ed68 appimageTools: remove python2 from FHS env
It has been EOL since January 1, 2020.
2022-11-25 09:04:06 -08:00
Artturin
3452cd8316 tests.fetchurl: remove alias usage 2022-11-24 22:32:34 +02:00
Lily Foster
b023946d2b prefetch-npm-deps: fix hash stability
GNU tar will apparently silently include mtime of files if --mtime is
passed with an unrecognized date format. This led to hash instability
from those mtimes and this fixes it to force all mtimes to epoch
timestamp 0.
2022-11-23 20:52:08 -05:00
github-actions[bot]
26b9cf3d24
Merge staging-next into staging 2022-11-23 12:01:56 +00:00
Jörg Thalheim
83c19c791d
Merge pull request #200757 from Flakebi/rocm-test
nixos/tests: add ROCm and amdvlk tests
2022-11-23 09:56:05 +01:00
github-actions[bot]
e31b8a36d7
Merge staging-next into staging 2022-11-23 00:02:46 +00:00
figsoda
82fe76d1cd carnix,cratesIO: remove 2022-11-22 14:10:25 -05:00
Sebastian Neubauer
76a4adc19c makeImpureTest: init function for hardware tests
Add a function to create tests that use hardware from the host system
like GPUs.
2022-11-22 16:54:32 +01:00
github-actions[bot]
66da6215fb
Merge staging-next into staging 2022-11-22 00:03:02 +00:00
Winter
009a234bdd prefetch-npm-deps: repack hosted git deps
Previously, we stored the tarballs from the hosted Git providers directly in the cache. However, as we've seen with `fetchFromGitHub` etc, these files may change subtly.

Given this, this commit repacks the dependencies before storing them in the cache.
2022-11-21 15:00:08 -05:00
Winter
091d039b12 prefetch-npm-deps: deduplicate dependencies when parsing lockfile
A `package-lock.json` file can contain multiple instances of the same dependency, which caused unnecessary downloads and duplicate index entries in the generated cache.
2022-11-21 15:00:08 -05:00
Winter
b117b359db prefetch-npm-deps: move tests to separate file 2022-11-21 15:00:08 -05:00
Winter
3d5f77f496 npmHooks.npmConfigHook: sugget specifying legacy peer deps option for all commands 2022-11-21 15:00:08 -05:00
Winter
93334f5234 npmHooks.npmInstallHook: pass install flags to prune 2022-11-21 15:00:08 -05:00
Winter
80ecb954e9 npmHooks.npmConfigHook: add diagnostic for when dependencies aren't provided 2022-11-21 15:00:08 -05:00
Winter
c0e7124bcc npmHooks.npmConfigHook: add some missing quotes around variable assignments 2022-11-21 15:00:08 -05:00
Winter
68d5b19fca npmHooks.npmConfigHook: also patch shebangs after rebuilding 2022-11-21 15:00:08 -05:00