1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-28 00:22:13 +00:00
nixpkgs/pkgs/servers/consul/ui.nix
John Boehr 711f96ee1d
consul-ui: fix build
Update the dependencies used for building consul-ui. therubyracer
is no longer required and fails to build. Instead, a nodejs
binary is required to build the assets. Patch out unnecessary
executions of `bundle` which can cause failures.
2018-05-30 10:40:18 -07:00

42 lines
843 B
Nix

{ stdenv, consul, ruby, bundlerEnv, zip, nodejs }:
let
# `sass` et al
gems = bundlerEnv {
name = "consul-ui-deps";
gemdir = ./.;
};
in
stdenv.mkDerivation {
name = "consul-ui-${consul.version}";
src = consul.src;
buildInputs = [ ruby gems zip nodejs ];
patches = [ ./ui-no-bundle-exec.patch ];
postPatch = "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;
};
}