about summary refs log tree commit diff
path: root/pkgs/tools/package-management/nix-simple-deploy/default.nix
blob: 647a11b01fdc51660142fdb33ff6d56cbd1a0a74 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
{ lib, fetchFromGitHub, rustPlatform, makeWrapper, openssh, nix-serve }:

rustPlatform.buildRustPackage rec {
  pname = "nix-simple-deploy";
  version = "0.2.2";

  src = fetchFromGitHub {
    owner = "misuzu";
    repo = pname;
    rev = version;
    sha256 = "1qq4fbsd2mvxblsggwbnh88mj18f3vrfzv1kgc7a92pfiwxznq8r";
  };

  cargoSha256 = "1r6dl7qipbyyvjcd3l9ynawjln1g1qzvw5za6nyjcf41dzv48m8x";

  nativeBuildInputs = [ makeWrapper ];

  postInstall = ''
    wrapProgram "$out/bin/nix-simple-deploy" \
      --prefix PATH : "${lib.makeBinPath [ openssh nix-serve ]}"
  '';

  meta = with lib; {
    description = "Deploy software or an entire NixOS system configuration to another NixOS system";
    homepage = "https://github.com/misuzu/nix-simple-deploy";
    platforms = platforms.unix;
    license = with licenses; [ asl20 /* OR */ mit ];
    maintainers = with maintainers; [ misuzu ];
    mainProgram = "nix-simple-deploy";
  };
}