small changes & code refactoring

This commit is contained in:
Johannes Schnürle 2022-06-03 19:12:57 +02:00
parent 5d7802607c
commit 0d9de871de
2 changed files with 33 additions and 34 deletions

View file

@ -9,9 +9,8 @@ stdenv.mkDerivation rec {
sha256 = "J4kHXIsl5apC3sUFSR00Jbey/iBRdysABoYMJuile5A=";
};
#required dependencies
#required & optional dependencies
reqDeps = [cairo libjpeg libpng libtool libuuid];
#optional dependencies
optDeps = [ffmpeg freerdp pango libssh2 libtelnet libvncserver libwebsockets pulseaudio openssl libvorbis libwebp];
buildInputs = reqDeps ++ optDeps;

View file

@ -30,10 +30,10 @@ in buildGoModule rec {
inherit src;
vendorSha256 = null;
subPackages = [ "cmd/server" ];
buildInputs = [pkgs.glibc.static];
buildInputs = [glibc.static];
CGO_ENABLED = true;
cflags="-I${pkgs.glibc.dev}/include";
ldflags = ["-s" "-w" ''-extldflags "-static"'' "-X github.com/woodpecker-ci/woodpecker/version.Version=${version}" "-L ${pkgs.glibc}/lib"];
cflags="-I ${glibc.dev}/include";
ldflags = ["-s" "-w" ''-extldflags "-static"'' "-X github.com/woodpecker-ci/woodpecker/version.Version=${version}" "-L ${glibc}/lib"];
postPatch = ''
cp -r ${frontend}/libexec/woodpecker-ci/deps/woodpecker-ci/dist web/dist
'';