diff options
author | Daiderd Jordan <daiderd@gmail.com> | 2016-11-20 23:27:45 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-11-20 23:27:45 +0100 |
commit | 2bbb23da02693ee1af58bbac1edbdf5d693fc00d (patch) | |
tree | 328e5e5685cfaa03cd6ffb9cf760867af4d0315b /pkgs/servers | |
parent | 6d428242a948a4241851b6770de5fc566313c2ef (diff) | |
parent | f7c097556ba96375bf69b13ed3b0613e59722011 (diff) | |
download | nixlib-2bbb23da02693ee1af58bbac1edbdf5d693fc00d.tar nixlib-2bbb23da02693ee1af58bbac1edbdf5d693fc00d.tar.gz nixlib-2bbb23da02693ee1af58bbac1edbdf5d693fc00d.tar.bz2 nixlib-2bbb23da02693ee1af58bbac1edbdf5d693fc00d.tar.lz nixlib-2bbb23da02693ee1af58bbac1edbdf5d693fc00d.tar.xz nixlib-2bbb23da02693ee1af58bbac1edbdf5d693fc00d.tar.zst nixlib-2bbb23da02693ee1af58bbac1edbdf5d693fc00d.zip |
Merge pull request #20128 from mdaiter/stanchion_server
stanchion: init at 2.1.1
Diffstat (limited to 'pkgs/servers')
-rw-r--r-- | pkgs/servers/nosql/riak-cs/stanchion.nix | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/pkgs/servers/nosql/riak-cs/stanchion.nix b/pkgs/servers/nosql/riak-cs/stanchion.nix new file mode 100644 index 000000000000..5835b7e29c93 --- /dev/null +++ b/pkgs/servers/nosql/riak-cs/stanchion.nix @@ -0,0 +1,63 @@ +{ stdenv, lib, fetchurl, unzip, erlang, git, wget, which, pam, coreutils, riak }: + +stdenv.mkDerivation rec { + name = "stanchion-2.1.1"; + + buildInputs = [ + which unzip erlang pam git wget + ]; + + src = fetchurl { + url = "http://s3.amazonaws.com/downloads.basho.com/stanchion/2.1/2.1.1/stanchion-2.1.1.tar.gz"; + sha256 = "1443arwgg7qvlx3msyg99qvvhck7qxphdjslcp494i60fhr2g8ja"; + }; + + + postPatch = '' + sed -i deps/node_package/priv/base/env.sh \ + -e 's@{{platform_data_dir}}@''${RIAK_DATA_DIR:-/var/db/stanchion}@' \ + -e 's@^RUNNER_SCRIPT_DIR=.*@RUNNER_SCRIPT_DIR='$out'/bin@' \ + -e 's@^RUNNER_BASE_DIR=.*@RUNNER_BASE_DIR='$out'@' \ + -e 's@^RUNNER_ETC_DIR=.*@RUNNER_ETC_DIR=''${RIAK_ETC_DIR:-/etc/stanchion}@' \ + -e 's@^RUNNER_LOG_DIR=.*@RUNNER_LOG_DIR=''${RIAK_LOG_DIR:-/var/log}@' + ''; + + preBuild = '' + patchShebangs . + ''; + + buildPhase = '' + runHook preBuild + + make rel + + runHook postBuild + ''; + + doCheck = false; + + installPhase = '' + runHook preInstall + + mkdir $out + mv rel/stanchion/etc rel/stanchion/riak-etc + mkdir -p rel/stanchion/etc + mv rel/stanchion/riak-etc rel/stanchion/etc/stanchion + mv rel/stanchion/* $out + + for prog in $out/bin/*; do + substituteInPlace $prog \ + --replace '. "`cd \`dirname $0\` && /bin/pwd`/../lib/env.sh"' \ + ". $out/lib/env.sh" + done + + runHook postInstall + ''; + + meta = with lib; { + maintainers = with maintainers; [ mdaiter ]; + description = "Manager for Riak CS"; + platforms = [ "x86_64-linux" ]; + license = licenses.asl20; + }; +} |