2016-05-17 14:52:09 +01:00
|
|
|
{ stdenv, go16Packages, ruby, bundlerEnv, zip }:
|
2015-05-18 23:38:27 +01:00
|
|
|
|
|
|
|
let
|
|
|
|
# `sass` et al
|
|
|
|
gems = bundlerEnv {
|
|
|
|
name = "consul-ui-deps";
|
|
|
|
gemfile = ./Gemfile;
|
|
|
|
lockfile = ./Gemfile.lock;
|
|
|
|
gemset = ./gemset.nix;
|
|
|
|
};
|
|
|
|
in
|
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
2016-05-17 14:52:09 +01:00
|
|
|
name = "consul-ui-${go16Packages.consul.rev}";
|
2015-05-18 23:38:27 +01:00
|
|
|
|
2016-05-17 14:52:09 +01:00
|
|
|
src = go16Packages.consul.src;
|
2015-05-18 23:38:27 +01:00
|
|
|
|
2016-05-17 14:52:09 +01:00
|
|
|
buildInputs = [ ruby gems zip ];
|
2015-05-18 23:38:27 +01:00
|
|
|
|
|
|
|
buildPhase = ''
|
|
|
|
# Build ui static files
|
|
|
|
cd ui
|
|
|
|
make dist
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
# Install ui static files
|
|
|
|
mkdir -p $out
|
2016-05-17 14:52:09 +01:00
|
|
|
mv ../pkg/web_ui/* $out
|
2015-05-18 23:38:27 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
homepage = http://www.consul.io/;
|
|
|
|
description = "A tool for service discovery, monitoring and configuration";
|
|
|
|
maintainers = with maintainers; [ cstrahan wkennington ];
|
|
|
|
license = licenses.mpl20 ;
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|