treewide: format with nixpkgs-fmt
This commit is contained in:
parent
07fc31613e
commit
eb9b1bbbe3
21
flake.nix
21
flake.nix
|
@ -40,9 +40,12 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
# Build attributes for a Rust application.
|
# Build attributes for a Rust application.
|
||||||
buildRustApp = {
|
buildRustApp =
|
||||||
src, target ? null, doCheck ? true
|
{ src
|
||||||
}: let
|
, target ? null
|
||||||
|
, doCheck ? true
|
||||||
|
}:
|
||||||
|
let
|
||||||
cleanedSrc = craneLib.cleanCargoSource src;
|
cleanedSrc = craneLib.cleanCargoSource src;
|
||||||
commonArgs = {
|
commonArgs = {
|
||||||
src = cleanedSrc;
|
src = cleanedSrc;
|
||||||
|
@ -51,7 +54,8 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
cargoArtifacts = craneLib.buildDepsOnly commonArgs;
|
cargoArtifacts = craneLib.buildDepsOnly commonArgs;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
package = craneLib.buildPackage (commonArgs // {
|
package = craneLib.buildPackage (commonArgs // {
|
||||||
inherit cargoArtifacts;
|
inherit cargoArtifacts;
|
||||||
});
|
});
|
||||||
|
@ -76,7 +80,8 @@
|
||||||
|
|
||||||
lanzatool-unwrapped = lanzatoolCrane.package;
|
lanzatool-unwrapped = lanzatoolCrane.package;
|
||||||
|
|
||||||
lanzatool = pkgs.runCommand "lanzatool" {
|
lanzatool = pkgs.runCommand "lanzatool"
|
||||||
|
{
|
||||||
nativeBuildInputs = [ pkgs.makeWrapper ];
|
nativeBuildInputs = [ pkgs.makeWrapper ];
|
||||||
} ''
|
} ''
|
||||||
mkdir -p $out/bin
|
mkdir -p $out/bin
|
||||||
|
@ -88,7 +93,8 @@
|
||||||
--set RUST_BACKTRACE full \
|
--set RUST_BACKTRACE full \
|
||||||
--set LANZABOOTE_STUB ${lanzaboote}/bin/lanzaboote.efi
|
--set LANZABOOTE_STUB ${lanzaboote}/bin/lanzaboote.efi
|
||||||
'';
|
'';
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
overlays.default = final: prev: {
|
overlays.default = final: prev: {
|
||||||
inherit lanzatool;
|
inherit lanzatool;
|
||||||
};
|
};
|
||||||
|
@ -122,7 +128,8 @@
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
checks.x86_64-linux = let
|
checks.x86_64-linux =
|
||||||
|
let
|
||||||
mkSecureBootTest = { name, machine ? { }, testScript }: nixpkgs-test.legacyPackages.x86_64-linux.nixosTest {
|
mkSecureBootTest = { name, machine ? { }, testScript }: nixpkgs-test.legacyPackages.x86_64-linux.nixosTest {
|
||||||
inherit name testScript;
|
inherit name testScript;
|
||||||
nodes.machine = { lib, ... }: {
|
nodes.machine = { lib, ... }: {
|
||||||
|
|
Loading…
Reference in New Issue