nixos/pkgs/ivabus-dev.nix

40 lines
690 B
Nix
Raw Normal View History

{ pkgs ? import <nixpkgs> { }, bundlerEnv, ... }:
let
2023-09-07 20:19:06 +03:00
version = "8a9a1364bc2111ea4889134f8ca18f10699f26ef";
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/
'';
}