2018-05-30 18:40:18 +01:00
|
|
|
{ stdenv, consul, ruby, bundlerEnv, zip, nodejs }:
|
2015-05-18 23:38:27 +01:00
|
|
|
|
|
|
|
let
|
|
|
|
# `sass` et al
|
|
|
|
gems = bundlerEnv {
|
|
|
|
name = "consul-ui-deps";
|
2017-01-17 23:22:26 +00:00
|
|
|
gemdir = ./.;
|
2015-05-18 23:38:27 +01:00
|
|
|
};
|
|
|
|
in
|
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
2016-06-04 19:40:56 +01:00
|
|
|
name = "consul-ui-${consul.version}";
|
2015-05-18 23:38:27 +01:00
|
|
|
|
2016-06-04 19:40:56 +01:00
|
|
|
src = consul.src;
|
2015-05-18 23:38:27 +01:00
|
|
|
|
2018-05-30 18:40:18 +01:00
|
|
|
buildInputs = [ ruby gems zip nodejs ];
|
2015-05-18 23:38:27 +01:00
|
|
|
|
2018-05-30 18:40:18 +01:00
|
|
|
patches = [ ./ui-no-bundle-exec.patch ];
|
|
|
|
|
|
|
|
postPatch = "patchShebangs ./ui/scripts/dist.sh";
|
2016-06-04 19:40:56 +01:00
|
|
|
|
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; {
|
2017-08-02 22:50:51 +01:00
|
|
|
homepage = https://www.consul.io/;
|
2015-05-18 23:38:27 +01:00
|
|
|
description = "A tool for service discovery, monitoring and configuration";
|
|
|
|
maintainers = with maintainers; [ cstrahan wkennington ];
|
|
|
|
license = licenses.mpl20 ;
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|