about summary refs log tree commit diff stats
path: root/templates/c
diff options
context:
space:
mode:
Diffstat (limited to 'templates/c')
-rw-r--r--templates/c/flake.nix6
-rw-r--r--templates/c/makefile5
2 files changed, 7 insertions, 4 deletions
diff --git a/templates/c/flake.nix b/templates/c/flake.nix
index a211b56..fea015c 100644
--- a/templates/c/flake.nix
+++ b/templates/c/flake.nix
@@ -51,14 +51,14 @@
       treefmtEval = import ./treefmt.nix {inherit treefmt-nix pkgs;};
 
       # This version is set automatically on `cog bump --auto`;
-      version = "v0.1.0"; # GUIDING VERSION STRING
-      pname = "TODO";
+      version = "v%INIT_APPLICATION_VERSION"; # GUIDING VERSION STRING
+      pname = "%INIT_APPLICATION_NAME";
 
       build = pkgs.stdenv.mkDerivation {
         inherit pname version;
 
         src = ./.;
-        makeFlags = ["PREFIX=${placeholder "out"}"];
+        makeFlags = ["PREFIX=${placeholder "out"}" "BIN_VERSION=${version}"];
         inherit nativeBuildInputs;
       };
     in {
diff --git a/templates/c/makefile b/templates/c/makefile
index e5577c4..63ca24c 100644
--- a/templates/c/makefile
+++ b/templates/c/makefile
@@ -2,7 +2,10 @@ PREFIX    := /usr/local
 BINPREFIX := $(DESTDIR)$(PREFIX)/bin
 MANPREFIX := $(DESTDIR)$(PREFIX)/share/man/man1
 
-BIN_NAME := TODO
+BIN_NAME := %INIT_APPLICATION_NAME
+# This version is set automatically on `cog bump --auto`;
+BIN_VERSION := "v%INIT_APPLICATION_VERSION"  # GUIDING VERSION STRING
+
 # The trailing slash is important
 BUILD_DIR := ./target/
 BIN_PATH := $(BUILD_DIR)$(BIN_NAME)