nixos/pkgs/ivabus-dev.nix
Ivan Bushchik b6fcfa1ab3
Update ivabus.dev to 35d9776
Signed-off-by: Ivan Bushchik <ivabus@ivabus.dev>
2023-10-22 17:21:40 +03:00

40 lines
690 B
Nix

{ pkgs ? import <nixpkgs> { }, bundlerEnv, ... }:
let
version = "35d97766e4057de7f0e864ea88000f9cf4549188";
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/
'';
}