aboutsummaryrefslogtreecommitdiff
path: root/modules/pkgs/check_solr
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2016-09-29 13:51:44 +0300
committerIgor Pashev <pashev.igor@gmail.com>2016-09-29 13:51:44 +0300
commit62f28d30a069135f9c48678507203958adfc334f (patch)
tree7f38af0c8d3f445ee8cc50906a639baec7011127 /modules/pkgs/check_solr
parent1af9e6589bdd18e6ba7eeabf073aa7d710020cdd (diff)
downloadnixsap-62f28d30a069135f9c48678507203958adfc334f.tar.gz
Moved everything into ./modules
Diffstat (limited to 'modules/pkgs/check_solr')
-rw-r--r--modules/pkgs/check_solr/cabal2nix.nix23
-rw-r--r--modules/pkgs/check_solr/default.nix13
2 files changed, 36 insertions, 0 deletions
diff --git a/modules/pkgs/check_solr/cabal2nix.nix b/modules/pkgs/check_solr/cabal2nix.nix
new file mode 100644
index 0000000..ee3c6b5
--- /dev/null
+++ b/modules/pkgs/check_solr/cabal2nix.nix
@@ -0,0 +1,23 @@
+{ mkDerivation, aeson, base, base64-bytestring, bytestring, docopt
+, fetchgit, HTTP, http-conduit, nagios-check, raw-strings-qq
+, regex-tdfa, scientific, stdenv, text, unordered-containers
+}:
+mkDerivation {
+ pname = "check-solr";
+ version = "0.1.0";
+ src = fetchgit {
+ url = "https://github.com/ip1981/check-solr.git";
+ sha256 = "839199942e5cf110428dd589f1d9610ac504d7199b2b7053d5ee136206890309";
+ rev = "869c945fb56f0ff187125ee352a6876002eba596";
+ };
+ isLibrary = true;
+ isExecutable = true;
+ libraryHaskellDepends = [
+ aeson base base64-bytestring bytestring docopt HTTP http-conduit
+ nagios-check raw-strings-qq regex-tdfa scientific text
+ unordered-containers
+ ];
+ executableHaskellDepends = [ base docopt raw-strings-qq ];
+ description = "Icinga / Nagios plugin for Solr";
+ license = stdenv.lib.licenses.mit;
+}
diff --git a/modules/pkgs/check_solr/default.nix b/modules/pkgs/check_solr/default.nix
new file mode 100644
index 0000000..27aecce
--- /dev/null
+++ b/modules/pkgs/check_solr/default.nix
@@ -0,0 +1,13 @@
+{ stdenv, haskellPackages }:
+let
+
+ haskellPackage = haskellPackages.callPackage ./cabal2nix.nix {};
+
+in stdenv.mkDerivation {
+ name = "check-solr-${haskellPackage.version}";
+ phases = [ "installPhase" ];
+ installPhase = ''
+ mkdir -p $out/bin
+ cp -a ${haskellPackage}/bin/* $out/bin/
+ '';
+}