nixbuild/package.nix
2025-07-29 04:07:08 +09:00

25 lines
390 B
Nix

{
lib,
stdenv,
buildGoModule,
pkg-config,
}:
buildGoModule {
pname = "nix-tool";
version = "0.1.4";
src = ./.;
vendorHash = "sha256-z07S4eulIujnFR5Sn2tpg8gxl+lh0zKcLQwPBg8gKsI=";
ldflags =
[ "-s -w" ]
++ lib.optionals stdenv.hostPlatform.isStatic [
"-linkmode external"
"-extldflags \"-static\""
];
nativeBuildInputs = [
pkg-config
];
}