about summary refs log tree commit diff
path: root/pkgs/by-name/pu/puppet-bolt/package.nix
blob: 23047c3cff479b48d03f0c9f4948d8f43aaf1371 (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
37
38
39
40
41
42
43
44
45
{
  bundlerApp,
  bundlerUpdateScript,
  lib,
  makeWrapper,
  puppet-bolt,
  testers,
}:

bundlerApp {
  pname = "bolt";

  gemdir = ./.;
  exes = [ "bolt" ];
  nativeBuildInputs = [ 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 = {
    description = "Execute commands remotely over SSH and WinRM";
    homepage = "https://github.com/puppetlabs/bolt";
    changelog = "https://github.com/puppetlabs/bolt/blob/main/CHANGELOG.md";
    license = lib.licenses.asl20;
    mainProgram = "bolt";
    maintainers = with lib.maintainers; [ uvnikita anthonyroussel ];
    platforms = lib.platforms.unix;
  };
}