forked from rahulgopinath/rahulgopinath.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
/
default.nix
executable file
·43 lines (35 loc) · 908 Bytes
/
default.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/usr/bin/env nix-shell
#! nix-shell --pure --run "env i_fcolor=red zsh" .
let
sysPkg = import <nixpkgs> { };
pinnedPkg = sysPkg.fetchFromGitHub {
owner = "NixOS";
repo = "nixpkgs";
rev = "16.09";
sha256 = "1cx5cfsp4iiwq8921c15chn1mhjgzydvhdcmrvjmqzinxyz71bzh";
};
pkgs = import pinnedPkg {};
in with pkgs; stdenv.mkDerivation rec {
name = "env";
env = buildEnv {
inherit name;
paths = buildInputs;
};
jekyll_env = bundlerEnv rec {
name = "jekyll_env";
ruby = ruby_2_2;
gemfile = ./Gemfile;
lockfile = ./Gemfile.lock;
gemset = ./gemset.nix;
};
builder = builtins.toFile "builder.sh" "source $stdenv/setup; ln -s $env $out";
buildInputs = [
ruby curl gitFull vim less jekyll_env
ghostscript
];
shellHook = ''
export PS1="\[\e[33m\]|\[\e[m\] "
TERM=xterm
exec ${jekyll_env}/bin/jekyll serve --watch
'';
}