blob: 1abdc68436ea77095631bb49f64509698be20aad (
plain)
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
|
yeet.setenv("GOOS", "linux");
yeet.setenv("GOARCH", "amd64");
yeet.setenv("CGO_ENABLED", "0");
go.build();
const fname = slug.build("todayinmarch2020");
const url = slug.push(fname);
const hash = nix.hashURL(url);
const expr = nix.expr`{ stdenv }:
stdenv.mkDerivation {
name = "todayinmarch2020";
src = builtins.fetchurl {
url = ${url};
sha256 = ${hash};
};
phases = "installPhase";
installPhase = ''
tar xf $src
mkdir -p $out/bin
cp bin/main $out/bin/todayinmarch2020
'';
}
`;
file.write("/home/cadey/code/nixos-configs/pkgs/x/todayinmarch2020.nix", expr);
|