From 3507da085f6373302385c0c44f7370d095ab5d83 Mon Sep 17 00:00:00 2001 From: Nikolay Amiantov Date: Fri, 14 Apr 2017 13:59:28 +0300 Subject: [PATCH] dropbear: fix static build Fixes #24839. Also change default sftp-server path to a more canonical. --- pkgs/tools/networking/dropbear/default.nix | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/pkgs/tools/networking/dropbear/default.nix b/pkgs/tools/networking/dropbear/default.nix index b1f726ad27d6..aeace91df191 100644 --- a/pkgs/tools/networking/dropbear/default.nix +++ b/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"; @@ -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";