aboutsummaryrefslogtreecommitdiff
path: root/modules/pkgs/hyperic-sigar
diff options
context:
space:
mode:
Diffstat (limited to 'modules/pkgs/hyperic-sigar')
-rw-r--r--modules/pkgs/hyperic-sigar/default.nix34
1 files changed, 34 insertions, 0 deletions
diff --git a/modules/pkgs/hyperic-sigar/default.nix b/modules/pkgs/hyperic-sigar/default.nix
new file mode 100644
index 0000000..1251244
--- /dev/null
+++ b/modules/pkgs/hyperic-sigar/default.nix
@@ -0,0 +1,34 @@
+{ stdenv, fetchurl, ant, jdk, perl }:
+
+stdenv.mkDerivation rec {
+ name = "hyperic-sigar-${version}";
+ version = "1.6.4";
+
+ src = fetchurl {
+ url = "https://github.com/hyperic/sigar/archive/sigar-${version}.tar.gz";
+ sha256 = "0bh5l1wzmv464v3np5zjb59d7i0vbk9ciy71683fa43yxg0h96qp";
+ };
+
+ nativeBuildInputs = [ ant jdk perl ];
+ buildInputs = [ ];
+
+ configurePhase = ":";
+
+ buildPhase = ''
+ cd bindings/java
+ ant build
+ '';
+
+ installPhase = ''
+ mkdir -p $out/{lib/jni,share/java}
+ cp sigar-bin/lib/sigar.jar $out/share/java/
+ cp sigar-bin/lib/libsigar-* $out/lib/jni/
+ '';
+
+ meta = with stdenv.lib; {
+ description = "System Information Gatherer And Reporter";
+ license = licenses.asl20;
+ platforms = platforms.unix;
+ };
+}
+