about summary refs log tree commit diff
path: root/pkgs/build-support/trivial-builders
AgeCommit message (Collapse)AuthorFilesLines
2024-06-20Merge pull request #292759 from ShamrockLee/test-references-darwinRobert Hensing1-8/+15
tests.references: use `runNixOSTest` instead of `nixosTest`
2024-04-22Merge pull request #300538 from ShamrockLee/write-shell-application-extraPeder Bergebakken Sundt1-2/+8
writeShellApplication: add argument extraShellCheckFlags
2024-04-12NixOS Integration tests: Re-enable for macOSJacek Galowicz1-5/+1
2024-04-01writeShellApplication: add argument extraShellCheckFlagsYueh-Shun Li1-2/+8
2024-03-19tests.trivial-builders.references: test writeClosureYueh-Shun Li5-38/+52
Test writeClosure instead of writeReferencesToFile. Add multiple-path test for writeReferenceClosureToFile. Rename variables: - references -> closures (passthru affected) - REFERENCES -> CLOSURES
2024-03-19writeClosure: init, replacing writeReferencesToFileYueh-Shun Li2-10/+37
Replace writeReferencesToFile with writeClosure. Make writeClosure accept a list of paths instead of a path. Re-implement with JSON-based exportReferencesGraph interface provided by __structuredAttrs = true. Reword the documentation. Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io> Co-authored-by: Robert Hensing <roberth@users.noreply.github.com> Co-authored-by: Someone Serge <sergei.kozlukov@aalto.fi>
2024-03-17tests.references: migrate from nixosTest to runNixOSTestYueh-Shun Li1-8/+15
- Use testers.runNixOSTest instead of testers.nixosTest as nixosTest has become obsolete. - Prepare for cross-platform testing. - Use the testScriptBin passthru'd by the references test package inside the guest pkgs.
2024-03-11trivial-builders: Deduplicate docsRobert Hensing1-100/+47
I didn't have the opportunity to do all work at once, so I've added TODOs to bring attention to the situation.
2024-02-29applyPatches: Fix a bug (#283887)Thomas Lepoix1-6/+7
2024-02-01writeShellApplication: Expand test suiteRebecca Turner1-20/+132
2024-02-01writeShellApplication: Document argumentsRebecca Turner1-36/+68
2024-02-01writeTextFile,writeShellApplication: Allow setting extra argumentsRebecca Turner1-5/+8
2024-02-01writeShellApplication: Add `runtimeEnv` argumentRebecca Turner1-1/+10
2024-02-01writeShellApplication: Add `bashOptions` argumentRebecca Turner1-3/+2
2024-01-15doc: use markdown backticks for code tokensValentin Gagarin1-6/+6
2024-01-15Merge pull request #277534 from mcdonc/doc-trivial-builders-writetextValentin Gagarin1-95/+12
* doc: improve documentation for trivial text writing functions Co-authored-by: Brian Merchant <bzm3r@proton.me> Co-authored-by: Robert Hensing <robert@roberthensing.nl> Co-authored-by: Alexander Groleau <alex@proof.construction> Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
2024-01-15trivial-builders: Remove redundant docs - link insteadRobert Hensing1-95/+12
2024-01-12applyPatches: skip creating additional drv when no patchesAndrew Marshall1-1/+4
If there are no `patches` or `postPatch`, then this will just do work to make something equivalent to `src`. Instead, just return `src` in that case.
2024-01-08doc: add note on which variables are effectiveValentin Gagarin1-0/+1
The build log of the following won't output `foo` as one might expect, but the `$PATH` set by stdenv. ```nix with import <nixpkgs> {}; runCommand "foo" { PATH = "foo"; } "echo $PATH; touch $out" ```
2024-01-08doc: reformatValentin Gagarin1-205/+229
2023-12-09Merge pull request #204462 from ShamrockLee/test-referencesRobert Hensing10-159/+225
tests.trivial-builders.references: refactor and move expressions into trivial-builders/test/references
2023-12-09tests.trivial-builders.references: specify as empty set instead of null on ↵Yueh-Shun Li1-1/+1
non-Linux Please Nix CI (OfBorg) with empty set instead of null on non-linux platforms, where NixOS tests are not supported. Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
2023-12-08tests.trivial-builders.references: add ShamrockLee as a maintainerYueh-Shun Li1-0/+1
2023-12-08tests.trivial-buildrs.references: move expression files into ↵Yueh-Shun Li4-1/+1
trivial-builders/test/references/
2023-12-07tests.trivial-builders.references: refactor expressionYueh-Shun Li8-89/+148
Define package `testScriptBin` that contains the substituted test script. * Add an `installCheckPhase` to check the result script with ShellCheck. * Passthru as `references.testScriptBin` to run the (substituted) test script directly (without VM). * Drop the logic in build script that detects if it is run in the Nix sandbox. * Inline sample application; drop invoke-*.nix. Format expressions. * Format with `nixpkgs-fmt`. * Use multi-line style of set patterns. Call the samples with `callPackage`. * Rename `sample` -> `samples`. * Take individual packages / build helpers directly from the set pattern. * Define `cleanSamples` to filter out overriders such as `<pkg>.override`. added by `callPackage`. Passthru samples and invocation results for easier debugging. * Passthru samples, references, directReferences * Provide tests.trivial-builders.writeStringReferencesToFile with such samples argument.
2023-12-02trivial-builders: add onlyBinRobert Scott1-0/+13
2023-11-30trivial-builders/test/references-test.sh: lint with ShellCheckShamrock Lee1-13/+19
2023-11-01shellcheck-minimal: initYueh-Shun Li1-3/+3
Expose the minimal and stripped shellcheck package used by writeShellApplication.
2023-10-15writeShellApplication: exclude shell checkscon-f-use3-1/+35
2023-09-21writers.writeCBin: fix binary name when cross-compilingArtturin1-5/+5
`$name` contains cross-compilation info `bin/wrapped-argv0-aarch64-unknown-linux-gnu` name should not be set directly.
2023-09-01Merge pull request #251369 from srid/writeShellApplication-metafigsoda1-1/+2
2023-08-25trivial-builders: add meta to writeShellApplicationSridhar Ratnakumar1-1/+2
2023-08-20applyPatches: fix adding meta informationMaximilian Bosch1-1/+1
2023-08-20trivial-builders/applyPatches: carry `meta` information to the patched sourceRaito Bezarius1-2/+6
There is no reason to not carry licenses and other information to any patched source. This should improve our metadata in those situations.
2023-08-11trivial-builders: add meta.mainProgram to writeShellScriptBinCharlie Moog1-0/+1
Derivations built with `writeShellScriptBin` should always be runnable with `nix run`. At present, the derivation is missing both `meta.mainProgram` and `pname`– this means that `nix run` falls back to inferring the bin path from `name`. This is unreliable and depends on faulty heuristics. For context, reference the following snippet from `nix run --help`: If installable evaluates to a derivation, it will try to execute the program <out>/bin/<name>, where out is the primary output store path of the derivation, and name is the first of the following that exists: · The meta.mainProgram attribute of the derivation. · The pname attribute of the derivation. · The name part of the value of the name attribute of the derivation.
2023-08-09Merge pull request #240348 from fgaz/write-shell-application/check-platformsFrancesco Gazzetta1-3/+11
writeShellApplication: use shellcheck only where supported
2023-08-05writeShellApplication: use shellcheck only where supportedFrancesco Gazzetta1-3/+11
2023-08-04requireFile: fix error message with SRI hashesK9001-2/+3
2023-07-26tests.trivial-builders.writeTextFile: Test meta.mainProgram logicRobert Hensing1-31/+68
2023-07-26tests.trivial-builders.references: Only run where supportedRobert Hensing1-2/+6
2023-07-26trivial-builders: Move test list closerRobert Hensing1-0/+29
2023-07-26writeCBin: Add meta.mainProgramRobert Hensing4-1/+129
... and add tests.
2023-07-07runCommand: don't set meta.position if meta is givenNaïm Favier1-0/+2
Fixes #242093 without breaking #237589 If `meta` is given we probably already have position information, so no need to get it from the arguments.
2023-06-30makeSetupHook: unbreak structuredAttrsByDefaultArtturin1-0/+4
2023-06-14runCommand: set meta.position from the argumentsNaïm Favier1-0/+4
Currently all packages defined by a call to runCommand have their meta.position pointing to trivial-builders.nix. This change makes uses of runCommand that supply at least one attribute in the second argument point to the right file.
2023-05-31writeTextFile: revert workaround for `executable = null`figsoda1-1/+1
2023-05-29writeTextFile: fix when executable is not a boolfigsoda1-1/+1
2023-05-27writeTextFile: set meta.mainProgram based on destinationfigsoda1-5/+8
2023-05-26writeScriptBin, writeShellScriptBin: add meta.mainProgram automaticallyYueh-Shun Li1-1/+2
2023-05-06trivial-builders: move into the directory named alike (#223429)Sandro1-0/+900
While searching for something different I wondered why there is a trivial-builders.nix file next to the trivial-builders directory where only tests live. Lets fix that.