about summary refs log tree commit diff
path: root/pkgs/build-support/trivial-builders.nix
AgeCommit message (Collapse)AuthorFilesLines
2023-03-30Revert "symlinkjoin: print warning when keeping existing file"Naïm Favier1-2/+2
2023-03-07trivial-builders.writeShellApplication: use unwrapped shellcheckArtturin1-2/+4
originally done in 62e1d58a6fbced03205afd00ec0e896d2ac26c45 but reverted in 6d8041b0532c8b51a93f68c9737feecbb195d32a because it contained many haskell deps
2023-03-07Merge pull request #219860 from hesiod/write-shell-applicationIlan Joselevich1-1/+1
writeShellApplication: Prefer lib.getExe over unwrapped ShellChecked
2023-03-07writeShellApplication: Prefer lib.getExe over unwrapped ShellCheckedTobias Markus1-1/+1
writeShellApplication currently uses the unwrapped (passthru) attribute which is simply defined as the ShellCheck Haskell package. Unfortunately the unwrapped version contains everything and the kitchen sink, while the bin output of the top-level shellcheck package contains only the static shellcheck executable. In other words, by using writeShellApplication, currently 3GB of packages have to be unnecessarily fetched just to run the checkPhase. $ nix path-info -Sh $(nix build --print-out-paths --no-link nixpkgs#shellcheck.unwrapped) /nix/store/23x8702b9kqn0r8swah05ky7w5fnh6m2-ShellCheck-0.9.0 3.0G $ nix path-info -Sh $(nix build --print-out-paths --no-link nixpkgs#shellcheck.bin) /nix/store/594izb2jz3c57c7hgxfnb6irypnr4575-shellcheck-0.9.0-bin 45.3M There is no benefit to using shellcheck.unwrapped in this case. Therefore, replace shellcheck.unwrapped with lib.getExe shellcheck.
2023-02-07add docs for makeSetupHookArtturin1-28/+1
2023-02-07makeSetupHook: deprecate deps argumentArtturin1-2/+3
2023-02-07treewide: makeSetupHook deps -> propagatedBuildInputsArtturin1-26/+26
2023-02-07makeSetupHook: support depsTargetTargetPropagatedArtturin1-6/+14
2023-02-05symlinkJoin: print warning when keeping existing filemilahu1-2/+2
2023-02-02Docs/fix: make doc-strings nixdoc compliant (#213570)Johannes Kirschbauer1-318/+385
* re-format all doc-strings to make them nixdoc compliant * reformat comments to make them markdown-renderable
2023-01-19makeSetupHook: make "name" argument mandatoryAlyssa Ross1-1/+10
It's very frustrating to try to read through a derivation graph full of derivations that are all just called "hook", so let's try to avoid that.
2022-12-19build-support: order comments above corresponding lineSandro Jäckel1-4/+5
2022-12-13trivial-builders.writeShellApplication: use unwrapped pandocArtturin1-1/+1
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-11-15linkFarm: make last entry win in case of list repeatsBernardo Meurer1-1/+2
2022-11-15Merge pull request #170048 from lovesegfault/link-farm-passthruRobert Hensing1-10/+26
linkFarm: add entries to passthru
2022-11-15linkFarm: allow entries to be an attrsetBernardo Meurer1-10/+22
2022-11-15linkFarm: add entries to passthruBernardo Meurer1-8/+12
2022-09-19Merge pull request #186323 from ShamrockLee/make-setuphook-passthruRobert Hensing1-1/+21
trivial-builders.nix: Add input argument `passthru` to makeSetupHook
2022-08-23writeShellApplication: don't prefix empty PATHJonathan Ringer1-0/+2
2022-08-13makeSetupHook: Deprecate substitutions.passthruRobert Hensing1-3/+13
2022-08-13trivial-builders.nix: Add input argument `passthru` to makeSetupHookShamrock Lee1-1/+11
One significant use case is adding `passthru.tests` to setup-hooks, and help increase test coverage for mission-critical setup-hooks. As `meta`, `passthru` doesn't go into the build script directly. However, passing an empty set to `passthru` breaks nixpkgs-review and OfBorg tests, so pass it only when specified.
2022-06-07treewide: remove usage of runCommandNoCC aliasesSandro Jäckel1-1/+0
2022-05-25treewide: add enableParallelBuilding's to bootstrap packages so hashes stay ↵Artturin1-0/+1
the same when enableParallelBuildingByDefault is enabled verified with `nix-diff $(nix eval ".#gcc-unwrapped.drvPath") $(nix eval --expr 'with import ./. { config = { enableParallelBuildingByDefault = true; }; }; gcc-unwrapped.drvPath' --impure)`
2022-05-22treewide: enable strictDeps in bootstrap packagesArtturin1-0/+1
2022-05-22trivial-builders.nix: add TODOArtturin1-0/+1
2022-05-16Merge pull request #173206 from SuperSandro2000/writeCBinJörg Thalheim1-4/+4
writeCBin: fix formatting
2022-05-16writeCBin: fix formattingSandro1-4/+4
2022-05-15Escape pathsJules Aguillon1-1/+1
Co-authored-by: pennae <82953136+pennae@users.noreply.github.com>
2022-05-14Fix string context lost in `linkFarm`Jules Aguillon1-1/+1
```nix let pkgs = import ./. {}; in pkgs.linkFarm "test" [ { name = "foo"; path = ./README.md; } ] ``` The nix code above generates this result: (`nix build -f test.nix`) ``` lrwxrwxrwx 1 root root 31 Jan 1 1970 /nix/store/98mdz626n99w0467q4r203q154bnnli9-test/foo -> /home/juloo/w/nixpkgs/README.md ``` With this patch, the target file is naturally copied into the store: ``` lrwxrwxrwx 1 root root 53 Jan 1 1970 /nix/store/ndvffnardifqwzbp07g15llav55r5k1m-test/foo -> /nix/store/9rqwjskbbgbflrpyhzi6rak2j7jspr5f-README.md ```
2022-04-22testers.testVersion: move from trivial-builders.nixArtturin1-37/+0
we will have more testers in the future so they should have their own location putting 'testers' in args will also make it simpler to use multiple testers
2022-04-17Merge pull request #168703 from Artturin/testversion1Artturi1-2/+6
2022-04-14testVersion: when there is a error show the whole errorArtturin1-2/+6
before $ nix build ".#whipper.tests.version" whipper> File "/nix/store/2iiyy58pmm1ys6dy8ycbmmmfm67iakv1-whipper-0.10.0/bin/.whipper-wrapped", line 6, in <module> whipper> File "/nix/store/2iiyy58pmm1ys6dy8ycbmmmfm67iakv1-whipper-0.10.0/lib/python3.9/site-packages/whipper/__init__.py", line 5, in <module> note: keeping build directory '/tmp/nix-build-whipper-0.10.0-test-version.drv-7' after $ nix build ".#whipper.tests.version" whipper> Traceback (most recent call last): whipper> File "/nix/store/2iiyy58pmm1ys6dy8ycbmmmfm67iakv1-whipper-0.10.0/bin/.whipper-wrapped", line 6, in <module> whipper> from whipper.command.main import main whipper> File "/nix/store/2iiyy58pmm1ys6dy8ycbmmmfm67iakv1-whipper-0.10.0/lib/python3.9/site-packages/whipper/__init__.py", line 5, in <module> whipper> from pkg_resources import (get_distribution, whipper> ModuleNotFoundError: No module named 'pkg_resources' note: keeping build directory '/tmp/nix-build-whipper-0.10.0-test-version.drv-34' error: builder for '/nix/store/5lxjicdhwgmjcz9ddlxgq3s3gyaa6lz4-whipper-0.10.0-test-version.drv' failed with exit code 1;
2022-04-06Merge staging-next into staginggithub-actions[bot]1-2/+1
2022-04-05Merge #165406: staging-next 2022-03-23Vladimír Čunát1-1/+1
2022-03-30runCommand*: Rely on mkDerivation to sanitize nameRobert Hensing1-2/+1
2022-03-26Merge pull request #163924 from OPNA2608/fix/autoPatchelfHook_isLinuxBen Siraphob1-3/+7
2022-03-22autoPatchelfHook: Make Linux-exclusiveOPNA26081-3/+7
After being rewritten in https://github.com/NixOS/nixpkgs/pull/149731, this hook can fail on Mach-O binaries. Since patching ELF files on Darwin doesn't make much sense anyway, we'll mark this as Linux-exclusive.
2022-03-10build-support/writeTextFile: fix for names with spacesK9001-1/+1
I am sorry.
2022-01-10Merge branch 'staging-next' into stagingJan Tojnar1-0/+61
; Conflicts: ; nixos/doc/manual/from_md/release-notes/rl-2205.section.xml ; nixos/doc/manual/release-notes/rl-2205.section.md ; pkgs/build-support/libredirect/default.nix
2021-12-27tests.trivial-builders.overriding: update after shellDryRunNaïm Favier1-9/+9
2021-12-27stdenv/generic: introduce shellDryRunNaïm Favier1-3/+3
Add `shellDryRun` to the generic stdenv and substitute it for uses of `${stdenv.shell} -n`. The point of this layer of abstraction is to add the flag `-O extglob`, which resolves #126344 in a more direct way.
2021-11-28concatScript: formattingpasqui231-1/+1
Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
2021-11-28concatText: fix typosPasquale1-11/+7
2021-11-28concatTextFile: initPasquale1-0/+65
nixos/networking: using concatTextFile
2021-11-20testVersion: name runCommand after package.name0x4A6F1-1/+1
2021-11-08writeShellApplication: set meta.mainProgramBernardo Meurer1-7/+10
2021-11-08writeTextFile: allow passing extra derivationArgsBernardo Meurer1-1/+2
2021-11-08writeShellApplication: run pre/postCheck hooksBernardo Meurer1-0/+2
2021-11-08writeShellApplication: document runtimeShell == stdenv.shell assumptionBernardo Meurer1-0/+4
2021-11-08writeShellApplication: fix typo in inline docsBernardo Meurer1-1/+1