Add shell for NixOS
And update Readme
This commit is contained in:
parent
2c4925f20e
commit
396d88ac45
2 changed files with 40 additions and 17 deletions
26
shell.nix
Normal file
26
shell.nix
Normal file
|
@ -0,0 +1,26 @@
|
|||
with (import <nixpkgs> {});
|
||||
let
|
||||
hugo-theme-mainroad = pkgs.stdenvNoCC.mkDerivation {
|
||||
name = "hugo-theme-mainroad";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "vimux";
|
||||
repo = "mainroad";
|
||||
rev = "af0dc2e1207f7676bc2abf878f3671ff32b02c32";
|
||||
sha256 = "172lvvh2xiam5m58criywwaq15db84zi3g5f325v5aywm8607b8v";
|
||||
};
|
||||
installPhase = ''
|
||||
cp -r $src $out
|
||||
'';
|
||||
preferLocalBuild = true;
|
||||
};
|
||||
in
|
||||
mkShell {
|
||||
buildInputs = [
|
||||
hugo
|
||||
];
|
||||
|
||||
shellHook = ''
|
||||
mkdir -p themes
|
||||
ln -snf "${hugo-theme-mainroad}/" "themes/mainroad"
|
||||
'';
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue