nixpkgs-suyu/pkgs/servers/consul/ui.nix

40 lines
785 B
Nix
Raw Normal View History

2016-06-04 20:40:56 +02:00
{ stdenv, consul, ruby, bundlerEnv, zip }:
let
# `sass` et al
gems = bundlerEnv {
name = "consul-ui-deps";
2017-01-18 00:22:26 +01:00
gemdir = ./.;
};
in
stdenv.mkDerivation {
2016-06-04 20:40:56 +02:00
name = "consul-ui-${consul.version}";
2016-06-04 20:40:56 +02:00
src = consul.src;
buildInputs = [ ruby gems zip ];
2016-06-04 20:40:56 +02:00
patchPhase = "patchShebangs ./ui/scripts/dist.sh";
buildPhase = ''
# Build ui static files
cd ui
make dist
'';
installPhase = ''
# Install ui static files
mkdir -p $out
mv ../pkg/web_ui/* $out
'';
meta = with stdenv.lib; {
homepage = https://www.consul.io/;
description = "A tool for service discovery, monitoring and configuration";
maintainers = with maintainers; [ cstrahan wkennington ];
license = licenses.mpl20 ;
platforms = platforms.unix;
};
}