diff options
| author | Xe Iaso <me@xeiaso.net> | 2023-08-11 10:05:02 -0400 |
|---|---|---|
| committer | Xe Iaso <me@xeiaso.net> | 2023-08-11 10:05:02 -0400 |
| commit | c822591c5a46ad9e8f13d14ac96d2e9d26e7c828 (patch) | |
| tree | 70d5a97a396b86706c7593fe435b3d9586e6496b /cmd/within.website | |
| parent | 2b4d36a61e4ccb9815b3b42acecc1fec308a8ed0 (diff) | |
| download | x-c822591c5a46ad9e8f13d14ac96d2e9d26e7c828.tar.xz x-c822591c5a46ad9e8f13d14ac96d2e9d26e7c828.zip | |
cmd/yeet: nix tagged templates
Signed-off-by: Xe Iaso <me@xeiaso.net>
Diffstat (limited to 'cmd/within.website')
| -rw-r--r-- | cmd/within.website/yeetfile.js | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/cmd/within.website/yeetfile.js b/cmd/within.website/yeetfile.js index 394ded8..676443e 100644 --- a/cmd/within.website/yeetfile.js +++ b/cmd/within.website/yeetfile.js @@ -5,4 +5,28 @@ go.build(); slug.build("within.website", { "config.ts": "config.ts" }); -log.info(slug.push("within.website"));
\ No newline at end of file + +const url = slug.push("within.website"); +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 web $out/bin/withinwebsite + cp config.ts $out/config.ts + ''; +} +`; + +file.write("/home/cadey/code/nixos-configs/pkgs/x/withinwebsite.nix", expr); |
