Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

consul-ui: fix build #41239

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
27 changes: 17 additions & 10 deletions pkgs/servers/consul/Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,17 +1,23 @@
GEM
remote: https://rubygems.org/
specs:
execjs (2.3.0)
json (1.8.2)
libv8 (3.16.14.11)
ref (1.0.5)
sass (3.4.11)
therubyracer (0.12.1)
libv8 (~> 3.16.14.0)
execjs (2.7.0)
ffi (1.9.23)
libv8 (3.16.14.19)
rb-fsevent (0.10.3)
rb-inotify (0.9.10)
ffi (>= 0.5.0, < 2)
ref (2.0.0)
sass (3.5.6)
sass-listen (~> 4.0.0)
sass-listen (4.0.0)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
therubyracer (0.12.3)
libv8 (~> 3.16.14.15)
ref
uglifier (2.7.0)
execjs (>= 0.3.0)
json (>= 1.8.0)
uglifier (4.1.10)
execjs (>= 0.3.0, < 3)

PLATFORMS
ruby
Expand All @@ -20,3 +26,4 @@ DEPENDENCIES
sass
therubyracer
uglifier

76 changes: 52 additions & 24 deletions pkgs/servers/consul/gemset.nix
Original file line number Diff line number Diff line change
@@ -1,59 +1,87 @@
{
execjs = {
version = "2.3.0";
source = {
remotes = ["https://rubygems.org"];
sha256 = "1yz55sf2nd3l666ms6xr18sm2aggcvmb8qr3v53lr4rir32y1yp1";
type = "gem";
sha256 = "097v02bhmzc70j7n0yyf8j0z5wms88zcmgpmggby4hnvqxf41y1h";
};
version = "2.7.0";
};
json = {
version = "1.8.2";
ffi = {
source = {
remotes = ["https://rubygems.org"];
sha256 = "0zw6pbyvmj8wafdc7l5h7w20zkp1vbr2805ql5d941g2b20pk4zr";
type = "gem";
sha256 = "0zzvv25vjikavd3b1bp6lvbgj23vv9jvmnl4vpim8pv30z8p6vr5";
};
version = "1.9.23";
};
libv8 = {
version = "3.16.14.11";
source = {
remotes = ["https://rubygems.org"];
sha256 = "0271i5sfma05gvhmrmxqb0jj667bl6m54yd49ay6yrdbh1g4wpl1";
type = "gem";
};
version = "3.16.14.19";
};
rb-fsevent = {
source = {
remotes = ["https://rubygems.org"];
sha256 = "1lm1k7wpz69jx7jrc92w3ggczkjyjbfziq5mg62vjnxmzs383xx8";
type = "gem";
};
version = "0.10.3";
};
rb-inotify = {
dependencies = ["ffi"];
source = {
remotes = ["https://rubygems.org"];
sha256 = "0yfsgw5n7pkpyky6a9wkf1g9jafxb0ja7gz0qw0y14fd2jnzfh71";
type = "gem";
sha256 = "000vbiy78wk5r1f6p7qncab8ldg7qw5pjz7bchn3lw700gpaacxp";
};
version = "0.9.10";
};
ref = {
version = "1.0.5";
source = {
remotes = ["https://rubygems.org"];
sha256 = "04p4pq4sikly7pvn30dc7v5x2m7fqbfwijci4z1y6a1ilwxzrjii";
type = "gem";
sha256 = "19qgpsfszwc2sfh6wixgky5agn831qq8ap854i1jqqhy1zsci3la";
};
version = "2.0.0";
};
sass = {
version = "3.4.11";
dependencies = ["sass-listen"];
source = {
remotes = ["https://rubygems.org"];
sha256 = "19wyzp9qsg8hdkkxlsv713w0qmy66qrdp0shj42587ssx4qhrlag";
type = "gem";
sha256 = "10dncnv7g5v8d1xpw2aaarxjjlm68f7nm02ns2kl8nf3yxi6wzdf";
};
version = "3.5.6";
};
sass-listen = {
dependencies = ["rb-fsevent" "rb-inotify"];
source = {
remotes = ["https://rubygems.org"];
sha256 = "0xw3q46cmahkgyldid5hwyiwacp590zj2vmswlll68ryvmvcp7df";
type = "gem";
};
version = "4.0.0";
};
therubyracer = {
version = "0.12.1";
dependencies = ["libv8" "ref"];
source = {
remotes = ["https://rubygems.org"];
sha256 = "1g95bzs2axjglyjyj6xvsywqgr80bnzlkw7mddxx1fdrak5wni2q";
type = "gem";
sha256 = "106fqimqyaalh7p6czbl5m2j69z8gv7cm10mjb8bbb2p2vlmqmi6";
};
dependencies = [
"libv8"
"ref"
];
version = "0.12.3";
};
uglifier = {
version = "2.7.0";
dependencies = ["execjs"];
source = {
remotes = ["https://rubygems.org"];
sha256 = "0dycp9c5xiricla6sgvg0vf22i3axs5k1v1607dvl7nv1xkkaczi";
type = "gem";
sha256 = "1x1mnakx086l83a3alj690c6n8kfmb4bk243a6m6yz99s15gbxfq";
};
dependencies = [
"execjs"
"json"
];
version = "4.1.10";
};
}
}
17 changes: 17 additions & 0 deletions pkgs/servers/consul/ui-no-bundler.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
diff --git a/ui/scripts/dist.sh b/ui/scripts/dist.sh
index 0ad6e28e..db340da0 100755
--- a/ui/scripts/dist.sh
+++ b/ui/scripts/dist.sh
@@ -15,10 +15,9 @@ DEPLOY="../pkg/web_ui"
rm -rf $DEPLOY
mkdir -p $DEPLOY

-bundle check >/dev/null 2>&1 || bundle install
-bundle exec sass styles/base.scss static/base.css
+sass styles/base.scss static/base.css

-bundle exec ruby scripts/compile.rb
+ruby scripts/compile.rb

# Copy into deploy
shopt -s dotglob
4 changes: 3 additions & 1 deletion pkgs/servers/consul/ui.nix
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ stdenv.mkDerivation {

buildInputs = [ ruby gems zip ];

patchPhase = "patchShebangs ./ui/scripts/dist.sh";
patches = [ ./ui-no-bundler.patch ];

postPatch = "patchShebangs ./ui/scripts/dist.sh";

buildPhase = ''
# Build ui static files
Expand Down