parent
03a35dcc38
commit
f1998c321a
@ -1,21 +0,0 @@ |
||||
result: |
||||
nix-build -A build
|
||||
|
||||
install: result |
||||
nix-env -i "$$(readlink result)"
|
||||
|
||||
clean: |
||||
rm -f result
|
||||
rm -rf _site
|
||||
|
||||
serve: |
||||
nix-shell -A serve
|
||||
|
||||
shell: |
||||
nix-shell -A shell
|
||||
|
||||
lock: |
||||
nix-shell -p bundler -p bundix --run 'bundler lock; bundix; rm -rf .bundle vendor'
|
||||
|
||||
update: |
||||
nix-shell -p bundler -p bundix --run 'bundler update; bundler lock; bundix; rm -rf .bundle vendor'
|
@ -1,6 +0,0 @@ |
||||
source $stdenv/setup |
||||
set -e |
||||
|
||||
d="$out/var/www/blog.mediocregopher.com" |
||||
mkdir -p "$d" |
||||
$jekyll_env/bin/jekyll build -s "$src" -d "$d" |
@ -1,39 +0,0 @@ |
||||
{ |
||||
pkgs ? import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/cd63096d6d887d689543a0b97743d28995bc9bc3.tar.gz") {}, |
||||
system ? builtins.currentSystem, |
||||
}: |
||||
|
||||
let |
||||
jekyll_env = pkgs.bundlerEnv { |
||||
name = "jekyll_env"; |
||||
ruby = pkgs.ruby; |
||||
gemdir = ./.; |
||||
}; |
||||
|
||||
shell_inputs = [ jekyll_env pkgs.imagemagick pkgs.exiftool ]; |
||||
in |
||||
{ |
||||
build = derivation { |
||||
inherit jekyll_env system; |
||||
|
||||
name = "mediocre-blog"; |
||||
builder = "${pkgs.bash}/bin/bash"; |
||||
args = [ ./build.sh ]; |
||||
|
||||
src = ./src; |
||||
stdenv = pkgs.stdenv; |
||||
}; |
||||
|
||||
serve = pkgs.stdenv.mkDerivation { |
||||
name = "mediocre-blog-shell-serve"; |
||||
buildInputs = shell_inputs; |
||||
shellHook = '' |
||||
exec ${jekyll_env}/bin/jekyll serve -s ./src -d ./_site -w -I -D -H 0.0.0.0 |
||||
''; |
||||
}; |
||||
|
||||
shell = pkgs.stdenv.mkDerivation { |
||||
name = "mediocre-blog-shell"; |
||||
buildInputs = shell_inputs; |
||||
}; |
||||
} |
@ -0,0 +1,9 @@ |
||||
{ |
||||
pkgs ? import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/d50923ab2d308a1ddb21594ba6ae064cab65d8ae.tar.gz") {}, |
||||
system ? builtins.currentSystem, |
||||
}: |
||||
{ |
||||
pkgs = pkgs; |
||||
system = system; |
||||
} |
||||
|
@ -0,0 +1,6 @@ |
||||
.bundle |
||||
.sass-cache |
||||
*.gem |
||||
.jekyll-metadata |
||||
_site |
||||
result |
@ -0,0 +1,18 @@ |
||||
result: |
||||
nix-build -A build
|
||||
|
||||
clean: |
||||
rm -f result
|
||||
rm -rf _site
|
||||
|
||||
dev: |
||||
nix-shell -A dev
|
||||
|
||||
shell: |
||||
nix-shell -A shell
|
||||
|
||||
lock: |
||||
nix-shell -A depShell --run 'bundler lock; bundix; rm -rf .bundle vendor'
|
||||
|
||||
update: |
||||
nix-shell -A depShell --run 'bundler update; bundler lock; bundix; rm -rf .bundle vendor'
|
@ -0,0 +1,53 @@ |
||||
let |
||||
utils = (import ../nix) {}; |
||||
pkgs = utils.pkgs; |
||||
system = utils.system; |
||||
|
||||
jekyll_env = pkgs.bundlerEnv { |
||||
name = "jekyll_env"; |
||||
ruby = pkgs.ruby; |
||||
gemdir = ./.; |
||||
}; |
||||
|
||||
dep_inputs = [ pkgs.imagemagick pkgs.exiftool pkgs.bundler pkgs.bundix ]; |
||||
all_inputs = [ jekyll_env ] ++ dep_inputs; |
||||
in |
||||
{ |
||||
build = derivation { |
||||
inherit jekyll_env system; |
||||
|
||||
name = "mediocre-blog-static"; |
||||
builder = "${pkgs.bash}/bin/bash"; |
||||
args = [ |
||||
(pkgs.writeTextFile { |
||||
name = "mediocre-blog-static-buildsh"; |
||||
text = '' |
||||
source ${pkgs.stdenv}/setup |
||||
set -e |
||||
|
||||
mkdir -p "$out" |
||||
$jekyll_env/bin/jekyll build -s "${./src}" -d "$out" |
||||
''; |
||||
executable = true; |
||||
}) |
||||
]; |
||||
}; |
||||
|
||||
dev = pkgs.stdenv.mkDerivation { |
||||
name = "mediocre-blog-static-dev"; |
||||
buildInputs = all_inputs; |
||||
shellHook = '' |
||||
exec ${jekyll_env}/bin/jekyll serve -s ./src -d ./_site -w -I -D -H 0.0.0.0 |
||||
''; |
||||
}; |
||||
|
||||
depShell = pkgs.stdenv.mkDerivation { |
||||
name = "mediocre-blog-static-dep-shell"; |
||||
buildInputs = dep_inputs; |
||||
}; |
||||
|
||||
shell = pkgs.stdenv.mkDerivation { |
||||
name = "mediocre-blog-static-shell"; |
||||
buildInputs = all_inputs; |
||||
}; |
||||
} |
Before Width: | Height: | Size: 9.1 KiB After Width: | Height: | Size: 9.1 KiB |
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue