create src directory with all jekyll source code

create nix derivation to generate jekyll static content
This commit is contained in:
Pim Kunis 2024-04-21 11:04:46 +02:00
parent 0928a50b33
commit dc7fefbafd
80 changed files with 49 additions and 5 deletions

View file

@ -1 +0,0 @@
`jekyll serve`

View file

@ -16,9 +16,52 @@
forEachSystem = nixpkgs.lib.genAttrs (import systems);
in
{
packages = forEachSystem (system: {
devenv-up = self.devShells.${system}.default.config.procfileScript;
});
packages = forEachSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
in
{
images.hello = pkgs.dockerTools.buildImage {
name = "hello-docker";
config = {
Cmd = [ "${pkgs.hello}/bin/hello" ];
};
};
website = pkgs.stdenv.mkDerivation
(
let
# TODO: DRY
gems = pkgs.bundlerEnv {
name = "static";
gemdir = ./src;
};
in
{
version = "0.0.1";
name = "website";
src = ./src;
buildInputs = [
gems
gems.wrappedRuby
];
sourceRoot = "src";
buildPhase = ''
bundle exec jekyll build
'';
installPhase = ''
mkdir -p $out
cp -r _site/* $out/
'';
}
);
}
);
devShells = forEachSystem
(system:
@ -26,7 +69,7 @@
pkgs = nixpkgs.legacyPackages.${system};
gems = pkgs.bundlerEnv {
name = "static";
gemdir = ./.;
gemdir = ./src;
};
in
{

1
result Symbolic link
View file

@ -0,0 +1 @@
/nix/store/7nwlgm56gharaymrwn8k4b2pld89098g-website

View file

View file

@ -64,6 +64,7 @@ exclude:
- lighthouse.png
- klise-*.gem
- klise.gemspec
- gemset.nix
plugins:
- jekyll-feed

View file

Before

Width:  |  Height:  |  Size: 202 KiB

After

Width:  |  Height:  |  Size: 202 KiB

View file

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 36 KiB

View file

Before

Width:  |  Height:  |  Size: 56 KiB

After

Width:  |  Height:  |  Size: 56 KiB

View file

Before

Width:  |  Height:  |  Size: 490 KiB

After

Width:  |  Height:  |  Size: 490 KiB

View file

Before

Width:  |  Height:  |  Size: 31 KiB

After

Width:  |  Height:  |  Size: 31 KiB

View file

Before

Width:  |  Height:  |  Size: 42 KiB

After

Width:  |  Height:  |  Size: 42 KiB

View file

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

View file

Before

Width:  |  Height:  |  Size: 75 KiB

After

Width:  |  Height:  |  Size: 75 KiB

View file

Before

Width:  |  Height:  |  Size: 217 KiB

After

Width:  |  Height:  |  Size: 217 KiB

View file

Before

Width:  |  Height:  |  Size: 415 KiB

After

Width:  |  Height:  |  Size: 415 KiB

View file

Before

Width:  |  Height:  |  Size: 67 KiB

After

Width:  |  Height:  |  Size: 67 KiB

View file

Before

Width:  |  Height:  |  Size: 940 B

After

Width:  |  Height:  |  Size: 940 B

View file

Before

Width:  |  Height:  |  Size: 3 KiB

After

Width:  |  Height:  |  Size: 3 KiB

View file

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

View file

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 34 KiB

View file

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View file

Before

Width:  |  Height:  |  Size: 63 KiB

After

Width:  |  Height:  |  Size: 63 KiB