2024-01-08 16:56:32 +03:00
|
|
|
{ pkgs ? import <nixpkgs> { }, bundlerEnv ? pkgs.bundlerEnv, ... }:
|
2023-09-04 21:54:55 +03:00
|
|
|
let
|
2024-04-21 10:40:54 +03:00
|
|
|
version = "082594252a1542516effc398aa45476be03aa6b3";
|
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 = ''
|
2024-01-08 16:56:32 +03:00
|
|
|
echo "commit_id: ${version}" >> _config.yml
|
2023-09-04 21:54:55 +03:00
|
|
|
bundle exec jekyll build
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out
|
|
|
|
cp -r _site/* $out/
|
|
|
|
'';
|
|
|
|
}
|