disko: depend on nixos-install directly (#342320)

This commit is contained in:
Jörg Thalheim 2024-09-21 14:42:58 +02:00 committed by GitHub
commit 03c0a80f39
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 21 additions and 7 deletions

View File

@ -4,7 +4,7 @@
, fetchFromGitHub
, bash
, nix
, nixos-install-tools
, nixos-install
, coreutils
}:
@ -27,7 +27,7 @@ stdenvNoCC.mkDerivation (finalAttrs: {
for i in disko disko-install; do
sed -e "s|libexec_dir=\".*\"|libexec_dir=\"$out/share/disko\"|" "$i" > "$out/bin/$i"
chmod 755 "$out/bin/$i"
wrapProgram "$out/bin/$i" --prefix PATH : ${lib.makeBinPath [ nix coreutils nixos-install-tools ]}
wrapProgram "$out/bin/$i" --prefix PATH : ${lib.makeBinPath [ nix coreutils nixos-install ]}
done
runHook postInstall
'';

View File

@ -3,6 +3,8 @@
set -e
export PATH=@path@:$PATH
# Re-exec ourselves in a private mount namespace so that our bind
# mounts get cleaned up automatically.
if [ -z "$NIXOS_ENTER_REEXEC" ]; then

View File

@ -24,5 +24,11 @@ substituteAll {
installManPage ${./nixos-enter.8}
'';
meta.mainProgram = "nixos-enter";
meta = {
description = "Run a command in a NixOS chroot environment";
homepage = "https://github.com/NixOS/nixpkgs/tree/master/pkgs/by-name/ni/nixos-install";
license = lib.licenses.mit;
platforms = lib.platforms.linux;
mainProgram = "nixos-enter";
};
}

View File

@ -29,5 +29,10 @@ substituteAll {
installManPage ${./nixos-install.8}
'';
meta.mainProgram = "nixos-install";
meta = {
description = "Install bootloader and NixOS";
homepage = "https://github.com/NixOS/nixpkgs/tree/master/pkgs/by-name/ni/nixos-install";
license = lib.licenses.mit;
mainProgram = "nixos-install";
};
}

View File

@ -6,6 +6,8 @@
# TODO: replace indirect self-reference by proper self-reference
# https://github.com/NixOS/nixpkgs/pull/119942
nixos-install-tools,
nixos-install,
nixos-enter,
runCommand,
nixosTests,
binlore,
@ -18,9 +20,8 @@ in
name = "nixos-install-tools-${version}";
paths = lib.attrValues {
# See nixos/modules/installer/tools/tools.nix
inherit (config.system.build)
nixos-install nixos-generate-config nixos-enter;
inherit (config.system.build) nixos-generate-config;
inherit nixos-install nixos-enter;
inherit (config.system.build.manual) nixos-configuration-reference-manpage;
};