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,
|
{ stdenv, lib, fetchurl, glibc, zlib
|
||||||
sftpPath ? "/var/run/current-system/sw/libexec/sftp-server" }:
|
, enableStatic ? false
|
||||||
|
, sftpPath ? "/run/current-system/sw/libexec/sftp-server"
|
||||||
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "dropbear-2016.74";
|
name = "dropbear-2016.74";
|
||||||
@ -11,7 +13,7 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
dontDisableStatic = enableStatic;
|
dontDisableStatic = enableStatic;
|
||||||
|
|
||||||
configureFlags = stdenv.lib.optional enableStatic "LDFLAGS=-static";
|
configureFlags = lib.optional enableStatic "LDFLAGS=-static";
|
||||||
|
|
||||||
CFLAGS = "-DSFTPSERVER_PATH=\\\"${sftpPath}\\\"";
|
CFLAGS = "-DSFTPSERVER_PATH=\\\"${sftpPath}\\\"";
|
||||||
|
|
||||||
@ -33,7 +35,7 @@ stdenv.mkDerivation rec {
|
|||||||
./pass-path.patch
|
./pass-path.patch
|
||||||
];
|
];
|
||||||
|
|
||||||
buildInputs = [ zlib ];
|
buildInputs = [ zlib ] ++ lib.optionals enableStatic [ glibc.static zlib.static ];
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
homepage = "http://matt.ucc.asn.au/dropbear/dropbear.html";
|
homepage = "http://matt.ucc.asn.au/dropbear/dropbear.html";
|
||||||
|
Loading…
Reference in New Issue
Block a user