From 866e07a8baa21707ec73109b6e502af4fe4c41bf Mon Sep 17 00:00:00 2001 From: "Klaus T. Aehlig" Date: Thu, 27 Jun 2024 16:30:53 +0200 Subject: nix-shell: also add a wrapper script besides the alias ... as aliases are not honored in `nix-shell --run`. In this way, we can add an outer script running all the tests in the correct environment. --- README.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'README.md') diff --git a/README.md b/README.md index 5ab1a0d..1ae6676 100644 --- a/README.md +++ b/README.md @@ -73,7 +73,8 @@ way as follows. pinned using [niv](https://github.com/nmattia/niv). - A [nix shell](./shell.nix) uses the derivation at the pinned snapshot of the `nixpkgs` and sets an alias for `just-mr` to - use the derived rc-file. + use the derived rc-file. It also adds a script `withRc-just-mr` + that execs `just-mr` with the derived rc-file. So to build with the correct dependencies for the checked out version, simply start a `nix-shell` at the top level of this repository and @@ -90,6 +91,11 @@ by using the current justbuild when checking out older snapshots, we can reconstruct the old actions without the need of cleaning up the local build root. +The just described way of working in a `nix-shell` using the +alias is useful for interactive development. For CI-like usage, +the script [run-tests](./run-tests) can be used that simply runs +`withRc-just-mr` in a `nix-shell`. + ## Shell commands The built-in rule `"generic"` allows to define a target by -- cgit v1.2.3