From 93069712a99c01519788ae1015ffe2cf5c721749 Mon Sep 17 00:00:00 2001 From: Xe Iaso Date: Thu, 8 Dec 2022 20:45:45 +0000 Subject: [PATCH] rename cmd/paste to cmd/tailpaste, nix builders for commands Signed-off-by: Xe Iaso --- cmd/{paste => tailpaste}/main.go | 0 flake.nix | 12 +++++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) rename cmd/{paste => tailpaste}/main.go (100%) diff --git a/cmd/paste/main.go b/cmd/tailpaste/main.go similarity index 100% rename from cmd/paste/main.go rename to cmd/tailpaste/main.go diff --git a/flake.nix b/flake.nix index 9fe953e..46f2066 100644 --- a/flake.nix +++ b/flake.nix @@ -34,10 +34,20 @@ modules = ./gomod2nix.toml; }; + tailpaste = pkgs.runCommand "tailpaste" {} '' + mkdir -p $out/bin + ln -s ${bin}/bin/tailpaste $out/bin/tailpaste + ''; + + web = pkgs.runCommand "web" {} '' + mkdir -p $out/bin + ln -s ${bin}/bin/web $out/bin/web + ''; + docker = pkgs.dockerTools.buildLayeredImage { name = "tailpaste"; tag = "latest"; - config.Cmd = [ "${bin}/bin/web" ]; + config.Cmd = [ "${web}/bin/web" ]; contents = [ pkgs.cacert bin ]; copyToRoot = pkgs.buildEnv {