From 7a3b4c4b385a67c710de5aa591c5148057245421 Mon Sep 17 00:00:00 2001 From: "Ross A. Baker" Date: Tue, 18 Jan 2022 01:11:03 -0500 Subject: [PATCH 1/4] Add dev shell to run Jekyll --- flake.lock | 59 ++++ flake.nix | 44 +++ gemset.nix | 985 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 1088 insertions(+) create mode 100644 flake.lock create mode 100644 flake.nix create mode 100644 gemset.nix diff --git a/flake.lock b/flake.lock new file mode 100644 index 00000000..d37a08dc --- /dev/null +++ b/flake.lock @@ -0,0 +1,59 @@ +{ + "nodes": { + "devshell": { + "locked": { + "lastModified": 1642188268, + "narHash": "sha256-DNz4xScpXIn7rSDohdayBpPR9H9OWCMDOgTYegX081k=", + "owner": "numtide", + "repo": "devshell", + "rev": "696acc29668b644df1740b69e1601119bf6da83b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "devshell", + "type": "github" + } + }, + "flake-utils": { + "locked": { + "lastModified": 1638122382, + "narHash": "sha256-sQzZzAbvKEqN9s0bzWuYmRaA03v40gaJ4+iL1LXjaeI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "74f7e4319258e287b0f9cb95426c9853b282730b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1642130244, + "narHash": "sha256-/5FhZkZFQCRQIRFosUQW1zmDrsNHVOJIB/+XgRPHiPU=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "bc59ba15b64d0a0ee1d1764f18b4f3480d2c3e5a", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "devshell": "devshell", + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 00000000..4e0ddd09 --- /dev/null +++ b/flake.nix @@ -0,0 +1,44 @@ +{ + description = "Virtual environment for typelevel.org site"; + + inputs = { + nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; + devshell.url = "github:numtide/devshell"; + flake-utils.url = "github:numtide/flake-utils"; + }; + + outputs = { self, nixpkgs, flake-utils, devshell, ... }: + let + forSystem = system: + let + pkgs = import nixpkgs { + inherit system; + overlays = [ devshell.overlay ]; + }; + + gems = pkgs.bundlerEnv { + name = "typelevel-org-bundler-env"; + inherit (pkgs) ruby; + gemdir = ./.; + }; + in + { + devShell = pkgs.devshell.mkShell { + name = "typelevel-org-shell"; + commands = [ + { + name = "jekyll"; + help = "a jekyll bundled with this site's dependencies"; + command = "${gems}/bin/jekyll $@"; + } + { + name = "tl-preview"; + help = "preview the Jekyll site"; + command = "${gems}/bin/jekyll serve -wl --baseurl ''"; + } + ]; + }; + }; + in + flake-utils.lib.eachDefaultSystem forSystem; +} diff --git a/gemset.nix b/gemset.nix new file mode 100644 index 00000000..610c971b --- /dev/null +++ b/gemset.nix @@ -0,0 +1,985 @@ +{ + activesupport = { + dependencies = ["concurrent-ruby" "i18n" "minitest" "tzinfo" "zeitwerk"]; + groups = ["default" "jekyll_plugins"]; + platforms = []; + source = { + remotes = ["http://rubygems.org"]; + sha256 = "0sls37x9pd2zmipn14c46gcjbfzlg269r413cvm0d58595qkiv7z"; + type = "gem"; + }; + version = "6.0.3.6"; + }; + addressable = { + dependencies = ["public_suffix"]; + groups = ["default" "jekyll_plugins"]; + platforms = []; + source = { + remotes = ["http://rubygems.org"]; + sha256 = "022r3m9wdxljpbya69y2i3h9g3dhhfaqzidf95m6qjzms792jvgp"; + type = "gem"; + }; + version = "2.8.0"; + }; + coffee-script = { + dependencies = ["coffee-script-source" "execjs"]; + groups = ["default" "jekyll_plugins"]; + platforms = []; + source = { + remotes = ["http://rubygems.org"]; + sha256 = "0rc7scyk7mnpfxqv5yy4y5q1hx3i7q3ahplcp4bq2g5r24g2izl2"; + type = "gem"; + }; + version = "2.4.1"; + }; + coffee-script-source = { + groups = ["default" "jekyll_plugins"]; + platforms = []; + source = { + remotes = ["http://rubygems.org"]; + sha256 = "0xfshhlz808f8639wc88wgls1mww35sid8rd55vn0a4yqajf4vh9"; + type = "gem"; + }; + version = "1.11.1"; + }; + colorator = { + groups = ["default" "jekyll_plugins"]; + platforms = []; + source = { + remotes = ["http://rubygems.org"]; + sha256 = "0f7wvpam948cglrciyqd798gdc6z3cfijciavd0dfixgaypmvy72"; + type = "gem"; + }; + version = "1.1.0"; + }; + commonmarker = { + dependencies = ["ruby-enum"]; + groups = ["default" "jekyll_plugins"]; + platforms = []; + source = { + remotes = ["http://rubygems.org"]; + sha256 = "1pmjm87p0hxnknp33cxyvkgbr1swfp9gcznssmalm9z8kwyancb9"; + type = "gem"; + }; + version = "0.17.13"; + }; + concurrent-ruby = { + groups = ["default" "jekyll_plugins"]; + platforms = []; + source = { + remotes = ["http://rubygems.org"]; + sha256 = "0mr23wq0szj52xnj0zcn1k0c7j4v79wlwbijkpfcscqww3l6jlg3"; + type = "gem"; + }; + version = "1.1.8"; + }; + dnsruby = { + dependencies = ["simpleidn"]; + groups = ["default" "jekyll_plugins"]; + platforms = []; + source = { + remotes = ["http://rubygems.org"]; + sha256 = "0q7k7wn8flcdr0kzgknq40cjddd0zn3g3n4gwwwdz0kq30pinzxx"; + type = "gem"; + }; + version = "1.61.5"; + }; + em-websocket = { + dependencies = ["eventmachine" "http_parser.rb"]; + groups = ["default" "jekyll_plugins"]; + platforms = []; + source = { + remotes = ["http://rubygems.org"]; + sha256 = "1mg1mx735a0k1l8y14ps2mxdwhi5r01ikydf34b0sp60v66nvbkb"; + type = "gem"; + }; + version = "0.5.2"; + }; + ethon = { + dependencies = ["ffi"]; + groups = ["default" "jekyll_plugins"]; + platforms = []; + source = { + remotes = ["http://rubygems.org"]; + sha256 = "1cql2cxl9bg8gbmmlzl4kvpq7y0gjldgarsnxq35vpd7ga3h54w2"; + type = "gem"; + }; + version = "0.13.0"; + }; + eventmachine = { + groups = ["default" "jekyll_plugins"]; + platforms = []; + source = { + remotes = ["http://rubygems.org"]; + sha256 = "0wh9aqb0skz80fhfn66lbpr4f86ya2z5rx6gm5xlfhd05bj1ch4r"; + type = "gem"; + }; + version = "1.2.7"; + }; + execjs = { + groups = ["default" "jekyll_plugins"]; + platforms = []; + source = { + remotes = ["http://rubygems.org"]; + sha256 = "1yz55sf2nd3l666ms6xr18sm2aggcvmb8qr3v53lr4rir32y1yp1"; + type = "gem"; + }; + version = "2.7.0"; + }; + faraday = { + dependencies = ["faraday-net_http" "multipart-post" "ruby2_keywords"]; + groups = ["default" "jekyll_plugins"]; + platforms = []; + source = { + remotes = ["http://rubygems.org"]; + sha256 = "1hmssd8pj4n7yq4kz834ylkla8ryyvhaap6q9nzymp93m1xq21kz"; + type = "gem"; + }; + version = "1.3.0"; + }; + faraday-net_http = { + groups = ["default" "jekyll_plugins"]; + platforms = []; + source = { + remotes = ["http://rubygems.org"]; + sha256 = "1fi8sda5hc54v1w3mqfl5yz09nhx35kglyx72w7b8xxvdr0cwi9j"; + type = "gem"; + }; + version = "1.0.1"; + }; + ffi = { + groups = ["default" "jekyll_plugins"]; + platforms = []; + source = { + remotes = ["http://rubygems.org"]; + sha256 = "0nq1fb3vbfylccwba64zblxy96qznxbys5900wd7gm9bpplmf432"; + type = "gem"; + }; + version = "1.15.0"; + }; + forwardable-extended = { + groups = ["default" "jekyll_plugins"]; + platforms = []; + source = { + remotes = ["http://rubygems.org"]; + sha256 = "15zcqfxfvsnprwm8agia85x64vjzr2w0xn9vxfnxzgcv8s699v0v"; + type = "gem"; + }; + version = "2.6.0"; + }; + gemoji = { + groups = ["default" "jekyll_plugins"]; + platforms = []; + source = { + remotes = ["http://rubygems.org"]; + sha256 = "0vgklpmhdz98xayln5hhqv4ffdyrglzwdixkn5gsk9rj94pkymc0"; + type = "gem"; + }; + version = "3.0.1"; + }; + github-pages = { + dependencies = ["github-pages-health-check" "jekyll" "jekyll-avatar" "jekyll-coffeescript" "jekyll-commonmark-ghpages" "jekyll-default-layout" "jekyll-feed" "jekyll-gist" "jekyll-github-metadata" "jekyll-mentions" "jekyll-optional-front-matter" "jekyll-paginate" "jekyll-readme-index" "jekyll-redirect-from" "jekyll-relative-links" "jekyll-remote-theme" "jekyll-sass-converter" "jekyll-seo-tag" "jekyll-sitemap" "jekyll-swiss" "jekyll-theme-architect" "jekyll-theme-cayman" "jekyll-theme-dinky" "jekyll-theme-hacker" "jekyll-theme-leap-day" "jekyll-theme-merlot" "jekyll-theme-midnight" "jekyll-theme-minimal" "jekyll-theme-modernist" "jekyll-theme-primer" "jekyll-theme-slate" "jekyll-theme-tactile" "jekyll-theme-time-machine" "jekyll-titles-from-headings" "jemoji" "kramdown" "kramdown-parser-gfm" "liquid" "mercenary" "minima" "nokogiri" "rouge" "terminal-table"]; + groups = ["jekyll_plugins"]; + platforms = []; + source = { + remotes = ["http://rubygems.org"]; + sha256 = "0g94fg3cvjzshzgxn7632wcrbv298vqzdr0wzy7png0bakbd6hdd"; + type = "gem"; + }; + version = "214"; + }; + github-pages-health-check = { + dependencies = ["addressable" "dnsruby" "octokit" "public_suffix" "typhoeus"]; + groups = ["default" "jekyll_plugins"]; + platforms = []; + source = { + remotes = ["http://rubygems.org"]; + sha256 = "0wdv3a60swnmhpjip30s2bhz0fh5kbinshnvi4ympdqfx41ah1nl"; + type = "gem"; + }; + version = "1.17.0"; + }; + html-pipeline = { + dependencies = ["activesupport" "nokogiri"]; + groups = ["default" "jekyll_plugins"]; + platforms = []; + source = { + remotes = ["http://rubygems.org"]; + sha256 = "080sn9z1a64gv04p318jz10y6lv6qd3avip08rrcmq9k4ihai0f1"; + type = "gem"; + }; + version = "2.14.0"; + }; + "http_parser.rb" = { + groups = ["default" "jekyll_plugins"]; + platforms = []; + source = { + remotes = ["http://rubygems.org"]; + sha256 = "15nidriy0v5yqfjsgsra51wmknxci2n2grliz78sf9pga3n0l7gi"; + type = "gem"; + }; + version = "0.6.0"; + }; + i18n = { + dependencies = ["concurrent-ruby"]; + groups = ["default" "jekyll_plugins"]; + platforms = []; + source = { + remotes = ["http://rubygems.org"]; + sha256 = "038qvz7kd3cfxk8bvagqhakx68pfbnmghpdkx7573wbf0maqp9a3"; + type = "gem"; + }; + version = "0.9.5"; + }; + jekyll = { + dependencies = ["addressable" "colorator" "em-websocket" "i18n" "jekyll-sass-converter" "jekyll-watch" "kramdown" "liquid" "mercenary" "pathutil" "rouge" "safe_yaml"]; + groups = ["default" "jekyll_plugins"]; + platforms = []; + source = { + remotes = ["http://rubygems.org"]; + sha256 = "0ci1v1mpad36191vzbm1050dxccwv6ky4yhdyvskmqxa6cf6v21j"; + type = "gem"; + }; + version = "3.9.0"; + }; + jekyll-avatar = { + dependencies = ["jekyll"]; + groups = ["default" "jekyll_plugins"]; + platforms = []; + source = { + remotes = ["http://rubygems.org"]; + sha256 = "03bys2pl60vq92skfhlfqr2j68zhfjc86jffpg32f94wzjk8n0wk"; + type = "gem"; + }; + version = "0.7.0"; + }; + jekyll-coffeescript = { + dependencies = ["coffee-script" "coffee-script-source"]; + groups = ["default" "jekyll_plugins"]; + platforms = []; + source = { + remotes = ["http://rubygems.org"]; + sha256 = "06qf4j9f6ysjb4bq6gsdaiz2ksmhc5yb484v458ra3s6ybccqvvy"; + type = "gem"; + }; + version = "1.1.1"; + }; + jekyll-commonmark = { + dependencies = ["commonmarker" "jekyll"]; + groups = ["default" "jekyll_plugins"]; + platforms = []; + source = { + remotes = ["http://rubygems.org"]; + sha256 = "15kr36k56l4fh8yp7qswn9m91v7sa5kr2vq9w40li16z4n4akk57"; + type = "gem"; + }; + version = "1.3.1"; + }; + jekyll-commonmark-ghpages = { + dependencies = ["commonmarker" "jekyll-commonmark" "rouge"]; + groups = ["default" "jekyll_plugins"]; + platforms = []; + source = { + remotes = ["http://rubygems.org"]; + sha256 = "1bhpk7iiz2p0hha650zxqq7rlbfj92m9qxxxasarrswszl4pcvp7"; + type = "gem"; + }; + version = "0.1.6"; + }; + jekyll-default-layout = { + dependencies = ["jekyll"]; + groups = ["default" "jekyll_plugins"]; + platforms = []; + source = { + remotes = ["http://rubygems.org"]; + sha256 = "009zpd0mkmhkfp3s8yvh5mriqhil0ihv3gi2vw63flr3jz48y4kx"; + type = "gem"; + }; + version = "0.1.4"; + }; + jekyll-feed = { + dependencies = ["jekyll"]; + groups = ["default" "jekyll_plugins"]; + platforms = []; + source = { + remotes = ["http://rubygems.org"]; + sha256 = "1zxqkrnix0xiw98531h5ga6h69jhzlx2jh9qhvcl67p8nq3sgza9"; + type = "gem"; + }; + version = "0.15.1"; + }; + jekyll-gist = { + dependencies = ["octokit"]; + groups = ["default" "jekyll_plugins"]; + platforms = []; + source = { + remotes = ["http://rubygems.org"]; + sha256 = "03wz9j6yq3552nzf4g71qrdm9pfdgbm68abml9sjjgiaan1n8ns9"; + type = "gem"; + }; + version = "1.5.0"; + }; + jekyll-github-metadata = { + dependencies = ["jekyll" "octokit"]; + groups = ["default" "jekyll_plugins"]; + platforms = []; + source = { + remotes = ["http://rubygems.org"]; + sha256 = "0r4m7r4qyd3pqkp5xlyp3zzy47i18kjgwq995nrspysgkmc4qmw1"; + type = "gem"; + }; + version = "2.13.0"; + }; + jekyll-mentions = { + dependencies = ["html-pipeline" "jekyll"]; + groups = ["default" "jekyll_plugins"]; + platforms = []; + source = { + remotes = ["http://rubygems.org"]; + sha256 = "1n8y67plydfmay3jn865igvgb3h6s2crk8kq7ydk3wmn9h103s1r"; + type = "gem"; + }; + version = "1.6.0"; + }; + jekyll-optional-front-matter = { + dependencies = ["jekyll"]; + groups = ["default" "jekyll_plugins"]; + platforms = []; + source = { + remotes = ["http://rubygems.org"]; + sha256 = "06vnxcmgkxm5nvrpv89qq0afjlxmadv63nh4ryglcwhlf4fhdp7c"; + type = "gem"; + }; + version = "0.3.2"; + }; + jekyll-paginate = { + groups = ["default" "jekyll_plugins"]; + platforms = []; + source = { + remotes = ["http://rubygems.org"]; + sha256 = "0r7bcs8fq98zldih4787zk5i9w24nz5wa26m84ssja95n3sas2l8"; + type = "gem"; + }; + version = "1.1.0"; + }; + jekyll-readme-index = { + dependencies = ["jekyll"]; + groups = ["default" "jekyll_plugins"]; + platforms = []; + source = { + remotes = ["http://rubygems.org"]; + sha256 = "0chybr1zgnrmc7zf6psszcqnlrcy2jar8h77kci51lxj8vgc8k6p"; + type = "gem"; + }; + version = "0.3.0"; + }; + jekyll-redirect-from = { + dependencies = ["jekyll"]; + groups = ["default" "jekyll_plugins"]; + platforms = []; + source = { + remotes = ["http://rubygems.org"]; + sha256 = "1nz6kd6qsa160lmjmls4zgx7fwcpp8ac07mpzy80z6zgd7jwldb6"; + type = "gem"; + }; + version = "0.16.0"; + }; + jekyll-relative-links = { + dependencies = ["jekyll"]; + groups = ["default" "jekyll_plugins"]; + platforms = []; + source = { + remotes = ["http://rubygems.org"]; + sha256 = "0vfx90ajxyj24lz406k3pqknlbzy8nqs7wpz0in4ps9rggsh24yi"; + type = "gem"; + }; + version = "0.6.1"; + }; + jekyll-remote-theme = { + dependencies = ["addressable" "jekyll" "jekyll-sass-converter" "rubyzip"]; + groups = ["default" "jekyll_plugins"]; + platforms = []; + source = { + remotes = ["http://rubygems.org"]; + sha256 = "0h2bwl42dig0282366kpxazxb8xafnppnd4yvq2dzcsg90kfgzfk"; + type = "gem"; + }; + version = "0.4.3"; + }; + jekyll-sass-converter = { + dependencies = ["sass"]; + groups = ["default" "jekyll_plugins"]; + platforms = []; + source = { + remotes = ["http://rubygems.org"]; + sha256 = "008ikh5fk0n6ri54mylcl8jn0mq8p2nfyfqif2q3pp0lwilkcxsk"; + type = "gem"; + }; + version = "1.5.2"; + }; + jekyll-seo-tag = { + dependencies = ["jekyll"]; + groups = ["default" "jekyll_plugins"]; + platforms = []; + source = { + remotes = ["http://rubygems.org"]; + sha256 = "0fsi75hymk2wswy216fs224p5ycrzjw1kshw1bsl5czhv42wr2w3"; + type = "gem"; + }; + version = "2.7.1"; + }; + jekyll-sitemap = { + dependencies = ["jekyll"]; + groups = ["default" "jekyll_plugins"]; + platforms = []; + source = { + remotes = ["http://rubygems.org"]; + sha256 = "0622rwsn5i0m5xcyzdn86l68wgydqwji03lqixdfm1f1xdfqrq0d"; + type = "gem"; + }; + version = "1.4.0"; + }; + jekyll-swiss = { + groups = ["default" "jekyll_plugins"]; + platforms = []; + source = { + remotes = ["http://rubygems.org"]; + sha256 = "18w893f2snpbvgl80jnmq3xxsl5yi5a5qm11iy3gx0d8viasi6f2"; + type = "gem"; + }; + version = "1.0.0"; + }; + jekyll-theme-architect = { + dependencies = ["jekyll" "jekyll-seo-tag"]; + groups = ["default" "jekyll_plugins"]; + platforms = []; + source = { + remotes = ["http://rubygems.org"]; + sha256 = "0v4y0lqg1x7b94zw922qp6f3fixni9l4b9d1yavr1nswf8jmpcya"; + type = "gem"; + }; + version = "0.1.1"; + }; + jekyll-theme-cayman = { + dependencies = ["jekyll" "jekyll-seo-tag"]; + groups = ["default" "jekyll_plugins"]; + platforms = []; + source = { + remotes = ["http://rubygems.org"]; + sha256 = "1wdbvmnabzlqpq8hj7k5h9bwv96k05rx8z45f1mkqrbmy0x9gxmf"; + type = "gem"; + }; + version = "0.1.1"; + }; + jekyll-theme-dinky = { + dependencies = ["jekyll" "jekyll-seo-tag"]; + groups = ["default" "jekyll_plugins"]; + platforms = []; + source = { + remotes = ["http://rubygems.org"]; + sha256 = "0dxs6c13fas8wbcigvs8d70p7601g627i3mpchcpapwj8cfd631v"; + type = "gem"; + }; + version = "0.1.1"; + }; + jekyll-theme-hacker = { + dependencies = ["jekyll" "jekyll-seo-tag"]; + groups = ["default" "jekyll_plugins"]; + platforms = []; + source = { + remotes = ["http://rubygems.org"]; + sha256 = "1x0qrypnpxg92wjf8r57xp306057liigz2a6p511m940p5qlc0x6"; + type = "gem"; + }; + version = "0.1.2"; + }; + jekyll-theme-leap-day = { + dependencies = ["jekyll" "jekyll-seo-tag"]; + groups = ["default" "jekyll_plugins"]; + platforms = []; + source = { + remotes = ["http://rubygems.org"]; + sha256 = "1pw1qbrq2f8gyzrmwxdlsqhkzpk5cdv594aia7f6wwdxm6sjvhp2"; + type = "gem"; + }; + version = "0.1.1"; + }; + jekyll-theme-merlot = { + dependencies = ["jekyll" "jekyll-seo-tag"]; + groups = ["default" "jekyll_plugins"]; + platforms = []; + source = { + remotes = ["http://rubygems.org"]; + sha256 = "1iiaqxyfgrrsgrsbvmzfwz8m4jwx73cxvy9zw81ir5pxpbhf0rwl"; + type = "gem"; + }; + version = "0.1.1"; + }; + jekyll-theme-midnight = { + dependencies = ["jekyll" "jekyll-seo-tag"]; + groups = ["default" "jekyll_plugins"]; + platforms = []; + source = { + remotes = ["http://rubygems.org"]; + sha256 = "1jbna13cjfqd3i1m4vp8izznkxn1w1ih54zdyz004g32fwpcqbpp"; + type = "gem"; + }; + version = "0.1.1"; + }; + jekyll-theme-minimal = { + dependencies = ["jekyll" "jekyll-seo-tag"]; + groups = ["default" "jekyll_plugins"]; + platforms = []; + source = { + remotes = ["http://rubygems.org"]; + sha256 = "078rlgpc902f5kslxj2zc85y53ywngbx81zhwvz1p0nbil4f4k1s"; + type = "gem"; + }; + version = "0.1.1"; + }; + jekyll-theme-modernist = { + dependencies = ["jekyll" "jekyll-seo-tag"]; + groups = ["default" "jekyll_plugins"]; + platforms = []; + source = { + remotes = ["http://rubygems.org"]; + sha256 = "0a7gg944c1d730ss0fx9qvxwfabwsyd3xgyfwr18cx22zx9mbbvm"; + type = "gem"; + }; + version = "0.1.1"; + }; + jekyll-theme-primer = { + dependencies = ["jekyll" "jekyll-github-metadata" "jekyll-seo-tag"]; + groups = ["default" "jekyll_plugins"]; + platforms = []; + source = { + remotes = ["http://rubygems.org"]; + sha256 = "0c7p3393mr3znjpvz3plbrws9jdwcz3872v9f027p7hqffhhmh9k"; + type = "gem"; + }; + version = "0.5.4"; + }; + jekyll-theme-slate = { + dependencies = ["jekyll" "jekyll-seo-tag"]; + groups = ["default" "jekyll_plugins"]; + platforms = []; + source = { + remotes = ["http://rubygems.org"]; + sha256 = "026p01a5jr42gar6d1kwrr39jd40h91ilvkn8969hydv7yd0ld67"; + type = "gem"; + }; + version = "0.1.1"; + }; + jekyll-theme-tactile = { + dependencies = ["jekyll" "jekyll-seo-tag"]; + groups = ["default" "jekyll_plugins"]; + platforms = []; + source = { + remotes = ["http://rubygems.org"]; + sha256 = "1904cbjrv7mqkrzhwlip18krr6jk8fkzrxkyq139b20rbkp1qx5y"; + type = "gem"; + }; + version = "0.1.1"; + }; + jekyll-theme-time-machine = { + dependencies = ["jekyll" "jekyll-seo-tag"]; + groups = ["default" "jekyll_plugins"]; + platforms = []; + source = { + remotes = ["http://rubygems.org"]; + sha256 = "010gzncy2vav0rdga78x4ls0dda400lxy186knsl72yk8pa807n0"; + type = "gem"; + }; + version = "0.1.1"; + }; + jekyll-titles-from-headings = { + dependencies = ["jekyll"]; + groups = ["default" "jekyll_plugins"]; + platforms = []; + source = { + remotes = ["http://rubygems.org"]; + sha256 = "10c4sa3gwyidmkcs8h6223lmqpw3h09mn7w8hxfppsk1wda6fdkp"; + type = "gem"; + }; + version = "0.5.3"; + }; + jekyll-watch = { + dependencies = ["listen"]; + groups = ["default" "jekyll_plugins"]; + platforms = []; + source = { + remotes = ["http://rubygems.org"]; + sha256 = "1qd7hy1kl87fl7l0frw5qbn22x7ayfzlv9a5ca1m59g0ym1ysi5w"; + type = "gem"; + }; + version = "2.2.1"; + }; + jemoji = { + dependencies = ["gemoji" "html-pipeline" "jekyll"]; + groups = ["default" "jekyll_plugins"]; + platforms = []; + source = { + remotes = ["http://rubygems.org"]; + sha256 = "09sxbnrqz5vf6rxmh6lzism31gz2g3hw86ymg37r1ccknclv3cp9"; + type = "gem"; + }; + version = "0.12.0"; + }; + kramdown = { + dependencies = ["rexml"]; + groups = ["default" "jekyll_plugins"]; + platforms = []; + source = { + remotes = ["http://rubygems.org"]; + sha256 = "0jdbcjv4v7sj888bv3vc6d1dg4ackkh7ywlmn9ln2g9alk7kisar"; + type = "gem"; + }; + version = "2.3.1"; + }; + kramdown-parser-gfm = { + dependencies = ["kramdown"]; + groups = ["default" "jekyll_plugins"]; + platforms = []; + source = { + remotes = ["http://rubygems.org"]; + sha256 = "0a8pb3v951f4x7h968rqfsa19c8arz21zw1vaj42jza22rap8fgv"; + type = "gem"; + }; + version = "1.1.0"; + }; + liquid = { + groups = ["default" "jekyll_plugins"]; + platforms = []; + source = { + remotes = ["http://rubygems.org"]; + sha256 = "0zhg5ha8zy8zw9qr3fl4wgk4r5940n4128xm2pn4shpbzdbsj5by"; + type = "gem"; + }; + version = "4.0.3"; + }; + listen = { + dependencies = ["rb-fsevent" "rb-inotify"]; + groups = ["default" "jekyll_plugins"]; + platforms = []; + source = { + remotes = ["http://rubygems.org"]; + sha256 = "0h2v34xhi30w0d9gfzds2w6v89grq2gkpgvmdj9m8x1ld1845xnj"; + type = "gem"; + }; + version = "3.5.1"; + }; + mercenary = { + groups = ["default" "jekyll_plugins"]; + platforms = []; + source = { + remotes = ["http://rubygems.org"]; + sha256 = "10la0xw82dh5mqab8bl0dk21zld63cqxb1g16fk8cb39ylc4n21a"; + type = "gem"; + }; + version = "0.3.6"; + }; + mini_portile2 = { + groups = ["default" "jekyll_plugins"]; + platforms = []; + source = { + remotes = ["http://rubygems.org"]; + sha256 = "1lvxm91hi0pabnkkg47wh1siv56s6slm2mdq1idfm86dyfidfprq"; + type = "gem"; + }; + version = "2.6.1"; + }; + minima = { + dependencies = ["jekyll" "jekyll-feed" "jekyll-seo-tag"]; + groups = ["default" "jekyll_plugins"]; + platforms = []; + source = { + remotes = ["http://rubygems.org"]; + sha256 = "1gk7jmriiswda1ykjzpsw9cpiya4m9n0yrh0h6xnrc8zcfy543jj"; + type = "gem"; + }; + version = "2.5.1"; + }; + minitest = { + groups = ["default" "jekyll_plugins"]; + platforms = []; + source = { + remotes = ["http://rubygems.org"]; + sha256 = "19z7wkhg59y8abginfrm2wzplz7py3va8fyngiigngqvsws6cwgl"; + type = "gem"; + }; + version = "5.14.4"; + }; + multipart-post = { + groups = ["default" "jekyll_plugins"]; + platforms = []; + source = { + remotes = ["http://rubygems.org"]; + sha256 = "1zgw9zlwh2a6i1yvhhc4a84ry1hv824d6g2iw2chs3k5aylpmpfj"; + type = "gem"; + }; + version = "2.1.1"; + }; + nokogiri = { + dependencies = ["mini_portile2" "racc"]; + groups = ["default" "jekyll_plugins"]; + platforms = []; + source = { + remotes = ["http://rubygems.org"]; + sha256 = "1v02g7k7cxiwdcahvlxrmizn3avj2q6nsjccgilq1idc89cr081b"; + type = "gem"; + }; + version = "1.12.5"; + }; + octokit = { + dependencies = ["faraday" "sawyer"]; + groups = ["default" "jekyll_plugins"]; + platforms = []; + source = { + remotes = ["http://rubygems.org"]; + sha256 = "1fl517ld5vj0llyshp3f9kb7xyl9iqy28cbz3k999fkbwcxzhlyq"; + type = "gem"; + }; + version = "4.20.0"; + }; + pathutil = { + dependencies = ["forwardable-extended"]; + groups = ["default" "jekyll_plugins"]; + platforms = []; + source = { + remotes = ["http://rubygems.org"]; + sha256 = "12fm93ljw9fbxmv2krki5k5wkvr7560qy8p4spvb9jiiaqv78fz4"; + type = "gem"; + }; + version = "0.16.2"; + }; + public_suffix = { + groups = ["default" "jekyll_plugins"]; + platforms = []; + source = { + remotes = ["http://rubygems.org"]; + sha256 = "1xqcgkl7bwws1qrlnmxgh8g4g9m10vg60bhlw40fplninb3ng6d9"; + type = "gem"; + }; + version = "4.0.6"; + }; + racc = { + groups = ["default" "jekyll_plugins"]; + platforms = []; + source = { + remotes = ["http://rubygems.org"]; + sha256 = "178k7r0xn689spviqzhvazzvxfq6fyjldxb3ywjbgipbfi4s8j1g"; + type = "gem"; + }; + version = "1.5.2"; + }; + rb-fsevent = { + groups = ["default" "jekyll_plugins"]; + platforms = []; + source = { + remotes = ["http://rubygems.org"]; + sha256 = "1k9bsj7ni0g2fd7scyyy1sk9dy2pg9akniahab0iznvjmhn54h87"; + type = "gem"; + }; + version = "0.10.4"; + }; + rb-inotify = { + dependencies = ["ffi"]; + groups = ["default" "jekyll_plugins"]; + platforms = []; + source = { + remotes = ["http://rubygems.org"]; + sha256 = "1jm76h8f8hji38z3ggf4bzi8vps6p7sagxn3ab57qc0xyga64005"; + type = "gem"; + }; + version = "0.10.1"; + }; + rexml = { + groups = ["default" "jekyll_plugins"]; + platforms = []; + source = { + remotes = ["http://rubygems.org"]; + sha256 = "08ximcyfjy94pm1rhcx04ny1vx2sk0x4y185gzn86yfsbzwkng53"; + type = "gem"; + }; + version = "3.2.5"; + }; + rouge = { + groups = ["default" "jekyll_plugins"]; + platforms = []; + source = { + remotes = ["http://rubygems.org"]; + sha256 = "0b4b300i3m4m4kw7w1n9wgxwy16zccnb7271miksyzd0wq5b9pm3"; + type = "gem"; + }; + version = "3.26.0"; + }; + ruby-enum = { + dependencies = ["i18n"]; + groups = ["default" "jekyll_plugins"]; + platforms = []; + source = { + remotes = ["http://rubygems.org"]; + sha256 = "1pys90hxylhyg969iw9lz3qai5lblf8xwbdg1g5aj52731a9k83p"; + type = "gem"; + }; + version = "0.9.0"; + }; + ruby2_keywords = { + groups = ["default" "jekyll_plugins"]; + platforms = []; + source = { + remotes = ["http://rubygems.org"]; + sha256 = "15wfcqxyfgka05v2a7kpg64x57gl1y4xzvnc9lh60bqx5sf1iqrs"; + type = "gem"; + }; + version = "0.0.4"; + }; + rubyzip = { + groups = ["default" "jekyll_plugins"]; + platforms = []; + source = { + remotes = ["http://rubygems.org"]; + sha256 = "0590m2pr9i209pp5z4mx0nb1961ishdiqb28995hw1nln1d1b5ji"; + type = "gem"; + }; + version = "2.3.0"; + }; + safe_yaml = { + groups = ["default" "jekyll_plugins"]; + platforms = []; + source = { + remotes = ["http://rubygems.org"]; + sha256 = "0j7qv63p0vqcd838i2iy2f76c3dgwzkiz1d1xkg7n0pbnxj2vb56"; + type = "gem"; + }; + version = "1.0.5"; + }; + sass = { + dependencies = ["sass-listen"]; + groups = ["default" "jekyll_plugins"]; + platforms = []; + source = { + remotes = ["http://rubygems.org"]; + sha256 = "0p95lhs0jza5l7hqci1isflxakz83xkj97lkvxl919is0lwhv2w0"; + type = "gem"; + }; + version = "3.7.4"; + }; + sass-listen = { + dependencies = ["rb-fsevent" "rb-inotify"]; + groups = ["default" "jekyll_plugins"]; + platforms = []; + source = { + remotes = ["http://rubygems.org"]; + sha256 = "0xw3q46cmahkgyldid5hwyiwacp590zj2vmswlll68ryvmvcp7df"; + type = "gem"; + }; + version = "4.0.0"; + }; + sawyer = { + dependencies = ["addressable" "faraday"]; + groups = ["default" "jekyll_plugins"]; + platforms = []; + source = { + remotes = ["http://rubygems.org"]; + sha256 = "0yrdchs3psh583rjapkv33mljdivggqn99wkydkjdckcjn43j3cz"; + type = "gem"; + }; + version = "0.8.2"; + }; + simpleidn = { + dependencies = ["unf"]; + groups = ["default" "jekyll_plugins"]; + platforms = []; + source = { + remotes = ["http://rubygems.org"]; + sha256 = "06f7w6ph3bzzqk212yylfp4jfx275shgp9zg3xszbpv1ny2skp9m"; + type = "gem"; + }; + version = "0.2.1"; + }; + terminal-table = { + dependencies = ["unicode-display_width"]; + groups = ["default" "jekyll_plugins"]; + platforms = []; + source = { + remotes = ["http://rubygems.org"]; + sha256 = "1512cngw35hsmhvw4c05rscihc59mnj09m249sm9p3pik831ydqk"; + type = "gem"; + }; + version = "1.8.0"; + }; + thread_safe = { + groups = ["default" "jekyll_plugins"]; + platforms = []; + source = { + remotes = ["http://rubygems.org"]; + sha256 = "0nmhcgq6cgz44srylra07bmaw99f5271l0dpsvl5f75m44l0gmwy"; + type = "gem"; + }; + version = "0.3.6"; + }; + typhoeus = { + dependencies = ["ethon"]; + groups = ["default" "jekyll_plugins"]; + platforms = []; + source = { + remotes = ["http://rubygems.org"]; + sha256 = "1m22yrkmbj81rzhlny81j427qdvz57yk5wbcf3km0nf3bl6qiygz"; + type = "gem"; + }; + version = "1.4.0"; + }; + tzinfo = { + dependencies = ["thread_safe"]; + groups = ["default" "jekyll_plugins"]; + platforms = []; + source = { + remotes = ["http://rubygems.org"]; + sha256 = "0zwqqh6138s8b321fwvfbywxy00lw1azw4ql3zr0xh1aqxf8cnvj"; + type = "gem"; + }; + version = "1.2.9"; + }; + unf = { + dependencies = ["unf_ext"]; + groups = ["default" "jekyll_plugins"]; + platforms = []; + source = { + remotes = ["http://rubygems.org"]; + sha256 = "0bh2cf73i2ffh4fcpdn9ir4mhq8zi50ik0zqa1braahzadx536a9"; + type = "gem"; + }; + version = "0.1.4"; + }; + unf_ext = { + groups = ["default" "jekyll_plugins"]; + platforms = []; + source = { + remotes = ["http://rubygems.org"]; + sha256 = "0wc47r23h063l8ysws8sy24gzh74mks81cak3lkzlrw4qkqb3sg4"; + type = "gem"; + }; + version = "0.0.7.7"; + }; + unicode-display_width = { + groups = ["default" "jekyll_plugins"]; + platforms = []; + source = { + remotes = ["http://rubygems.org"]; + sha256 = "06i3id27s60141x6fdnjn5rar1cywdwy64ilc59cz937303q3mna"; + type = "gem"; + }; + version = "1.7.0"; + }; + zeitwerk = { + groups = ["default" "jekyll_plugins"]; + platforms = []; + source = { + remotes = ["http://rubygems.org"]; + sha256 = "1746czsjarixq0x05f7p3hpzi38ldg6wxnxxw74kbjzh1sdjgmpl"; + type = "gem"; + }; + version = "2.4.2"; + }; +} From 28cf586ff36bdae9d678c265b4e215cb0cb07a1d Mon Sep 17 00:00:00 2001 From: "Ross A. Baker" Date: Tue, 18 Jan 2022 01:17:50 -0500 Subject: [PATCH 2/4] Document the devshell --- README.md | 33 +++++++++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 7a5bb28e..e39f9846 100644 --- a/README.md +++ b/README.md @@ -26,10 +26,12 @@ You can also use `tut` in posts. See `posts/2016-09-30-subtype-typeclasses.md` f ### Previewing your changes +#### Bundler + To preview your changes, you have to install [Bundler](https://bundler.io/) first. To download and set up all necessary dependencies, run -```bash +```console $ bundle install ... lots of text ... Bundle complete! 1 Gemfile dependency, 81 gems now installed. @@ -38,12 +40,39 @@ Bundled gems are installed into `./vendor/bundle` Then, you can generate the site by running -``` +```console $ bundle exec jekyll serve -wl --baseurl '' ``` The generated site will end up in the `_site` directory. +#### Nix + +Alternatively, a fully configured Jekyll is provided through a Nix devshell: + +```console +$ nix develop github:typelevel/typelevel.github.com +🔨 Welcome to typelevel-org-shell + +[general commands] + + jekyll - a jekyll bundled with this site's dependencies + menu - prints this menu + tl-preview - preview the Jekyll site + +$ tl-preview +Configuration file: /home/you/src/typelevel.github.com/_config.yml + Source: /home/you/src/typelevel.github.com + Destination: /home/you/src/typelevel.github.com/_site + Incremental build: disabled. Enable with --incremental + Generating... + done in 3.336 seconds. + Auto-regeneration: enabled for '/home/you/src/typelevel.github.com' +LiveReload address: http://127.0.0.1:35729 + Server address: http://127.0.0.1:4000/ + Server running... press ctrl-c to stop. +``` + ## License Unless otherwise noted, all website content is licensed under a [Creative Commons Attribution 3.0 Unported License](https://creativecommons.org/licenses/by/3.0/deed.en_US). From c8f7bde50edcc20bfcbc5b26658917132313ca1c Mon Sep 17 00:00:00 2001 From: "Ross A. Baker" Date: Tue, 18 Jan 2022 10:55:42 -0500 Subject: [PATCH 3/4] Rudimentary CI --- .github/workflows/ci.yml | 23 +++++++++++++++++++++++ flake.nix | 14 ++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..1818a94f --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,23 @@ +name: nix-flake-check + +on: + pull_request: + push: + branches: + - main + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2.3.2 + + - name: "Install Nix️" + uses: cachix/install-nix-action@v16 + + + - name: "Why am I dirty?" + run: git status + + - name: "Nix Flake Check" + run: nix -L flake check diff --git a/flake.nix b/flake.nix index 4e0ddd09..7ac0e466 100644 --- a/flake.nix +++ b/flake.nix @@ -23,6 +23,20 @@ }; in { + checks = { + build-site = pkgs.stdenv.mkDerivation { + name = "build-site"; + buildInputs = [ gems pkgs.glibcLocales ]; + src = ./.; + buildPhase = '' + export LANG=en_US.UTF-8 + ${gems}/bin/jekyll build + cp -a _site $out + ''; + dontInstall = true; + }; + }; + devShell = pkgs.devshell.mkShell { name = "typelevel-org-shell"; commands = [ From 1ab699101ea13d95d2888853e112b93c23edc01e Mon Sep 17 00:00:00 2001 From: "Ross A. Baker" Date: Tue, 18 Jan 2022 11:15:28 -0500 Subject: [PATCH 4/4] Jekyll can also be an app --- README.md | 18 +++++++++++++++++- flake.nix | 5 +++++ 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index e39f9846..ff1c975e 100644 --- a/README.md +++ b/README.md @@ -48,7 +48,21 @@ The generated site will end up in the `_site` directory. #### Nix -Alternatively, a fully configured Jekyll is provided through a Nix devshell: +A fully configured Jekyll is available as a Nix app. Flakes required: + +```console +$ nix run github:typelevel/typelevel.github.com#jekyll build +warning: Git tree '/Users/ross.baker/src/typelevel.github.com' is dirty +Configuration file: /Users/ross.baker/src/typelevel.github.com/_config.yml + Source: /Users/ross.baker/src/typelevel.github.com + Destination: /Users/ross.baker/src/typelevel.github.com/_site + Incremental build: disabled. Enable with --incremental + Generating... + done in 3.635 seconds. + Auto-regeneration: disabled. Use --watch to enable. +``` + +There is also a devshell for direct invocation, and a convenient alias: ```console $ nix develop github:typelevel/typelevel.github.com @@ -73,6 +87,8 @@ LiveReload address: http://127.0.0.1:35729 Server running... press ctrl-c to stop. ``` + + ## License Unless otherwise noted, all website content is licensed under a [Creative Commons Attribution 3.0 Unported License](https://creativecommons.org/licenses/by/3.0/deed.en_US). diff --git a/flake.nix b/flake.nix index 7ac0e466..4f1b9142 100644 --- a/flake.nix +++ b/flake.nix @@ -23,6 +23,11 @@ }; in { + apps.jekyll = { + type = "app"; + program = "${gems}/bin/jekyll"; + }; + checks = { build-site = pkgs.stdenv.mkDerivation { name = "build-site";