forked from plusjade/jekyll-bootstrap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
default.nix
46 lines (40 loc) · 934 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
44
45
46
let
pkgs = import <nixpkgs> {};
stdenv = pkgs.stdenv;
ruby = pkgs.ruby_2_7;
rubygems = (pkgs.rubygems.override { ruby = ruby; });
in stdenv.mkDerivation rec {
name = "rails-nix";
buildInputs = with pkgs; [
ruby
bundler
libxml2
libxslt
nodejs-18_x
zlib
bzip2
openssl
pkgconfig
which
less
vim
gnumake
git
curl
];
shellHook = with pkgs; ''
## create the gems repo
mkdir -p .nix-gems
## environment variables
export PKG_CONFIG_PATH=${libxml2}/lib/pkgconfig:${libxslt}/lib/pkgconfig:${zlib}/lib/pkgconfig
export GEM_HOME=$PWD/.nix-gems
export GEM_PATH=$GEM_HOME
export PATH=$GEM_HOME/bin:$PATH
export PS1="\[\033[1;32m\][nix-shell:\w]\n[★]\[\033[0m\] "
export LANG=en_US.UTF-8
export LANGUAGE=en_US.UTF-8
export LC_ALL=en_US.UTF-8
## change CWD; use with the impure shell
[[ -n "$D" ]] && cd $D
'';
}