mirror of
https://github.com/nix-community/disko
synced 2024-11-10 06:14:14 +00:00
drop duplicated disko-install definition
This commit is contained in:
parent
cdefe26742
commit
babc1554e8
2 changed files with 3 additions and 41 deletions
|
@ -1,38 +0,0 @@
|
|||
{
|
||||
stdenvNoCC,
|
||||
makeWrapper,
|
||||
lib,
|
||||
coreutils,
|
||||
xcp,
|
||||
nixos-install-tools,
|
||||
}:
|
||||
|
||||
stdenvNoCC.mkDerivation {
|
||||
name = "disko-install";
|
||||
src = ./.;
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin $out/share/disko
|
||||
cp -r install-cli.nix $out/share/disko
|
||||
sed \
|
||||
-e "s|libexec_dir=\".*\"|libexec_dir=\"$out/share/disko\"|" \
|
||||
-e "s|#!/usr/bin/env.*|#!/usr/bin/env bash|" \
|
||||
disko-install > $out/bin/disko-install
|
||||
chmod 755 $out/bin/disko-install
|
||||
wrapProgram $out/bin/disko-install \
|
||||
--prefix PATH : "${
|
||||
lib.makeBinPath [
|
||||
coreutils
|
||||
xcp
|
||||
nixos-install-tools
|
||||
]
|
||||
}"
|
||||
'';
|
||||
meta = with lib; {
|
||||
description = "Disko and nixos-install in one command";
|
||||
homepage = "https://github.com/nix-community/disko";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ lassulus ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
{ pkgs ? import <nixpkgs> { }, self }:
|
||||
let
|
||||
disko-install = pkgs.callPackage ../../disko-install.nix { };
|
||||
disko = pkgs.callPackage ../../package.nix { };
|
||||
|
||||
dependencies = [
|
||||
self.nixosConfigurations.testmachine.pkgs.stdenv.drvPath
|
||||
|
@ -37,9 +37,9 @@ pkgs.nixosTest {
|
|||
permission = machine.succeed("stat -c %a /tmp/age.key").strip()
|
||||
assert permission == "600", f"expected permission 600 on /tmp/age.key, got {permission}"
|
||||
|
||||
machine.succeed("${disko-install}/bin/disko-install --disk main /dev/vdb --extra-files /tmp/age.key /var/lib/secrets/age.key --flake ${../..}#testmachine")
|
||||
machine.succeed("${disko}/bin/disko-install --disk main /dev/vdb --extra-files /tmp/age.key /var/lib/secrets/age.key --flake ${../..}#testmachine")
|
||||
# test idempotency
|
||||
machine.succeed("${disko-install}/bin/disko-install --mode mount --disk main /dev/vdb --flake ${../..}#testmachine")
|
||||
machine.succeed("${disko}/bin/disko-install --mode mount --disk main /dev/vdb --flake ${../..}#testmachine")
|
||||
machine.shutdown()
|
||||
|
||||
new_machine = create_test_machine(oldmachine=machine, args={ "name": "after_install" })
|
||||
|
|
Loading…
Reference in a new issue