-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathshell.nix
105 lines (89 loc) · 2.62 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
{ pkgs ? import <nixpkgs> {} }:
let goapi-gen = pkgs.buildGoModule {
name = "goapi-gen";
version = "081d60b";
src = pkgs.fetchFromGitHub {
owner = "discord-gophers";
repo = "goapi-gen";
rev = "4be5ffd30c4c1fb32bfaeff8ab8923a95a91120f";
sha256 = "0kcr1rfgdhlsgbjdw23v1zx13w2gcd2zvmgfamwgk9z1p6if4y4c";
};
# src = pkgs.fetchgit {
# url = "https://github.com/diamondburned/goapi-gen";
# rev = "49e462fafc1d82572218bdec3917d50c98ebed2e";
# sha256 = "0jgvjf51bzfm620gy6r9fxnyq9yi54vvif8jzfrrn4rj13zqvhc3";
# };
patches =
with builtins;
let commit = user: c: fetchurl "https://github.com/${user}/goapi-gen/commit/${c}.patch";
pr = user: c: fetchurl "https://github.com/${user}/goapi-gen/pull/${toString c}.patch";
in [
(pr "discord-gophers" 80)
(pr "discord-gophers" 82)
(pr "discord-gophers" 83)
(pr "discord-gophers" 85)
];
vendorSha256 = "1dknfg3w97421c8dnld5kvx0psicvmxr7wzkhqipaxplcg3cqrr9";
};
sqlc = pkgs.buildGoModule {
name = "sqlc";
version = "1.12.0";
src = pkgs.fetchFromGitHub {
owner = "kyleconroy";
repo = "sqlc";
rev = "45bd150";
sha256 = "1np2xd9q0aaqfbcv3zcxjrfd1im9xr22g2jz5whywdr1m67a8lv2";
};
proxyVendor = true;
vendorSha256 = "0fh6y93nwzk16sf9dnc0iqpvjh86mv2ypa7cv7gaz0jrs1didw68";
};
moq = pkgs.buildGoModule {
name = "moq";
version = "0.2.6";
src = pkgs.fetchFromGitHub {
owner = "matryer";
repo = "moq";
rev = "5d3d962614e152b11aa8080d6de7b12445bf09a1";
sha256 = "0zsr466iaxzb24kjq82g00765hhw0lgikdva2nkxhrrgijczp8hk";
};
vendorSha256 = "02kb11pjcrjjsqaafj07fmvzzk03mmy74kmh004rd3ddkkdbjdsx";
subPackages = [ "." ];
};
goose = pkgs.buildGoModule {
name = "goose";
version = "3.5.3";
src = pkgs.fetchFromGitHub {
owner = "pressly";
repo = "goose";
rev = "5f1f43cfb2ba11d901b1ea2f28c88bf2577985cb";
sha256 = "13hcbn4v78142brqjcjg1q297p4hs28n25y1fkb9i25l5k2bwk7f";
};
vendorSha256 = "1yng6dlmr4j8cq2f43jg5nvcaaik4n51y79p5zmqwdzzmpl8jgrv";
subPackages = [ "cmd/goose" ];
};
nixos-shell = pkgs.buildGoModule {
name = "nixos-shell";
src = pkgs.fetchFromGitHub {
owner = "diamondburned";
repo = "nixos-shell";
rev = "e238cb522f7168fbc997101d00e6e2cc0d3e2ff9";
sha256 = "02wqbfmc0c7q3896x6k2hxwcf1x202qfw0almb6rchlh7cqkva0w";
};
vendorSha256 = "0gjj1zn29vyx704y91g77zrs770y2rakksnn9dhg8r6na94njh5a";
};
in pkgs.mkShell {
buildInputs = with pkgs; [
go_1_18
gopls
goapi-gen
goose
sqlc
pgformatter
moq
nixos-shell # for local PostgreSQL server
nodejs
];
shellHook = ''
PATH="$PWD/frontend/node_modules/.bin:$PATH"
'';
}