aboutsummaryrefslogtreecommitdiff
path: root/modules/pkgs/hyperic-sigar
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2017-06-12 16:29:07 +0300
committerIgor Pashev <pashev.igor@gmail.com>2017-06-12 16:37:54 +0300
commiteedce5a106721e0d1e0275ba28af0f5ee0a5da62 (patch)
tree50e1b7a26486062515ce884dd6d8553bfd4f99f9 /modules/pkgs/hyperic-sigar
parent85ea46e3b26ce572d27fb4fbaea57ab06a7a845d (diff)
downloadnixsap-eedce5a106721e0d1e0275ba28af0f5ee0a5da62.tar.gz
Apache Cassandra: init
Add the `nixsap.apps.cassandra` application and Apache Cassandra 3.11 package along with Hyperic Sigar. The application runs in single node mode just fine. Clustering is not tested yet. This is PoC on Java applications. A Java application should comprise: 1. JRE 2. Class path 3. Library path A Java "package" should include all jar/classes/libraries needed to run the application. Using symbolic links to pull in dependencies is fine. This is much similar to nix "environments". Apache Cassandra is the first example of this approach. Using $out/share/java/ and $out/lib/jni is to help building such environments (also with nix-env).
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;
+ };
+}
+