Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor coding style fix: lib.getExe instead of ${bin}/bin/bin #391

Merged
merged 1 commit into from
Oct 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
# Derive the output overlay automatically from all packages that we define.
inputs.flake-parts.flakeModules.easyOverlay

# Formatting and quality checks.
# Formatting and quality checks.
] ++ (if inputs.pre-commit-hooks-nix ? flakeModule then [ inputs.pre-commit-hooks-nix.flakeModule ] else [ ]);

flake.nixosModules.lanzaboote = moduleWithSystem (
Expand Down Expand Up @@ -174,6 +174,7 @@
wrappedTool = pkgs.runCommand "lzbt"
{
nativeBuildInputs = [ pkgs.makeWrapper ];
meta.mainProgram = "lzbt";
} ''
mkdir -p $out/bin

Expand Down
6 changes: 3 additions & 3 deletions nix/modules/lanzaboote.nix
Original file line number Diff line number Diff line change
Expand Up @@ -126,12 +126,12 @@ in
${optionalString cfg.enrollKeys ''
mkdir -p /tmp/pki
cp -r ${cfg.pkiBundle}/* /tmp/pki
${sbctlWithPki}/bin/sbctl enroll-keys --yes-this-might-brick-my-machine
${lib.getExe sbctlWithPki} enroll-keys --yes-this-might-brick-my-machine
''}

# Use the system from the kernel's hostPlatform because this should
# always, even in the cross compilation case, be the right system.
${cfg.package}/bin/lzbt install \
${lib.getExe cfg.package} install \
--system ${config.boot.kernelPackages.stdenv.hostPlatform.system} \
--systemd ${config.systemd.package} \
--systemd-boot-loader-config ${loaderConfigFile} \
Expand Down Expand Up @@ -163,7 +163,7 @@ in
# Place the fwupd efi files in /run and sign them
script = ''
ln -sf ${config.services.fwupd.package.fwupd-efi}/libexec/fwupd/efi/fwupd*.efi /run/fwupd-efi/
${pkgs.sbsigntool}/bin/sbsign --key '${cfg.privateKeyFile}' --cert '${cfg.publicKeyFile}' /run/fwupd-efi/fwupd*.efi
${lib.getExe' pkgs.sbsigntool "sbsign"} --key '${cfg.privateKeyFile}' --cert '${cfg.publicKeyFile}' /run/fwupd-efi/fwupd*.efi
'';
};

Expand Down
2 changes: 1 addition & 1 deletion nix/modules/uki.nix
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ in
'';
};
in
"${installer}/bin/install-uki";
"${lib.getExe installer}";
};
};
}