From 63714311997cd3d6bcd368577a113f2ddd5db65a Mon Sep 17 00:00:00 2001 From: Sebastian Rieger Date: Sun, 4 May 2025 12:33:28 +0200 Subject: [PATCH] containerlab: fix version definition in LDFLAGS Without the change, containerlab will always report the installed version to be 0.0.0, as wrong LDFLAGS were used in the package. The correct LDFLAGS can be seen in containerlab Makefile: https://github.com/srl-labs/containerlab/blob/main/Makefile If the version cannot be detected, e.g., containerlabs vscode extension will not work. --- pkgs/by-name/co/containerlab/package.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/co/containerlab/package.nix b/pkgs/by-name/co/containerlab/package.nix index 8e80f0f9ed14..92a028ff4b49 100644 --- a/pkgs/by-name/co/containerlab/package.nix +++ b/pkgs/by-name/co/containerlab/package.nix @@ -23,9 +23,9 @@ buildGoModule rec { ldflags = [ "-s" "-w" - "-X github.com/srl-labs/containerlab/cmd.version=${version}" - "-X github.com/srl-labs/containerlab/cmd.commit=${src.rev}" - "-X github.com/srl-labs/containerlab/cmd.date=1970-01-01T00:00:00Z" + "-X github.com/srl-labs/containerlab/cmd/version.Version=${version}" + "-X github.com/srl-labs/containerlab/cmd/version.commit=${src.rev}" + "-X github.com/srl-labs/containerlab/cmd/version.date=1970-01-01T00:00:00Z" ]; preCheck = ''