From 68827cd79af0360068f6d9c841ec2f0b1967246b Mon Sep 17 00:00:00 2001 From: Matthew Daiter Date: Thu, 3 Nov 2016 18:20:08 +0100 Subject: riak-cs: init at 2.1.1 riak-cs: added to all-packages Added Riak CS nix file to pkgs Added service file for Riak CS Removed Erlang_basho specific bindings from the Riak CS repo riak-cs: changed description riak-cs: added license riak-cs: added maintainer riak_cs: chgned indentations riak-cs: removed overly complex srcs mechanism riak-cs: added systemd module riak-cs: changed Erlang module to Basho-specific version riak-cs: made modular form riak-cs: Added a default package in service options riak-cs: Fixed default package in service options riak-cs: Patched Makefile riak_cs: added to module-list riak_cs: changed from string to actual package in modules riak-cs: changed example riak-cs: removed default riak-cs: changed to defaultText stanchion: changed default option to defaultText riak-cs: added defaults; changed types to str --- pkgs/servers/nosql/riak-cs/2.1.1.nix | 67 ++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 pkgs/servers/nosql/riak-cs/2.1.1.nix (limited to 'pkgs/servers') diff --git a/pkgs/servers/nosql/riak-cs/2.1.1.nix b/pkgs/servers/nosql/riak-cs/2.1.1.nix new file mode 100644 index 000000000000..439af4da565b --- /dev/null +++ b/pkgs/servers/nosql/riak-cs/2.1.1.nix @@ -0,0 +1,67 @@ +{ stdenv, lib, fetchurl, unzip, erlang, git, wget, which, pam, coreutils, riak }: + +stdenv.mkDerivation rec { + name = "riak_cs-2.1.1"; + + buildInputs = [ + which unzip erlang pam git wget + ]; + + src = fetchurl { + url = "http://s3.amazonaws.com/downloads.basho.com/riak-cs/2.1/2.1.1/riak-cs-2.1.1.tar.gz"; + sha256 = "115cac127aac6d759c1b429a52e0d18e491c0719a6530b1b88aa52c4efdbedd5"; + }; + + + postPatch = '' + sed -i deps/node_package/priv/base/env.sh \ + -e 's@{{platform_data_dir}}@''${RIAK_DATA_DIR:-/var/db/riak-cs}@' \ + -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/riak-cs}@' \ + -e 's@^RUNNER_LOG_DIR=.*@RUNNER_LOG_DIR=''${RIAK_LOG_DIR:-/var/log}@' + + sed -i ./Makefile \ + -e 's@rel: deps compile@rel: deps compile-src@' + ''; + + preBuild = '' + patchShebangs . + ''; + + buildPhase = '' + runHook preBuild + + make locked-deps + make rel + + runHook postBuild + ''; + + doCheck = false; + + installPhase = '' + runHook preInstall + + mkdir $out + mv rel/riak-cs/etc rel/riak-cs/riak-etc + mkdir -p rel/riak-cs/etc + mv rel/riak-cs/riak-etc rel/riak-cs/etc/riak-cs + mv rel/riak-cs/* $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; { + description = "Dynamo inspired NoSQL DB by Basho with S3 compatibility"; + platforms = [ "x86_64-linux" ]; + license = licenses.asl20; + maintainer = with maintainers; [ mdaiter ]; + }; +} -- cgit 1.4.1