-
-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathshell.nix
48 lines (48 loc) · 1.44 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
with import (builtins.fetchTarball {
name = "24.05"; # May 31 2024
url = "https://github.com/NixOS/nixpkgs/archive/refs/tags/24.05.tar.gz";
sha256 = "sha256:1lr1h35prqkd1mkmzriwlpvxcb34kmhc9dnr48gkm8hh089hifmx";
}) {};
mkShell {
buildInputs =
let
ourPg = callPackage ./nix/postgresql {
inherit lib;
inherit stdenv;
inherit fetchurl;
inherit makeWrapper;
inherit callPackage;
};
pidFileName = "net_worker.pid";
supportedPgVersions = [
postgresql_12
postgresql_13
postgresql_14
postgresql_15
postgresql_16
ourPg.postgresql_17
];
pgWithExt = { pg }: pg.withPackages (p: [ (callPackage ./nix/pg_net.nix { postgresql = pg;}) ]);
extAll = map (x: callPackage ./nix/pgScript.nix { postgresql = pgWithExt { pg = x;}; inherit pidFileName;}) supportedPgVersions;
gdbScript = callPackage ./nix/gdbScript.nix {inherit pidFileName;};
nginxCustom = callPackage ./nix/nginxCustom.nix {};
nixopsScripts = callPackage ./nix/nixopsScripts.nix {};
pythonDeps = with python3Packages; [
pytest
psycopg2
sqlalchemy
];
format = callPackage ./nix/format.nix {};
in
[
extAll
pythonDeps
format.do format.doCheck
nginxCustom.nginxScript
] ++
nixopsScripts ++
lib.optional stdenv.isLinux [gdbScript];
shellHook = ''
export HISTFILE=.history
'';
}