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