about summary refs log tree commit diff
path: root/pkgs/tools/admin/puppet/puppet-bolt/default.nix
blob: 7752ddb2808d5e44e06a59fba4181d84f2801686 (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
32
33
34
35
36
{ lib, bundlerApp, makeWrapper, bundlerUpdateScript, puppet-bolt, testers }:

bundlerApp {
  pname = "bolt";

  gemdir = ./.;
  exes = [ "bolt" ];
  buildInputs = [ makeWrapper ];

  gemConfig.bolt = attrs: {
    # scripts in libexec will be executed by remote host,
    # so shebangs should remain unchanged
    dontPatchShebangs = true;
  };

  postBuild = ''
    # Set BOLT_GEM=1 to remove warning
    wrapProgram $out/bin/bolt --set BOLT_GEM 1
  '';

  passthru = {
    tests.version = testers.testVersion {
      package = puppet-bolt;
      version = (import ./gemset.nix).bolt.version;
    };
    updateScript = bundlerUpdateScript "puppet-bolt";
  };

  meta = with lib; {
    description = "Execute commands remotely over SSH and WinRM";
    homepage = "https://github.com/puppetlabs/bolt";
    license = licenses.asl20;
    maintainers = with maintainers; [ uvnikita ];
    platforms = platforms.unix;
  };
}