mirror of
https://github.com/nix-community/nixos-anywhere.git
synced 2024-09-11 16:45:28 +03:00
36 lines
566 B
Nix
36 lines
566 B
Nix
{ stdenvNoCC
|
|
, makeWrapper
|
|
, lib
|
|
, openssh
|
|
, gitMinimal
|
|
, nix
|
|
, coreutils
|
|
, shellcheck
|
|
}:
|
|
let
|
|
runtimeDeps = [
|
|
openssh
|
|
gitMinimal # for git flakes
|
|
nix
|
|
coreutils
|
|
];
|
|
in
|
|
stdenvNoCC.mkDerivation {
|
|
name = "nixos-remote";
|
|
src = ./.;
|
|
nativeBuildInputs = [
|
|
makeWrapper
|
|
shellcheck
|
|
];
|
|
installPhase = ''
|
|
install -D -m755 nixos-remote $out/bin/nixos-remote
|
|
wrapProgram "$out/bin/nixos-remote" \
|
|
--prefix PATH : "${lib.makeBinPath runtimeDeps}"
|
|
'';
|
|
|
|
doCheck = true;
|
|
checkPhase = ''
|
|
shellcheck ./nixos-remote
|
|
'';
|
|
}
|