mirror of
https://github.com/ivabus/nixos
synced 2024-11-10 02:25:18 +03:00
40 lines
690 B
Nix
40 lines
690 B
Nix
{ pkgs ? import <nixpkgs> { }, bundlerEnv, ... }:
|
|
let
|
|
version = "a7870f63495e226f5940a0e624d65c8d542f070e";
|
|
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/
|
|
'';
|
|
}
|