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