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