Skip to content

Commit

Permalink
dropbear: fix static build
Browse files Browse the repository at this point in the history
Fixes #24839. Also change default sftp-server path to a more canonical.

(cherry picked from commit 3507da0)
  • Loading branch information
abbradar committed Apr 16, 2017
1 parent b647a67 commit 6334cf1
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions pkgs/tools/networking/dropbear/default.nix
@@ -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";
Expand All @@ -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}\\\"";

Expand All @@ -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";
Expand Down

0 comments on commit 6334cf1

Please sign in to comment.