Set -ldflags for spaceapid to set version string

Co-authored-by: June <june@jsts.xyz>
This commit is contained in:
Bendodroid 2024-01-16 02:46:09 +01:00 committed by June
parent b5ec5fd763
commit 7cef911b61

View file

@ -6,11 +6,15 @@ let
ref = "main";
rev = "bbeb0d0e2b4538faed275b9891fb55149bc3a2f8";
};
spaceapid = pkgs.buildGoModule {
spaceapid = pkgs.buildGoModule rec {
pname = "spaceapid";
version = "main";
src = spaceapidSrc;
ldflags = [
"-X main.version=${version}-${spaceapidSrc.rev}"
];
# Since spaceapid doesn't have any dependencies, we can set this to null and
# use the nonexistend vendored dependencies.