dropbear: fix static build
Fixes #24839. Also change default sftp-server path to a more canonical.
This commit is contained in:
parent
c2da0fb22c
commit
3507da085f
@ -1,5 +1,7 @@
|
||||
{ stdenv, fetchurl, zlib, enableStatic ? false,
|
||||
sftpPath ? "/var/run/current-system/sw/libexec/sftp-server" }:
|
||||
{ stdenv, lib, fetchurl, glibc, zlib
|
||||
, enableStatic ? false
|
||||
, sftpPath ? "/run/current-system/sw/libexec/sftp-server"
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "dropbear-2016.74";
|
||||
@ -11,7 +13,7 @@ stdenv.mkDerivation rec {
|
||||
|
||||
dontDisableStatic = enableStatic;
|
||||
|
||||
configureFlags = stdenv.lib.optional enableStatic "LDFLAGS=-static";
|
||||
configureFlags = lib.optional enableStatic "LDFLAGS=-static";
|
||||
|
||||
CFLAGS = "-DSFTPSERVER_PATH=\\\"${sftpPath}\\\"";
|
||||
|
||||
@ -33,7 +35,7 @@ stdenv.mkDerivation rec {
|
||||
./pass-path.patch
|
||||
];
|
||||
|
||||
buildInputs = [ zlib ];
|
||||
buildInputs = [ zlib ] ++ lib.optionals enableStatic [ glibc.static zlib.static ];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
homepage = "http://matt.ucc.asn.au/dropbear/dropbear.html";
|
||||
|
Loading…
Reference in New Issue
Block a user