Skip to content
Snippets Groups Projects
Verified Commit 90566cc4 authored by Volker Schukai's avatar Volker Schukai :alien:
Browse files

build: Refactor build process to include version and build information

- Updated build process to include version and build information using `versionTool`
- Improved security by updating `vendorSha256` with a new value
- Added code to build `versionTool` for the current system
- Enhanced functionality by fetching the version and build information using `versionTool`
parent b794bbb6
No related branches found
No related tags found
No related merge requests found
......@@ -32,12 +32,6 @@
# # You'll need to provide the correct hash here.
# sha256 = "sha256-jzixQKFFW4oxO0S4GYqbkFCXzhBd6com6Z9+MtVKakU=";
# };
versionToolPackage = versionTool.defaultPackage.${system};
versionAndBuild = pkgs.runCommand "get-version-and-build" {} ''
${versionToolPackage}/bin/version print --git > $out.version
${versionToolPackage}/bin/version build > $out.build
'';
in
......@@ -47,8 +41,20 @@
packages = forAllSystems (system:
let
pkgs = nixpkgsFor.${system};
# Build the versionTool for the current system.
versionToolPackage = versionTool.defaultPackage.${system};
versionAndBuild = pkgs.runCommand "get-version-and-build" {} ''
${versionToolPackage}/bin/version print --git > $out.version
${versionToolPackage}/bin/version build > $out.build
'';
version = builtins.readFile "${versionAndBuild}.version";
build = builtins.readFile "${versionAndBuild}.build";
in
{
docman = pkgs.buildGoModule {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment