Commit Graph

8297 Commits

Author SHA1 Message Date
Philip Taron
3e0f69b8c9
treewide: use a consistent meta.priority default (#338223) 2024-08-29 14:15:22 -07:00
Artturin
65bf97a942
buildFHSEnv: use relative symlinks (#330712) 2024-08-29 20:57:43 +03:00
Philip Taron
ae92f312bf
treewide: use a consistent meta.priority default 2024-08-29 09:04:57 -07:00
adisbladis
9c7ff7277c
importNpmLock.buildNodeModules: init
`importNpmLock.buildNodeModules` returns a derivation with a pre-built `node_modules` directory, as imported by `importNpmLock`.
This is to be used together with `importNpmLock.hooks.linkNodeModulesHook` to facilitate `nix-shell`/`nix develop` based development workflows:

```nix
pkgs.mkShell {
  packages = [
    importNpmLock.hooks.linkNodeModulesHook
    nodejs
  ];

  npmDeps = importNpmLock.buildNodeModules {
    npmRoot = ./.;
    inherit nodejs;
  };
}
```
will create a development shell where a `node_modules` directory is created & packages symlinked to the Nix store when activated.

This code is adapted from https://github.com/adisbladis/buildNodeModules
2024-08-29 06:12:07 -07:00
seth
278e1bfb89
yarnConfigHook: apply as a postConfigure hook
This follows in this example of npmConfigHook and allows for using this
hook alongside others that may override configurePhase
2024-08-28 23:30:55 -04:00
lassulus
9eda2c63f4
writers.*: use lib.makeBinPath in documentation (#337437) 2024-08-26 13:20:29 +02:00
Alexander Sieg
3b0ba6a6e1
writers.*: use lib.makeBinPath in documentation
This also fixes a syntax error with `,` being used as a array element
separator.
2024-08-26 12:19:19 +02:00
Silvan Mosberger
ea17c502d2 tests.trivial-builders: Prevent rebuilds when Nix files change
There's no need to use a Nix file in the path here. By using a different
file we won't cause rebuilds when we change the Nix file, in particular
also when the Nix file is reformatted.
2024-08-25 04:59:11 +02:00
Gabriella Gonzalez
0b6fa5ee40
virtualisation.oci-containers: Add new imageStream option (#335430)
This adds a new `imageStream` option that can be used in conjunction
with `pkgs.dockerTools.streamLayeredImage` so that the image archive
never needs to be materialized in the `/nix/store`.  This greatly
improves the disk utilization for systems that use container images
built using Nix because they only need to store image layers instead of
the full image.  Additionally, when deploying the new system and only
new layers need to be built/copied.
2024-08-24 04:38:27 +02:00
Adam Joseph
bbb42450c5 default-crate-overrides: proc-macro-crate assumes env::var("CARGO")
Since version 2.0.0, proc-macro-crate has assumed it can exec()
`env::var("CARGO")` in order to run `cargo locate-project`.

This commit adds a crate override to proc-macro-crate which simply writes the
path to buildPlatform.cargo into the proc-macro-crate sources.

This way we don't need to set `env.CARGO` for every build that depends on
proc-macro-crate -- if we do that, the $CARGO environment variable would be
visible to the entire build.  This could potentially lead to incredibly
hard-to-troubleshoot heisenbugs if there is some other crate that expects
`env::var("CARGO")` to exist -- that other crate would mysteriously work only
in projects that use proc-macro-crate but not anywhere else!
2024-08-23 09:36:47 +03:00
Philip Taron
f300433fcc
Merge pull request #336383 from motiejus/compress-drv-docs 2024-08-21 12:46:48 -07:00
Motiejus Jakštys
26249b62fd compressDrv: fix a confusing comment 2024-08-21 21:52:00 +03:00
Sigmanificient
f03b7856a6 makePythonWriter: add doCheck toggle 2024-08-21 19:17:36 +02:00
Pol Dellaiera
dbc4f15b89
Merge pull request #308059 from drupol/build-support/php/remove-composer-local-repo-plugin
build-support/php: init `buildComposerProject2` and `mkComposerRepository2`
2024-08-20 18:38:44 +02:00
Philip Taron
be245de559
Merge pull request #333262 from nbraud/doc/runCommandWith
nixpkgs-manual: Document `runCommandWith`, refactor `runCommand{,CC,Local}`
2024-08-19 12:29:58 -07:00
nicoo
80e3fd91a9 doc/build-helpers: document runCommandWith
Co-authored-by: Johannes Kirschbauer <hsjobeki+github@gmail.com>
2024-08-19 19:16:42 +00:00
Sandro Jäckel
0505523e98
compress-drv: correct comment 2024-08-19 13:19:27 +02:00
Sandro Jäckel
0654f81d56
compress-drv: carry pname, version forward
This is required to overwrite to use a compressed version of nextcloud in services.nextcloud.package because the module accesses version
2024-08-19 13:17:05 +02:00
Sandro Jäckel
4cc5dee048
compress-drv: allow passing extra arguments to find
This is useful for eg. nextcloud to prevent compressing thousands of
later unused files which are actually not used by the web server.
2024-08-19 13:15:55 +02:00
Sandro Jäckel
0ca4bfa700
compress-drv: add zstd 2024-08-19 13:15:54 +02:00
Sandro Jäckel
9581a2bdca
compress-drv: misc cleanup 2024-08-19 13:15:54 +02:00
Sandro Jäckel
6449d32b0a
compress-drv: add htm, otf formats to default 2024-08-19 13:15:46 +02:00
Sandro Jäckel
7ebbf27832
compress-drv: sort formats 2024-08-19 13:15:46 +02:00
Philip Taron
bd346e9f29
Merge pull request #335575 from felschr/make-startupitem-extra-args-fix
make-startupitem: fix {prepend,append}ExtraArgs for Exec without arguments
2024-08-18 19:56:39 -07:00
Motiejus Jakštys
1bd350449a gitea: fix passthru.data-compressed
Fixes two bugs:
- pass a forgotten `{}` to `compressDrv`.
- remove incorrect usage of `lndir` in `compressDrv`. I added a brief
  comment on why, see [this comment][1] for more details.

Tested with:

```
$ nix build .#legacyPackages.x86_64-linux.gitea.passthru.data-compressed
$ ls -lh result/public/assets/licenses.txt*
lrwxrwxrwx 1 root root  90 Jan  1  1970 result/public/assets/licenses.txt -> /nix/store/p21irsr57hckd3x3ym18aa0cr9zmm3an-gitea-1.22.1-data/./public/assets/licenses.txt
-r--r--r-- 1 root root 30K Jan  1  1970 result/public/assets/licenses.txt.br
-r--r--r-- 1 root root 82K Jan  1  1970 result/public/assets/licenses.txt.gz
```

[1]: https://github.com/NixOS/nixpkgs/pull/332752#discussion_r1721043286
2024-08-18 22:47:03 +03:00
Philip Taron
661aa513a1
writers: remove with statements from aliases 2024-08-18 06:31:14 -07:00
Philip Taron
c406a6ed33
fetchsvn: remove with statements 2024-08-18 06:31:14 -07:00
Felix Schröter
498d662662
make-startupitem: fix {prepend,append}ExtraArgs for Exec without arguments 2024-08-18 12:28:06 +02:00
Philip Taron
bc0fb46cd2
Merge pull request #334995 from pbsds/fix-test-version-1723771306 2024-08-17 07:53:03 -07:00
Philip Taron
cd7b95ee37
Merge pull request #333236 from nbraud/testers/runCommand
testers.runCommand: init
2024-08-16 18:07:41 -07:00
Peder Bergebakken Sundt
ecb342fd4e testers.testVersion: ignore echoed store paths
Fixes the error mode where the test always passes if the store path of the binary is echoed by the test command.
2024-08-16 20:16:44 +02:00
Someone
10ce447aea
Merge pull request #333843 from ShamrockLee/singularity-tools-fixes2
singularity-tools: miscellaneous fixes (2nd round)
2024-08-15 17:29:01 +00:00
Yueh-Shun Li
c2eb0aa56e singularity-tools: don't preserve store content ownership
Don't preserve store content ownership to prepare for unprivileged-build
workflow.
2024-08-15 21:33:18 +08:00
Yueh-Shun Li
c229d14f50 singularity-tools: proper line looping with while-read 2024-08-15 21:33:06 +08:00
Yueh-Shun Li
5396a84b1d singularity-tools: string-interpolate and and quote members in contents
String-interpolation converts path objects inside `contents` into store
paths to ensure they are properly included in the result image.

See tests.trivial-builders.references for the necessity of
string-interpolation.

Quote each string-interpolated content member to accomodates spaces
inside.
2024-08-15 20:09:56 +08:00
Pol Dellaiera
65c0e4ebf6
build-support/php: implement v2 2024-08-15 13:43:00 +02:00
Pol Dellaiera
b356a808fd
build-support/php: copy v1 into v2 2024-08-15 13:43:00 +02:00
Markus Kowalewski
b909e2c80d
Merge pull request #333444 from markuskowa/fix-mpi-check-hook
mpiCheckPhaseHook: update to use openmpi-5 compatible parameters
2024-08-15 11:34:51 +02:00
lassulus
4b3c31b884
Merge pull request #334776 from aos/aos/update-writepy3-example
fix: Update writePython3Bin docs
2024-08-15 07:42:45 +02:00
Aos Dabbagh
55e4114fb3 fix: Update writePython3Bin docs
Was trying out the recommended example for `writePython3Bin` and it
failed with:
```
Traceback (most recent call last):
  File "/nix/store/gcmhfm7mslpndjasfhvs66f1ca24vxim-test_py3/bin/test_py3", line 4, in <module>
    y = yaml.load("""
TypeError: load() missing 1 required positional argument: 'Loader'
```

Looks like `yaml.load(input)` was deprecated in 5.1: https://msg.pyyaml.org/load

`nixos-24.05` uses `6.0.1` so we're in the clear.
2024-08-15 00:57:39 -04:00
github-actions[bot]
261f1edcbd
Merge master into staging-next 2024-08-14 06:01:07 +00:00
adisbladis
bed19bdf39 fetchPypiLegacy: Pass cacert to enable TLS verification when username/password is used
The intent was for TLS verification to be enabled when transfering credentials only, and normally disabled for long-term reproducibility.

See https://github.com/nix-community/poetry2nix/issues/1740
2024-08-14 13:22:31 +12:00
adisbladis
e5d7d560f8
Merge pull request #334059 from adisbladis/fetchpypilegacy-netrc-pureeval
fetchPypiLegacy: pass NETRC via impureEnvVars if inPureEval
2024-08-14 13:16:46 +12:00
adisbladis
482a26382f fetchPypiLegacy: pass NETRC via impureEnvVars if inPureEval
Co-authored-by: Matthew Croughan <matt@croughan.sh>
2024-08-14 11:58:15 +12:00
Martin Weinelt
0906206d42
Merge remote-tracking branch 'origin/master' into staging-next
Conflicts:
- pkgs/top-level/python-packages.nix
2024-08-13 13:21:03 +02:00
adisbladis
14e1662fa6
Merge pull request #334136 from hsjobeki/importNpmLock/opts
importNpmLock: init fetcherOps per package
2024-08-13 20:59:12 +12:00
Johannes Kirschbauer
3ed5055f0f
importNpmLock: init fetcherOps per package 2024-08-13 09:38:37 +02:00
Markus Kowalewski
b898495c9a mpiCheckPhaseHook: update to use openmpi-5 compatible parameters 2024-08-12 21:45:24 +02:00
github-actions[bot]
62f43c3094
Merge master into staging-next 2024-08-12 18:02:11 +00:00
Philip Taron
7fbfc53b54
Merge pull request #334176 from philiptaron/pr-333270/follow-up
pkgs.writers: improve documentation on {makeScriptWriter,makeScriptWriterBin}
2024-08-12 09:16:24 -07:00