chore: update fmt
This commit is contained in:
parent
4c724c1ece
commit
bc262933ac
2 changed files with 48 additions and 48 deletions
|
|
@ -141,7 +141,7 @@ System Manager is currently only supported on NixOS and Ubuntu. However, it can
|
|||
}
|
||||
```
|
||||
|
||||
> \[!WARNING\]
|
||||
> [!WARNING]
|
||||
> This is unsupported and untested. Use at your own risk.
|
||||
|
||||
## Commercial support
|
||||
|
|
|
|||
94
package.nix
94
package.nix
|
|
@ -14,53 +14,53 @@
|
|||
let
|
||||
cargoManifest = (lib.importTOML ./Cargo.toml).package;
|
||||
system-manager-unwrapped = rustPlatform.buildRustPackage {
|
||||
pname = "system-manager";
|
||||
version = cargoManifest.version;
|
||||
src = lib.fileset.toSource {
|
||||
root = ./.;
|
||||
fileset = lib.fileset.unions [
|
||||
./Cargo.toml
|
||||
./Cargo.lock
|
||||
./src
|
||||
./test/rust
|
||||
];
|
||||
};
|
||||
|
||||
cargoLock.lockFile = ./Cargo.lock;
|
||||
buildInputs = [ dbus ];
|
||||
nativeBuildInputs = [
|
||||
pkg-config
|
||||
pname = "system-manager";
|
||||
version = cargoManifest.version;
|
||||
src = lib.fileset.toSource {
|
||||
root = ./.;
|
||||
fileset = lib.fileset.unions [
|
||||
./Cargo.toml
|
||||
./Cargo.lock
|
||||
./src
|
||||
./test/rust
|
||||
];
|
||||
|
||||
nativeCheckInputs = [
|
||||
clippy
|
||||
nix
|
||||
];
|
||||
|
||||
preCheck = ''
|
||||
${lib.getExe cargo} clippy
|
||||
|
||||
# Stop the Nix command from trying to create /nix/var/nix/profiles.
|
||||
#
|
||||
# https://nix.dev/manual/nix/2.24/command-ref/new-cli/nix3-profile#profiles
|
||||
export NIX_STATE_DIR=$TMPDIR
|
||||
'';
|
||||
};
|
||||
|
||||
cargoLock.lockFile = ./Cargo.lock;
|
||||
buildInputs = [ dbus ];
|
||||
nativeBuildInputs = [
|
||||
pkg-config
|
||||
];
|
||||
|
||||
nativeCheckInputs = [
|
||||
clippy
|
||||
nix
|
||||
];
|
||||
|
||||
preCheck = ''
|
||||
${lib.getExe cargo} clippy
|
||||
|
||||
# Stop the Nix command from trying to create /nix/var/nix/profiles.
|
||||
#
|
||||
# https://nix.dev/manual/nix/2.24/command-ref/new-cli/nix3-profile#profiles
|
||||
export NIX_STATE_DIR=$TMPDIR
|
||||
'';
|
||||
};
|
||||
in
|
||||
runCommand "system-manager"
|
||||
{
|
||||
nativeBuildInputs = [ makeBinaryWrapper ];
|
||||
passthru = {
|
||||
# The unwrapped version takes nix from the PATH, it will fail if nix
|
||||
# cannot be found.
|
||||
# The wrapped version has a reference to the nix store path, so nix is
|
||||
# part of its runtime closure.
|
||||
unwrapped = system-manager-unwrapped;
|
||||
};
|
||||
}
|
||||
''
|
||||
makeWrapper \
|
||||
${system-manager-unwrapped}/bin/system-manager \
|
||||
$out/bin/system-manager \
|
||||
--prefix PATH : ${lib.makeBinPath [ nix ]}
|
||||
''
|
||||
runCommand "system-manager"
|
||||
{
|
||||
nativeBuildInputs = [ makeBinaryWrapper ];
|
||||
passthru = {
|
||||
# The unwrapped version takes nix from the PATH, it will fail if nix
|
||||
# cannot be found.
|
||||
# The wrapped version has a reference to the nix store path, so nix is
|
||||
# part of its runtime closure.
|
||||
unwrapped = system-manager-unwrapped;
|
||||
};
|
||||
}
|
||||
''
|
||||
makeWrapper \
|
||||
${system-manager-unwrapped}/bin/system-manager \
|
||||
$out/bin/system-manager \
|
||||
--prefix PATH : ${lib.makeBinPath [ nix ]}
|
||||
''
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue