feat: link against musl
This commit is contained in:
parent
5d08d1602a
commit
d7f74a3c21
2 changed files with 11 additions and 6 deletions
|
@ -5,8 +5,6 @@ name: default
|
|||
steps:
|
||||
- name: build
|
||||
image: "nixos/nix"
|
||||
environment:
|
||||
USER: root
|
||||
commands:
|
||||
- nix --extra-experimental-features 'nix-command flakes' build
|
||||
|
||||
|
@ -16,7 +14,11 @@ steps:
|
|||
TOKEN:
|
||||
from_secret: gitea
|
||||
commands:
|
||||
- curl --user garionion:$TOKEN --upload-file ./result/bin/tcp-proxy https://git.entr0py.de/api/packages/garionion/generic/tcp-stream-proxy/${DRONE_TAG}/tcp-proxy
|
||||
- realpath ./result/
|
||||
- export FILE=$(realpath ./result/)
|
||||
- ls -alhR $FILE
|
||||
- cp $FILE ./tcp-proxy
|
||||
- curl --user garionion:$TOKEN --upload-file ./tcp-proxy https://git.entr0py.de/api/packages/garionion/generic/tcp-stream-proxy/${DRONE_TAG}/tcp-proxy
|
||||
when:
|
||||
ref:
|
||||
- refs/tags/*
|
|
@ -1,7 +1,7 @@
|
|||
{ pkgs ? import <nixpkgs> { } }:
|
||||
with pkgs;
|
||||
let
|
||||
version = "0.0.1";
|
||||
version = "0.0.2";
|
||||
deps = [ ];
|
||||
nativeDeps = [ ];
|
||||
in
|
||||
|
@ -10,15 +10,18 @@ pkgs.buildGo119Module {
|
|||
inherit version;
|
||||
src = ./.;
|
||||
buildInputs = [
|
||||
stdenv glibc.static
|
||||
stdenv
|
||||
] ++deps;
|
||||
nativeBuildInputs = [
|
||||
musl
|
||||
] ++nativeDeps;
|
||||
tags = [ ];
|
||||
|
||||
CGO_ENABLED = 0;
|
||||
ldflags = [
|
||||
"-s" "-w"
|
||||
"-linkmode external"
|
||||
"-extldflags -static"
|
||||
"-extldflags '-static -L${musl}/lib'"
|
||||
];
|
||||
|
||||
allowGoReference = false;
|
||||
|
|
Loading…
Add table
Reference in a new issue