feat: link against musl
Some checks reported errors
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build was killed

This commit is contained in:
Garionion 2023-01-28 20:55:52 +01:00
parent 5d08d1602a
commit 5191b3e42b
Signed by: garionion
SSH key fingerprint: SHA256:6uQQGh4dHIdYnrR+qeLdgx5SDmbttGp2HusA73563QA

View file

@ -1,7 +1,7 @@
{ pkgs ? import <nixpkgs> { } }: { pkgs ? import <nixpkgs> { } }:
with pkgs; with pkgs;
let let
version = "0.0.1"; version = "0.0.2";
deps = [ ]; deps = [ ];
nativeDeps = [ ]; nativeDeps = [ ];
in in
@ -10,15 +10,18 @@ pkgs.buildGo119Module {
inherit version; inherit version;
src = ./.; src = ./.;
buildInputs = [ buildInputs = [
stdenv glibc.static stdenv
] ++deps; ] ++deps;
nativeBuildInputs = [ nativeBuildInputs = [
musl
] ++nativeDeps; ] ++nativeDeps;
tags = [ ]; tags = [ ];
CGO_ENABLED = 0;
ldflags = [ ldflags = [
"-s" "-w" "-s" "-w"
"-linkmode external" "-linkmode external"
"-extldflags -static" "-extldflags '-static -L${musl}/lib'"
]; ];
allowGoReference = false; allowGoReference = false;