2023-09-06 16:10:11 +03:00
|
|
|
{ pkgs ? import <nixpkgs> { }, bundlerEnv, ... }:
|
2023-09-04 21:54:55 +03:00
|
|
|
let
|
2023-10-22 17:28:41 +03:00
|
|
|
version = "fe2e4ae52cde423ccc684325d16c3428154f26da";
|
2023-09-04 21:54:55 +03:00
|
|
|
repo = builtins.fetchGit {
|
|
|
|
url = "https://github.com/ivabus/website";
|
|
|
|
rev = version;
|
|
|
|
};
|
|
|
|
|
|
|
|
gems = bundlerEnv {
|
|
|
|
name = "ivabus-dev";
|
|
|
|
ruby = pkgs.ruby;
|
|
|
|
|
|
|
|
gemdir = "${repo}/.";
|
|
|
|
};
|
|
|
|
in pkgs.stdenv.mkDerivation {
|
|
|
|
inherit version;
|
|
|
|
name = "ivabus-dev";
|
|
|
|
src = repo;
|
|
|
|
|
|
|
|
buildInputs = with pkgs; [
|
|
|
|
gems
|
|
|
|
# nokogiri dependencies
|
|
|
|
zlib
|
|
|
|
libiconv
|
|
|
|
libxml2
|
|
|
|
libxslt
|
|
|
|
# jekyll wants a JS runtime
|
|
|
|
nodejs-slim
|
|
|
|
];
|
|
|
|
|
|
|
|
buildPhase = ''
|
|
|
|
bundle exec jekyll build
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out
|
|
|
|
cp -r _site/* $out/
|
|
|
|
'';
|
|
|
|
}
|