about summary refs log tree commit diff
path: root/pkgs/by-name/pu/puppet-bolt/package.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/by-name/pu/puppet-bolt/package.nix')
-rw-r--r--pkgs/by-name/pu/puppet-bolt/package.nix45
1 files changed, 45 insertions, 0 deletions
diff --git a/pkgs/by-name/pu/puppet-bolt/package.nix b/pkgs/by-name/pu/puppet-bolt/package.nix
new file mode 100644
index 0000000000000..23047c3cff479
--- /dev/null
+++ b/pkgs/by-name/pu/puppet-bolt/package.nix
@@ -0,0 +1,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;
+  };
+}