Skip to content

Commit c64d185

Browse files
authored
Merge pull request #256 from numtide/chore/update-nix-vm-test
Update nix-vm-test
2 parents a5d6c2b + bc26293 commit c64d185

File tree

3 files changed

+48
-48
lines changed

3 files changed

+48
-48
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ System Manager is currently only supported on NixOS and Ubuntu. However, it can
141141
}
142142
```
143143

144-
> \[!WARNING\]
144+
> [!WARNING]
145145
> This is unsupported and untested. Use at your own risk.
146146
147147
## Commercial support

flake.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
);
2222
nix-vm-test-lib =
2323
let
24-
rev = "f01e096295c8ace5f367985e323e3263eb7f9434";
25-
sha256 = "sha256:11gqxnhdrpb025wybbb0wmpy2xzjaa6ncs55zbw8i2nzchkzrfvh";
24+
rev = "e34870b8dd2c2d203c05b4f931b8c33eaaf43b81";
25+
sha256 = "sha256:1qp1fq96kv9i1nj20m25057pfcs1b1c9bj4502xy7gnw8caqr30d";
2626
in
2727
"${
2828
builtins.fetchTarball {

package.nix

Lines changed: 45 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -14,53 +14,53 @@
1414
let
1515
cargoManifest = (lib.importTOML ./Cargo.toml).package;
1616
system-manager-unwrapped = rustPlatform.buildRustPackage {
17-
pname = "system-manager";
18-
version = cargoManifest.version;
19-
src = lib.fileset.toSource {
20-
root = ./.;
21-
fileset = lib.fileset.unions [
22-
./Cargo.toml
23-
./Cargo.lock
24-
./src
25-
./test/rust
26-
];
27-
};
28-
29-
cargoLock.lockFile = ./Cargo.lock;
30-
buildInputs = [ dbus ];
31-
nativeBuildInputs = [
32-
pkg-config
17+
pname = "system-manager";
18+
version = cargoManifest.version;
19+
src = lib.fileset.toSource {
20+
root = ./.;
21+
fileset = lib.fileset.unions [
22+
./Cargo.toml
23+
./Cargo.lock
24+
./src
25+
./test/rust
3326
];
27+
};
3428

35-
nativeCheckInputs = [
36-
clippy
37-
nix
38-
];
29+
cargoLock.lockFile = ./Cargo.lock;
30+
buildInputs = [ dbus ];
31+
nativeBuildInputs = [
32+
pkg-config
33+
];
3934

40-
preCheck = ''
41-
${lib.getExe cargo} clippy
35+
nativeCheckInputs = [
36+
clippy
37+
nix
38+
];
4239

43-
# Stop the Nix command from trying to create /nix/var/nix/profiles.
44-
#
45-
# https://nix.dev/manual/nix/2.24/command-ref/new-cli/nix3-profile#profiles
46-
export NIX_STATE_DIR=$TMPDIR
47-
'';
48-
};
40+
preCheck = ''
41+
${lib.getExe cargo} clippy
42+
43+
# Stop the Nix command from trying to create /nix/var/nix/profiles.
44+
#
45+
# https://nix.dev/manual/nix/2.24/command-ref/new-cli/nix3-profile#profiles
46+
export NIX_STATE_DIR=$TMPDIR
47+
'';
48+
};
4949
in
50-
runCommand "system-manager"
51-
{
52-
nativeBuildInputs = [ makeBinaryWrapper ];
53-
passthru = {
54-
# The unwrapped version takes nix from the PATH, it will fail if nix
55-
# cannot be found.
56-
# The wrapped version has a reference to the nix store path, so nix is
57-
# part of its runtime closure.
58-
unwrapped = system-manager-unwrapped;
59-
};
60-
}
61-
''
62-
makeWrapper \
63-
${system-manager-unwrapped}/bin/system-manager \
64-
$out/bin/system-manager \
65-
--prefix PATH : ${lib.makeBinPath [ nix ]}
66-
''
50+
runCommand "system-manager"
51+
{
52+
nativeBuildInputs = [ makeBinaryWrapper ];
53+
passthru = {
54+
# The unwrapped version takes nix from the PATH, it will fail if nix
55+
# cannot be found.
56+
# The wrapped version has a reference to the nix store path, so nix is
57+
# part of its runtime closure.
58+
unwrapped = system-manager-unwrapped;
59+
};
60+
}
61+
''
62+
makeWrapper \
63+
${system-manager-unwrapped}/bin/system-manager \
64+
$out/bin/system-manager \
65+
--prefix PATH : ${lib.makeBinPath [ nix ]}
66+
''

0 commit comments

Comments
 (0)