Skip to content

Commit

Permalink
nix: make the project buildable
Browse files Browse the repository at this point in the history
Previously default.nix could only be used for nix-shell invocation. Now
the deriation can also be built using `nix-build`. The build calls
./test.sh during the checkPhase.
  • Loading branch information
Tobias Pflug committed Nov 1, 2017
1 parent 44e8f54 commit 414c618
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions default.nix
Expand Up @@ -9,9 +9,24 @@ let jekyll_env = bundlerEnv rec {
};
in
stdenv.mkDerivation rec {
src = lib.cleanSource ./.;
name = "jekyll_env";

buildInputs = [ jekyll_env ];

doCheck = true;

checkPhase = ''
./test.sh
'';

buildPhase = "true";

installPhase = ''
mkdir $out
jekyll build --destination $out
'';

shellHook = ''
jekyll serve --watch
'';
Expand Down

0 comments on commit 414c618

Please sign in to comment.