From 9c1c7ec985a39cd3dde8c2b27412a1d2d20c1d24 Mon Sep 17 00:00:00 2001 From: Luke Granger-Brown Date: Sat, 10 Apr 2021 17:05:21 +0000 Subject: [PATCH] nix/pkgs/rundeck-bin: init --- nix/pkgs/default.nix | 1 + nix/pkgs/rundeck-bin/default.nix | 42 ++++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 nix/pkgs/rundeck-bin/default.nix diff --git a/nix/pkgs/default.nix b/nix/pkgs/default.nix index e62a8a7bc7..1d4e988f91 100644 --- a/nix/pkgs/default.nix +++ b/nix/pkgs/default.nix @@ -27,5 +27,6 @@ prometheus-snmp-config = import ./prometheus-snmp-config args; flameshot = pkgs.libsForQt5.callPackage ./flameshot {}; lukegb-wallpapers = pkgs.callPackage ./lukegb-wallpapers {}; + rundeck-bin = pkgs.callPackage ./rundeck-bin {}; } // (import ./heptapod-runner.nix args) // (import ./lightspeed args) diff --git a/nix/pkgs/rundeck-bin/default.nix b/nix/pkgs/rundeck-bin/default.nix new file mode 100644 index 0000000000..97d86f3a62 --- /dev/null +++ b/nix/pkgs/rundeck-bin/default.nix @@ -0,0 +1,42 @@ +{ stdenvNoCC +, lib +, fetchurl +, jdk8 +, makeWrapper +}: + +let + jdk = jdk8; +in +stdenvNoCC.mkDerivation rec { + pname = "rundeck"; + version = "3.3.10-20210301"; + + src = fetchurl { + url = "https://dl.bintray.com/rundeck/rundeck-maven/org/rundeck/rundeck/rundeck-${version}.war"; + hash = "sha256:0ff0bgpikl2kw6hz78gzn25clax60i0nh7dqzyb1wqj8ckhnqbbq"; + }; + dontUnpack = true; + + nativeBuildInputs = [ makeWrapper ]; + buildInputs = [ jdk ]; + + installPhase = '' + runHook preInstall + + mkdir -p $out/share $out/bin + install -D $src $out/share/rundeck.war + + makeWrapper ${jdk}/bin/java \ + $out/bin/rundeck --add-flags "-jar $out/share/rundeck.war" + + runHook postInstall + ''; + + meta = with lib; { + homepage = "https://rundeck.com"; + description = "Runbook automation"; + platforms = platforms.unix; + license = licenses.asl20; + }; +}