Age | Commit message (Collapse) | Author | Files | Lines |
|
tests.references: use `runNixOSTest` instead of `nixosTest`
|
|
writeShellApplication: add argument extraShellCheckFlags
|
|
|
|
|
|
Test writeClosure instead of writeReferencesToFile.
Add multiple-path test for writeReferenceClosureToFile.
Rename variables:
- references -> closures (passthru affected)
- REFERENCES -> CLOSURES
|
|
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>
|
|
- 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.
|
|
I didn't have the opportunity to do all work at once, so I've added
TODOs to bring attention to the situation.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* 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>
|
|
|
|
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.
|
|
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"
```
|
|
|
|
tests.trivial-builders.references: refactor and move expressions into trivial-builders/test/references
|
|
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>
|
|
|
|
trivial-builders/test/references/
|
|
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.
|
|
|
|
|
|
Expose the minimal and stripped shellcheck package used by writeShellApplication.
|
|
|
|
`$name` contains cross-compilation info `bin/wrapped-argv0-aarch64-unknown-linux-gnu`
name should not be set directly.
|
|
|
|
|
|
|
|
There is no reason to not carry licenses and other information to any patched source.
This should improve our metadata in those situations.
|
|
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.
|
|
writeShellApplication: use shellcheck only where supported
|
|
|
|
|
|
|
|
|
|
|
|
... and add tests.
|
|
Fixes #242093 without breaking #237589
If `meta` is given we probably already have position information, so no
need to get it from the arguments.
|
|
|
|
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.
|
|
|
|
|
|
|
|
|
|
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.
|