2018-05-30 17:40:18 +00:00
|
|
|
{ stdenv, consul, ruby, bundlerEnv, zip, nodejs }:
|
2015-05-18 22:38:27 +00:00
|
|
|
|
|
|
|
let
|
|
|
|
# `sass` et al
|
|
|
|
gems = bundlerEnv {
|
|
|
|
name = "consul-ui-deps";
|
2017-01-17 23:22:26 +00:00
|
|
|
gemdir = ./.;
|
2015-05-18 22:38:27 +00:00
|
|
|
};
|
|
|
|
in
|
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
2016-06-04 18:40:56 +00:00
|
|
|
name = "consul-ui-${consul.version}";
|
2015-05-18 22:38:27 +00:00
|
|
|
|
2016-06-04 18:40:56 +00:00
|
|
|
src = consul.src;
|
2015-05-18 22:38:27 +00:00
|
|
|
|
2018-05-30 17:40:18 +00:00
|
|
|
buildInputs = [ ruby gems zip nodejs ];
|
2015-05-18 22:38:27 +00:00
|
|
|
|
2018-05-30 17:40:18 +00:00
|
|
|
patches = [ ./ui-no-bundle-exec.patch ];
|
|
|
|
|
|
|
|
postPatch = "patchShebangs ./ui/scripts/dist.sh";
|
2016-06-04 18:40:56 +00:00
|
|
|
|
2015-05-18 22:38:27 +00:00
|
|
|
buildPhase = ''
|
|
|
|
# Build ui static files
|
|
|
|
cd ui
|
|
|
|
make dist
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
# Install ui static files
|
|
|
|
mkdir -p $out
|
2016-05-17 13:52:09 +00:00
|
|
|
mv ../pkg/web_ui/* $out
|
2015-05-18 22:38:27 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
2017-08-02 21:50:51 +00:00
|
|
|
homepage = https://www.consul.io/;
|
2015-05-18 22:38:27 +00:00
|
|
|
description = "A tool for service discovery, monitoring and configuration";
|
|
|
|
maintainers = with maintainers; [ cstrahan wkennington ];
|
|
|
|
license = licenses.mpl20 ;
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|