From e78d4b0930625e90b5874291a3b7c1835bd505ff Mon Sep 17 00:00:00 2001
From: Volker Schukai <volker.schukai@schukai.com>
Date: Sat, 5 Aug 2023 22:40:47 +0200
Subject: [PATCH] build: Improve version information and build process for
 `docman` package

- Include version information in the `docman` package
- Add version and build information to `ldflags` option in the `docman` package
- Update `vendorSha256` in the `docman` package
---
 flake.nix | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/flake.nix b/flake.nix
index 77b7358..1b56adc 100644
--- a/flake.nix
+++ b/flake.nix
@@ -49,6 +49,7 @@
             # In 'nix develop', we don't need a copy of the source tree
             # in the Nix store.
             src = ././source;
+            version = "${version}";
 
             # This hash locks the dependencies of this package. It is
             # necessary because of how Go requires network access to resolve
@@ -64,8 +65,7 @@
             vendorSha256 = "sha256-81IBG8H1jsYKD+tmFeCpAWFdz6cuQDt9r+FV56xboBU=";
             
             ldflags = [
-                 "-X \"release.version=${version}\""
-                 "-X \"release.build=${build}\""
+                 "-X 'release.version=${version}' -X 'release.build=${build}'"
                       ];
                       
             buildInputs = [ versionTool.defaultPackage.${system} ]; 
-- 
GitLab