Fix up the gems
This commit is contained in:
parent
842c7d5d95
commit
5fe2694ae3
4
.bundle/config
Normal file
4
.bundle/config
Normal file
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
BUNDLE_JOBS: "4"
|
||||
BUNDLE_PATH: "vendor/cache"
|
||||
BUNDLE_FORCE_RUBY_PLATFORM: "true"
|
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,5 +1,4 @@
|
|||
_site
|
||||
.bundle
|
||||
.direnv
|
||||
.nix-gems
|
||||
.DS_Store
|
||||
|
|
52
default.nix
Normal file
52
default.nix
Normal file
|
@ -0,0 +1,52 @@
|
|||
{ pkgs ? import <nixpkgs> {} }:
|
||||
|
||||
let
|
||||
src = ./.;
|
||||
env = pkgs.bundlerEnv {
|
||||
name = "chobble-com";
|
||||
inherit (pkgs) ruby;
|
||||
gemfile = ./Gemfile;
|
||||
lockfile = ./Gemfile.lock;
|
||||
gemset = ./gemset.nix;
|
||||
};
|
||||
in
|
||||
pkgs.stdenv.mkDerivation {
|
||||
name = "chobble-com";
|
||||
|
||||
src = builtins.filterSource
|
||||
(path: type: !(builtins.elem (baseNameOf path) [
|
||||
"_site"
|
||||
".jekyll-cache"
|
||||
".git"
|
||||
"node_modules"
|
||||
"result"
|
||||
"vendor"
|
||||
]))
|
||||
src;
|
||||
|
||||
nativeBuildInputs = with pkgs; [
|
||||
ruby_3_3
|
||||
html-minifier
|
||||
];
|
||||
|
||||
configurePhase = ''
|
||||
export HOME=$TMPDIR
|
||||
mkdir -p _site
|
||||
'';
|
||||
|
||||
buildPhase = ''
|
||||
echo "Building site with Jekyll..."
|
||||
JEKYLL_ENV=production ${env}/bin/jekyll build --source . --destination _site --trace
|
||||
|
||||
echo "Minifying HTML..."
|
||||
html-minifier --input-dir _site --output-dir _site --collapse-whitespace --file-ext html
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
echo "Creating output directory..."
|
||||
mkdir -p $out
|
||||
|
||||
echo "Copying site files..."
|
||||
cp -r _site/* $out/
|
||||
'';
|
||||
}
|
379
gemset.nix
Normal file
379
gemset.nix
Normal file
|
@ -0,0 +1,379 @@
|
|||
{
|
||||
addressable = {
|
||||
dependencies = ["public_suffix"];
|
||||
groups = ["default" "jekyll_plugins"];
|
||||
platforms = [];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "0cl2qpvwiffym62z991ynks7imsm87qmgxf0yfsmlwzkgi9qcaa6";
|
||||
type = "gem";
|
||||
};
|
||||
version = "2.8.7";
|
||||
};
|
||||
bigdecimal = {
|
||||
groups = ["default" "jekyll_plugins"];
|
||||
platforms = [];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "1gi7zqgmqwi5lizggs1jhc3zlwaqayy9rx2ah80sxy24bbnng558";
|
||||
type = "gem";
|
||||
};
|
||||
version = "3.1.8";
|
||||
};
|
||||
colorator = {
|
||||
groups = ["default" "jekyll_plugins"];
|
||||
platforms = [];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "0f7wvpam948cglrciyqd798gdc6z3cfijciavd0dfixgaypmvy72";
|
||||
type = "gem";
|
||||
};
|
||||
version = "1.1.0";
|
||||
};
|
||||
concurrent-ruby = {
|
||||
groups = ["default" "jekyll_plugins"];
|
||||
platforms = [];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "0chwfdq2a6kbj6xz9l6zrdfnyghnh32si82la1dnpa5h75ir5anl";
|
||||
type = "gem";
|
||||
};
|
||||
version = "1.3.4";
|
||||
};
|
||||
em-websocket = {
|
||||
dependencies = ["eventmachine" "http_parser.rb"];
|
||||
groups = ["default" "jekyll_plugins"];
|
||||
platforms = [];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "1a66b0kjk6jx7pai9gc7i27zd0a128gy73nmas98gjz6wjyr4spm";
|
||||
type = "gem";
|
||||
};
|
||||
version = "0.5.3";
|
||||
};
|
||||
eventmachine = {
|
||||
groups = ["default" "jekyll_plugins"];
|
||||
platforms = [];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "0wh9aqb0skz80fhfn66lbpr4f86ya2z5rx6gm5xlfhd05bj1ch4r";
|
||||
type = "gem";
|
||||
};
|
||||
version = "1.2.7";
|
||||
};
|
||||
ffi = {
|
||||
groups = ["default" "jekyll_plugins"];
|
||||
platforms = [];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "07139870npj59jnl8vmk39ja3gdk3fb5z9vc0lf32y2h891hwqsi";
|
||||
type = "gem";
|
||||
};
|
||||
version = "1.17.0";
|
||||
};
|
||||
forwardable-extended = {
|
||||
groups = ["default" "jekyll_plugins"];
|
||||
platforms = [];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "15zcqfxfvsnprwm8agia85x64vjzr2w0xn9vxfnxzgcv8s699v0v";
|
||||
type = "gem";
|
||||
};
|
||||
version = "2.6.0";
|
||||
};
|
||||
google-protobuf = {
|
||||
dependencies = ["bigdecimal" "rake"];
|
||||
groups = ["default" "jekyll_plugins"];
|
||||
platforms = [];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "1m3gm8l1rlmcf7gqmdli1pmc788zhg3m7ng3wbv8barxh3cdmxrg";
|
||||
type = "gem";
|
||||
};
|
||||
version = "4.29.0";
|
||||
};
|
||||
"http_parser.rb" = {
|
||||
groups = ["default" "jekyll_plugins"];
|
||||
platforms = [];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "1gj4fmls0mf52dlr928gaq0c0cb0m3aqa9kaa6l0ikl2zbqk42as";
|
||||
type = "gem";
|
||||
};
|
||||
version = "0.8.0";
|
||||
};
|
||||
i18n = {
|
||||
dependencies = ["concurrent-ruby"];
|
||||
groups = ["default" "jekyll_plugins"];
|
||||
platforms = [];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "0k31wcgnvcvd14snz0pfqj976zv6drfsnq6x8acz10fiyms9l8nw";
|
||||
type = "gem";
|
||||
};
|
||||
version = "1.14.6";
|
||||
};
|
||||
jekyll = {
|
||||
dependencies = ["addressable" "colorator" "em-websocket" "i18n" "jekyll-sass-converter" "jekyll-watch" "kramdown" "kramdown-parser-gfm" "liquid" "mercenary" "pathutil" "rouge" "safe_yaml" "terminal-table" "webrick"];
|
||||
groups = ["default" "jekyll_plugins"];
|
||||
platforms = [];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "0124fnqizh7njn99qg4f3jvf9kg2rpm88drs9p9r5hqr50n2i264";
|
||||
type = "gem";
|
||||
};
|
||||
version = "4.3.4";
|
||||
};
|
||||
jekyll-sass-converter = {
|
||||
dependencies = ["sass-embedded"];
|
||||
groups = ["default" "jekyll_plugins"];
|
||||
platforms = [];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "00n9v19h0qgjijygfdkdh2gwpmdlz49nw1mqk6fnp43f317ngrz2";
|
||||
type = "gem";
|
||||
};
|
||||
version = "3.0.0";
|
||||
};
|
||||
jekyll-sitemap = {
|
||||
dependencies = ["jekyll"];
|
||||
groups = ["jekyll_plugins"];
|
||||
platforms = [];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "0622rwsn5i0m5xcyzdn86l68wgydqwji03lqixdfm1f1xdfqrq0d";
|
||||
type = "gem";
|
||||
};
|
||||
version = "1.4.0";
|
||||
};
|
||||
jekyll-toc = {
|
||||
dependencies = ["jekyll" "nokogiri"];
|
||||
groups = ["jekyll_plugins"];
|
||||
platforms = [];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "0s06qmdcybhrz5qcmyjbb8cf5x8a7mqv242p0gi4kn73x3vp10la";
|
||||
type = "gem";
|
||||
};
|
||||
version = "0.19.0";
|
||||
};
|
||||
jekyll-watch = {
|
||||
dependencies = ["listen"];
|
||||
groups = ["default" "jekyll_plugins"];
|
||||
platforms = [];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "1qd7hy1kl87fl7l0frw5qbn22x7ayfzlv9a5ca1m59g0ym1ysi5w";
|
||||
type = "gem";
|
||||
};
|
||||
version = "2.2.1";
|
||||
};
|
||||
kramdown = {
|
||||
dependencies = ["rexml"];
|
||||
groups = ["default" "jekyll_plugins"];
|
||||
platforms = [];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "131nwypz8b4pq1hxs6gsz3k00i9b75y3cgpkq57vxknkv6mvdfw7";
|
||||
type = "gem";
|
||||
};
|
||||
version = "2.5.1";
|
||||
};
|
||||
kramdown-parser-gfm = {
|
||||
dependencies = ["kramdown"];
|
||||
groups = ["default" "jekyll_plugins"];
|
||||
platforms = [];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "0a8pb3v951f4x7h968rqfsa19c8arz21zw1vaj42jza22rap8fgv";
|
||||
type = "gem";
|
||||
};
|
||||
version = "1.1.0";
|
||||
};
|
||||
liquid = {
|
||||
groups = ["default" "jekyll_plugins"];
|
||||
platforms = [];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "1czxv2i1gv3k7hxnrgfjb0z8khz74l4pmfwd70c7kr25l2qypksg";
|
||||
type = "gem";
|
||||
};
|
||||
version = "4.0.4";
|
||||
};
|
||||
listen = {
|
||||
dependencies = ["rb-fsevent" "rb-inotify"];
|
||||
groups = ["default" "jekyll_plugins"];
|
||||
platforms = [];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "0rwwsmvq79qwzl6324yc53py02kbrcww35si720490z5w0j497nv";
|
||||
type = "gem";
|
||||
};
|
||||
version = "3.9.0";
|
||||
};
|
||||
mercenary = {
|
||||
groups = ["default" "jekyll_plugins"];
|
||||
platforms = [];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "0f2i827w4lmsizrxixsrv2ssa3gk1b7lmqh8brk8ijmdb551wnmj";
|
||||
type = "gem";
|
||||
};
|
||||
version = "0.4.0";
|
||||
};
|
||||
mini_portile2 = {
|
||||
groups = ["default" "jekyll_plugins"];
|
||||
platforms = [];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "0x8asxl83msn815lwmb2d7q5p29p7drhjv5va0byhk60v9n16iwf";
|
||||
type = "gem";
|
||||
};
|
||||
version = "2.8.8";
|
||||
};
|
||||
nokogiri = {
|
||||
dependencies = ["mini_portile2" "racc"];
|
||||
groups = ["default" "jekyll_plugins"];
|
||||
platforms = [];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "15gysw8rassqgdq3kwgl4mhqmrgh7nk2qvrcqp4ijyqazgywn6gq";
|
||||
type = "gem";
|
||||
};
|
||||
version = "1.16.7";
|
||||
};
|
||||
pathutil = {
|
||||
dependencies = ["forwardable-extended"];
|
||||
groups = ["default" "jekyll_plugins"];
|
||||
platforms = [];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "12fm93ljw9fbxmv2krki5k5wkvr7560qy8p4spvb9jiiaqv78fz4";
|
||||
type = "gem";
|
||||
};
|
||||
version = "0.16.2";
|
||||
};
|
||||
public_suffix = {
|
||||
groups = ["default" "jekyll_plugins"];
|
||||
platforms = [];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "0vqcw3iwby3yc6avs1vb3gfd0vcp2v7q310665dvxfswmcf4xm31";
|
||||
type = "gem";
|
||||
};
|
||||
version = "6.0.1";
|
||||
};
|
||||
racc = {
|
||||
groups = ["default" "jekyll_plugins"];
|
||||
platforms = [];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "0byn0c9nkahsl93y9ln5bysq4j31q8xkf2ws42swighxd4lnjzsa";
|
||||
type = "gem";
|
||||
};
|
||||
version = "1.8.1";
|
||||
};
|
||||
rake = {
|
||||
groups = ["default" "jekyll_plugins"];
|
||||
platforms = [];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "17850wcwkgi30p7yqh60960ypn7yibacjjha0av78zaxwvd3ijs6";
|
||||
type = "gem";
|
||||
};
|
||||
version = "13.2.1";
|
||||
};
|
||||
rb-fsevent = {
|
||||
groups = ["default" "jekyll_plugins"];
|
||||
platforms = [];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "1zmf31rnpm8553lqwibvv3kkx0v7majm1f341xbxc0bk5sbhp423";
|
||||
type = "gem";
|
||||
};
|
||||
version = "0.11.2";
|
||||
};
|
||||
rb-inotify = {
|
||||
dependencies = ["ffi"];
|
||||
groups = ["default" "jekyll_plugins"];
|
||||
platforms = [];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "0vmy8xgahixcz6hzwy4zdcyn2y6d6ri8dqv5xccgzc1r292019x0";
|
||||
type = "gem";
|
||||
};
|
||||
version = "0.11.1";
|
||||
};
|
||||
rexml = {
|
||||
groups = ["default" "jekyll_plugins"];
|
||||
platforms = [];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "1j9p66pmfgxnzp76ksssyfyqqrg7281dyi3xyknl3wwraaw7a66p";
|
||||
type = "gem";
|
||||
};
|
||||
version = "3.3.9";
|
||||
};
|
||||
rouge = {
|
||||
groups = ["default" "jekyll_plugins"];
|
||||
platforms = [];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "1pchwrkr0994v7mh054lcp0na3bk3mj2sk0dc33bn6bhxrnirj1a";
|
||||
type = "gem";
|
||||
};
|
||||
version = "4.5.1";
|
||||
};
|
||||
safe_yaml = {
|
||||
groups = ["default" "jekyll_plugins"];
|
||||
platforms = [];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "0j7qv63p0vqcd838i2iy2f76c3dgwzkiz1d1xkg7n0pbnxj2vb56";
|
||||
type = "gem";
|
||||
};
|
||||
version = "1.0.5";
|
||||
};
|
||||
sass-embedded = {
|
||||
dependencies = ["google-protobuf" "rake"];
|
||||
groups = ["default" "jekyll_plugins"];
|
||||
platforms = [];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "1dr6kkfch4p2c5414r21ijzxnrs3iid8x0ywzclqxznq0vqlgpax";
|
||||
type = "gem";
|
||||
};
|
||||
version = "1.81.0";
|
||||
};
|
||||
terminal-table = {
|
||||
dependencies = ["unicode-display_width"];
|
||||
groups = ["default" "jekyll_plugins"];
|
||||
platforms = [];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "14dfmfjppmng5hwj7c5ka6qdapawm3h6k9lhn8zj001ybypvclgr";
|
||||
type = "gem";
|
||||
};
|
||||
version = "3.0.2";
|
||||
};
|
||||
unicode-display_width = {
|
||||
groups = ["default" "jekyll_plugins"];
|
||||
platforms = [];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "0nkz7fadlrdbkf37m0x7sw8bnz8r355q3vwcfb9f9md6pds9h9qj";
|
||||
type = "gem";
|
||||
};
|
||||
version = "2.6.0";
|
||||
};
|
||||
webrick = {
|
||||
groups = ["default" "jekyll_plugins"];
|
||||
platforms = [];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "0r79mir4phdmcx0l4yqfwfzdy8vgvrl4ym07585rd2b401bhrrcy";
|
||||
type = "gem";
|
||||
};
|
||||
version = "1.9.0";
|
||||
};
|
||||
}
|
51
shell.nix
Normal file
51
shell.nix
Normal file
|
@ -0,0 +1,51 @@
|
|||
with (import <nixpkgs> {}); let
|
||||
env = bundlerEnv {
|
||||
name = "BluePitsHousingAction";
|
||||
inherit ruby;
|
||||
gemfile = ./Gemfile;
|
||||
lockfile = ./Gemfile.lock;
|
||||
gemset = ./gemset.nix;
|
||||
};
|
||||
in
|
||||
stdenv.mkDerivation {
|
||||
name = "bluepitshousingaction-co-uk";
|
||||
buildInputs = [
|
||||
env
|
||||
ruby_3_3
|
||||
rubyPackages_3_3.ffi
|
||||
libffi
|
||||
];
|
||||
|
||||
shellHook = ''
|
||||
serve() {
|
||||
${env}/bin/jekyll serve --watch &
|
||||
JEKYLL_PID=$!
|
||||
|
||||
cleanup_serve() {
|
||||
echo "Cleaning up serve process..."
|
||||
kill $JEKYLL_PID 2>/dev/null
|
||||
wait $JEKYLL_PID 2>/dev/null
|
||||
}
|
||||
|
||||
trap cleanup_serve EXIT INT TERM
|
||||
|
||||
wait $JEKYLL_PID
|
||||
|
||||
cleanup_serve
|
||||
|
||||
trap - EXIT INT TERM
|
||||
}
|
||||
|
||||
export -f serve
|
||||
|
||||
cleanup() {
|
||||
echo "Cleaning up..."
|
||||
rm -rf _site .jekyll-cache .jekyll-metadata
|
||||
}
|
||||
|
||||
trap cleanup EXIT
|
||||
|
||||
echo "Development environment ready!"
|
||||
echo "Run 'serve' to start development server"
|
||||
'';
|
||||
}
|
Loading…
Reference in a new issue