Files
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

66 lines
1.6 KiB
Nix

{
stdenv,
fetchFromGitHub,
openssh,
gitMinimal,
nix,
coreutils,
curl,
gnugrep,
gawk,
findutils,
gnused,
lib,
makeWrapper,
sshpass,
gnutar,
}:
let
runtimeDeps = [
gitMinimal # for git flakes
nix
coreutils
curl # when uploading tarballs
gnugrep
gawk
findutils
gnused # needed by ssh-copy-id
sshpass # used to provide password for ssh-copy-id
gnutar # used to upload extra-files
];
in
stdenv.mkDerivation (finalAttrs: {
pname = "nixos-anywhere";
version = "1.12.0";
src = fetchFromGitHub {
owner = "nix-community";
repo = "nixos-anywhere";
rev = finalAttrs.version;
hash = "sha256-rmmlgBlBnadD2pDKqDZeMm0IwZMekbFtdQ7R4cZmQfk=";
};
nativeBuildInputs = [ makeWrapper ];
installPhase = ''
install -D -m 0755 src/nixos-anywhere.sh $out/bin/nixos-anywhere
install -D -m 0755 src/get-facts.sh $out/bin/get-facts.sh
# We prefer the system's openssh over our own, since it might come with features not present in ours:
# https://github.com/nix-community/nixos-anywhere/issues/62
wrapProgram $out/bin/nixos-anywhere \
--prefix PATH : ${lib.makeBinPath runtimeDeps} --suffix PATH : ${lib.makeBinPath [ openssh ]}
'';
meta = with lib; {
description = "Install nixos everywhere via ssh";
homepage = "https://github.com/nix-community/nixos-anywhere";
mainProgram = "nixos-anywhere";
license = licenses.mit;
platforms = platforms.all;
maintainers = [
maintainers.mic92
maintainers.lassulus
maintainers.phaer
maintainers.Enzime
];
};
})