Skip to content

Commit 7551297

Browse files
committed
nix build for localdev
1 parent 065c5c8 commit 7551297

File tree

5 files changed

+560
-11
lines changed

5 files changed

+560
-11
lines changed

images/ig-publisher/Gemfile

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
source 'https://rubygems.org'
2+
3+
gem 'jekyll'
4+
gem 'kramdown'
5+
6+
group :jekyll_plugins do
7+
gem 'jekyll-asciidoc'
8+
end

images/ig-publisher/Gemfile.lock

+81
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
GEM
2+
remote: https://rubygems.org/
3+
specs:
4+
addressable (2.8.6)
5+
public_suffix (>= 2.0.2, < 6.0)
6+
asciidoctor (2.0.22)
7+
colorator (1.1.0)
8+
concurrent-ruby (1.2.3)
9+
em-websocket (0.5.3)
10+
eventmachine (>= 0.12.9)
11+
http_parser.rb (~> 0)
12+
eventmachine (1.2.7)
13+
ffi (1.16.3)
14+
forwardable-extended (2.6.0)
15+
google-protobuf (4.26.1-x86_64-linux)
16+
rake (>= 13)
17+
http_parser.rb (0.8.0)
18+
i18n (1.14.5)
19+
concurrent-ruby (~> 1.0)
20+
jekyll (4.3.3)
21+
addressable (~> 2.4)
22+
colorator (~> 1.0)
23+
em-websocket (~> 0.5)
24+
i18n (~> 1.0)
25+
jekyll-sass-converter (>= 2.0, < 4.0)
26+
jekyll-watch (~> 2.0)
27+
kramdown (~> 2.3, >= 2.3.1)
28+
kramdown-parser-gfm (~> 1.0)
29+
liquid (~> 4.0)
30+
mercenary (>= 0.3.6, < 0.5)
31+
pathutil (~> 0.9)
32+
rouge (>= 3.0, < 5.0)
33+
safe_yaml (~> 1.0)
34+
terminal-table (>= 1.8, < 4.0)
35+
webrick (~> 1.7)
36+
jekyll-asciidoc (3.0.1)
37+
asciidoctor (>= 1.5.0, < 3.0.0)
38+
jekyll (>= 3.0.0)
39+
jekyll-sass-converter (3.0.0)
40+
sass-embedded (~> 1.54)
41+
jekyll-watch (2.2.1)
42+
listen (~> 3.0)
43+
kramdown (2.4.0)
44+
rexml
45+
kramdown-parser-gfm (1.1.0)
46+
kramdown (~> 2.0)
47+
liquid (4.0.4)
48+
listen (3.9.0)
49+
rb-fsevent (~> 0.10, >= 0.10.3)
50+
rb-inotify (~> 0.9, >= 0.9.10)
51+
mercenary (0.4.0)
52+
pathutil (0.16.2)
53+
forwardable-extended (~> 2.6)
54+
public_suffix (5.0.5)
55+
rake (13.2.1)
56+
rb-fsevent (0.11.2)
57+
rb-inotify (0.10.1)
58+
ffi (~> 1.0)
59+
rexml (3.2.8)
60+
strscan (>= 3.0.9)
61+
rouge (4.2.1)
62+
safe_yaml (1.0.5)
63+
sass-embedded (1.77.2)
64+
google-protobuf (>= 3.25, < 5.0)
65+
rake (>= 13.0.0)
66+
strscan (3.1.0)
67+
terminal-table (3.0.2)
68+
unicode-display_width (>= 1.1.1, < 3)
69+
unicode-display_width (2.5.0)
70+
webrick (1.8.1)
71+
72+
PLATFORMS
73+
x86_64-linux
74+
75+
DEPENDENCIES
76+
jekyll
77+
jekyll-asciidoc
78+
kramdown
79+
80+
BUNDLED WITH
81+
2.3.27

images/ig-publisher/flake.lock

+34-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

images/ig-publisher/flake.nix

+21-10
Original file line numberDiff line numberDiff line change
@@ -3,41 +3,53 @@
33

44
inputs = {
55
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
6+
ruby-nix.url = "github:inscapist/ruby-nix";
67
fhirPublisherJarFile = {
78
url = "https://github.com/HL7/fhir-ig-publisher/releases/download/1.6.7/publisher.jar";
89
flake = false;
910
};
1011
};
1112

12-
outputs = { self, nixpkgs, fhirPublisherJarFile }:
13+
outputs = { self, nixpkgs, ruby-nix, fhirPublisherJarFile }:
1314
let
14-
pkgs = import nixpkgs { system = "x86_64-linux"; };
15-
tarballPath = pkgs.dockerTools.pullImage {
15+
pkgs = import nixpkgs {
16+
system = "x86_64-linux";
17+
};
18+
alpine = pkgs.dockerTools.pullImage {
1619
imageName = "alpine";
1720
imageDigest = "sha256:c5b1261d6d3e43071626931fc004f70149baeba2c8ec672bd4f27761f8e1ad6b";
1821
sha256 = "1sqv78kskab3f9cby9njlr67g1pnm748msza2nf61wbnnf98dyjz";
1922
finalImageName = "alpine";
2023
finalImageTag = "latest";
2124
};
25+
rubyNix = ruby-nix.lib pkgs;
2226
in
23-
{
27+
rec {
28+
inherit
29+
(rubyNix {
30+
gemset = import ./gemset.nix;
31+
ruby = pkgs.ruby;
32+
name = "jekyll-with-asciidoc";
33+
gemConfig = pkgs.defaultGemConfig;
34+
})
35+
env
36+
;
2437
packages.x86_64-linux.default = pkgs.dockerTools.buildImage {
2538
name = "ghcr.io/fhir/ig-publisher-localdev-nix";
2639
tag = "latest";
27-
fromImage = tarballPath;
40+
fromImage = alpine;
2841
copyToRoot = pkgs.buildEnv {
2942
name = "image-root";
30-
paths = with pkgs; [
43+
paths = [ env ] ++ (with pkgs; [
3144
shadow
3245
curl
3346
wget
3447
jq
3548
bash
36-
jdk
3749
bashInteractive
50+
jdk
3851
readline
3952
ncurses
40-
jekyll
4153
nodejs
4254
nodePackages.npm
4355
git
@@ -49,7 +61,7 @@
4961
mkdir -p $out/app/lib
5062
cp ${fhirPublisherJarFile} $out/app/lib/publisher.jar
5163
'')
52-
];
64+
]);
5365
};
5466
config = {
5567
Entrypoint = [ "/usr/local/bin/docker-entrypoint.sh" ];
@@ -74,7 +86,6 @@
7486
mkdir /home/publisher/bin
7587
git config --global pull.ff only
7688
'
77-
7889
'';
7990

8091
};

0 commit comments

Comments
 (0)