nixos-anywhere: set mainProgram and use finalAttrs

This commit is contained in:
Jörg Thalheim 2023-09-19 23:29:49 +02:00 committed by Jörg Thalheim
parent e2621535e5
commit f6830438cd

View file

@ -26,13 +26,13 @@ let
gnused # needed by ssh-copy-id gnused # needed by ssh-copy-id
]; ];
in in
stdenv.mkDerivation rec { stdenv.mkDerivation (finalAttrs: {
pname = "nixos-anywhere"; pname = "nixos-anywhere";
version = "1.0.0"; version = "1.0.0";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "numtide"; owner = "numtide";
repo = "nixos-anywhere"; repo = "nixos-anywhere";
rev = version; rev = finalAttrs.version;
hash = "sha256-zM+N7+XDR34DuTrVLJd7Ggq1JPlURddsqNOjXY/rcQM="; hash = "sha256-zM+N7+XDR34DuTrVLJd7Ggq1JPlURddsqNOjXY/rcQM=";
}; };
nativeBuildInputs = [ makeWrapper ]; nativeBuildInputs = [ makeWrapper ];
@ -48,8 +48,9 @@ stdenv.mkDerivation rec {
meta = with lib; { meta = with lib; {
description = "Install nixos everywhere via ssh"; description = "Install nixos everywhere via ssh";
homepage = "https://github.com/numtide/nixos-anywhere"; homepage = "https://github.com/numtide/nixos-anywhere";
mainProgram = "nixos-anywhere";
license = licenses.mit; license = licenses.mit;
platforms = platforms.all; platforms = platforms.all;
maintainers = [ maintainers.mic92 maintainers.lassulus maintainers.phaer ]; maintainers = [ maintainers.mic92 maintainers.lassulus maintainers.phaer ];
}; };
} })