forked from learningequality/studio
-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
56 lines (50 loc) · 1.44 KB
/
flake.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
47
48
49
50
51
52
53
54
55
56
{
description = "A very basic flake";
inputs = {
nixpkgs.url = "nixpkgs/release-20.09";
nixpkgsOld.url = "nixpkgs/release-19.09";
# nixpkgsOld.flake = false;
};
outputs = { self, nixpkgs, nixpkgsOld }:
let
overlay = self: super: {
# this overlay is to replace yarn's dep from the latest nodejs, to nodejs 10.
yarn = with self;
super.yarn.overrideAttrs (old: { buildInputs = [ nodejs-10_x ]; });
};
in {
old = nixpkgsOld;
devShell.x86_64-linux = let
npkgsOld = import nixpkgsOld { system = "x86_64-linux"; };
npkgs = import nixpkgs {
system = "x86_64-linux";
overlays = [ overlay ];
};
buildTimePkgs = with npkgs; [
yarn
nodejs-10_x
python36
python36Packages.venvShellHook
python36Packages.wheel
postgresql96 # for building psycopg2
];
runTimePkgs = with npkgs; [ minio postgresql96 redis ];
cloudPkgs = with npkgs; [
google-cloud-sdk
kubectl
kubernetes-helm
];
localCloudPkgs = with npkgs; [
minikube
jq
];
in with npkgs;
mkShell {
venvDir = "./.venv";
name = "studio-shell";
src = self;
buildInputs = buildTimePkgs ++ runTimePkgs ++ cloudPkgs ++ localCloudPkgs;
LD_LIBRARY_PATH = "${stdenv.cc.cc.lib}/lib";
};
};
}