nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ lib, bundlerApp, makeWrapper, bundlerUpdateScript, puppet-bolt, testers }:
2
3bundlerApp {
4 pname = "bolt";
5
6 gemdir = ./.;
7 exes = [ "bolt" ];
8 nativeBuildInputs = [ makeWrapper ];
9
10 gemConfig.bolt = attrs: {
11 # scripts in libexec will be executed by remote host,
12 # so shebangs should remain unchanged
13 dontPatchShebangs = true;
14 };
15
16 postBuild = ''
17 # Set BOLT_GEM=1 to remove warning
18 wrapProgram $out/bin/bolt --set BOLT_GEM 1
19 '';
20
21 passthru = {
22 tests.version = testers.testVersion {
23 package = puppet-bolt;
24 version = (import ./gemset.nix).bolt.version;
25 };
26 updateScript = bundlerUpdateScript "puppet-bolt";
27 };
28
29 meta = with lib; {
30 description = "Execute commands remotely over SSH and WinRM";
31 homepage = "https://github.com/puppetlabs/bolt";
32 license = licenses.asl20;
33 maintainers = with maintainers; [ uvnikita ];
34 platforms = platforms.unix;
35 };
36}