-
Notifications
You must be signed in to change notification settings - Fork 10
/
shell.nix
63 lines (56 loc) · 1.24 KB
/
shell.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
57
58
59
60
61
62
63
let
pkgs =
let
pinnedPkgs =
builtins.fetchTarball {
url = "https://github.com/nixos/nixpkgs/archive/62bbc2abc1f3ae24943a204a4095c20737189656.tar.gz";
sha256 = "0cggas9zl19pzc0ikj9zdxvygqrgmj26snnmhhj27d25kh6cksww";
};
in
import pinnedPkgs {};
postgresql =
pkgs.postgresql_12.withPackages
(
ps: [
ps.pgtap
]
);
python =
pkgs.python38.withPackages
(
ps: [
ps.pytest
ps.requests
]
);
postgrest =
pkgs.stdenv.mkDerivation {
name = "postgrest";
src = pkgs.fetchurl {
url = (
"https://github.com/PostgREST/postgrest/"
+ "releases/download/v6.0.2/postgrest-v6.0.2-linux-x64-static.tar.xz"
);
hash = "sha256:09byg9pvq5f3chh1l4rg83y9ycyk2px0086im4xjjhk98z4sd41f";
};
sourceRoot = ".";
unpackCmd = "tar xf $src";
dontConfigure = true;
dontBuild = true;
installPhase = ''
mkdir -p $out/bin
cp postgrest $out/bin
'';
};
in
pkgs.stdenv.mkDerivation {
name = "postgrest-session-example";
buildInputs = [
postgresql
postgrest
python
pkgs.entr
pkgs.curl
pkgs.bash
];
}