forked from diamondburned/go-workshop
-
Notifications
You must be signed in to change notification settings - Fork 0
/
shell.nix
54 lines (49 loc) · 1.17 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
let sources = import ./nix/sources.nix;
in
{ pkgs ? import sources.nixpkgs {} }:
let
present = pkgs.buildGoModule {
name = "present";
src = pkgs.runCommand "present-src" {
src = pkgs.fetchFromGitHub {
owner = "golang";
repo = "tools";
rev = "v0.8.0";
sha256 = "1lfz2wwd7jjzr3b3q7z91as22jic9rmqfw9wicj6bhr19swr5jvb";
};
} ''
mkdir -p $out
cp -r $src/* $out
chmod -R +w $out
cp -f ${./static}/* $out/cmd/present/static
cp -f ${./templates}/* $out/cmd/present/templates
'';
vendorSha256 = "1289wjw0nxwwycmglvmds9djphy8gkamccb14sqzmf698dm83sdj";
subPackages = [ "cmd/present" ];
};
httpie = pkgs.buildGoModule {
name = "httpie";
src = pkgs.fetchFromGitHub {
owner = "nojima";
repo = "httpie-go";
rev = "v0.7.0";
sha256 = "0p67wmfvdfyl28i7sbwmnhr869077l48a1v9icmn05nkim59gs9i";
};
vendorSha256 = "1ib58bs47jjyj5wykcn4f3ks0jmffpb7qnk74d99qx6pli9p6y68";
postInstall = ''mv $out/bin/ht $out/bin/httpie'';
};
in
pkgs.mkShell {
buildInputs = with pkgs; [
present
httpie
niv
go
deno
nodePackages.prettier
(pkgs.writeShellScriptBin "deno-run" "deno run -A $@")
];
passthru = {
inherit present httpie;
};
}