nixos/pkgs/ivabus-dev.nix
Ivan Bushchik 8f36adac17
Bump ivabus-dev to ee24ef2 + add commit_id
Signed-off-by: Ivan Bushchik <ivabus@ivabus.dev>
2024-01-08 19:47:14 +03:00

41 lines
756 B
Nix

{ pkgs ? import <nixpkgs> { }, bundlerEnv ? pkgs.bundlerEnv, ... }:
let
version = "ee24ef24ce65367f831c10375613eff3f8cf5f09";
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 = ''
echo "commit_id: ${version}" >> _config.yml
bundle exec jekyll build
'';
installPhase = ''
mkdir -p $out
cp -r _site/* $out/
'';
}