mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-18 19:51:17 +00:00
nixos/doc/writing-nixos-tests: Remove flake info for now
This commit is contained in:
parent
f40ff7f1f1
commit
3ce4179374
|
@ -70,20 +70,9 @@ nix-build -A nixosTests.hostname
|
|||
Outside the `nixpkgs` repository, you can instantiate the test by first importing the NixOS library,
|
||||
|
||||
```nix
|
||||
# regular nix
|
||||
let nixos-lib = import (nixpkgs + "/nixos/lib") { };
|
||||
in
|
||||
```
|
||||
|
||||
```nix
|
||||
# flake
|
||||
let nixos-lib = nixpkgs.lib.nixos;
|
||||
in
|
||||
```
|
||||
|
||||
... and then invoking `runTest`, for example:
|
||||
|
||||
```nix
|
||||
nixos-lib.runTest {
|
||||
imports = [ ./test.nix ];
|
||||
hostPkgs = pkgs; # the Nixpkgs package set used outside the VMs
|
||||
|
|
|
@ -88,19 +88,9 @@ nix-build -A nixosTests.hostname
|
|||
instantiate the test by first importing the NixOS library,
|
||||
</para>
|
||||
<programlisting language="bash">
|
||||
# regular nix
|
||||
let nixos-lib = import (nixpkgs + "/nixos/lib") { };
|
||||
in
|
||||
</programlisting>
|
||||
<programlisting language="bash">
|
||||
# flake
|
||||
let nixos-lib = nixpkgs.lib.nixos;
|
||||
in
|
||||
</programlisting>
|
||||
<para>
|
||||
… and then invoking <literal>runTest</literal>, for example:
|
||||
</para>
|
||||
<programlisting language="bash">
|
||||
|
||||
nixos-lib.runTest {
|
||||
imports = [ ./test.nix ];
|
||||
hostPkgs = pkgs; # the Nixpkgs package set used outside the VMs
|
||||
|
|
Loading…
Reference in a new issue