2011-04-25 17:03:13 +02:00
|
|
|
{ stdenv, fetchurl, zlib, enableStatic ? false,
|
|
|
|
sftpPath ? "/var/run/current-system/sw/libexec/sftp-server" }:
|
2010-03-10 00:11:12 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2015-04-17 00:57:25 +02:00
|
|
|
name = "dropbear-2015.67";
|
2010-03-10 00:11:12 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2013-06-18 22:53:19 +02:00
|
|
|
url = "http://matt.ucc.asn.au/dropbear/releases/${name}.tar.bz2";
|
2015-04-17 00:57:25 +02:00
|
|
|
sha256 = "1rf8k3v0bklp04a6x85zpa4f45ad5rfqmiv5f1wfbzaxcja0asby";
|
2010-03-10 00:11:12 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
dontDisableStatic = enableStatic;
|
|
|
|
|
|
|
|
configureFlags = stdenv.lib.optional enableStatic "LDFLAGS=-static";
|
|
|
|
|
2011-04-25 17:04:56 +02:00
|
|
|
CFLAGS = "-DSFTPSERVER_PATH=\\\"${sftpPath}\\\"";
|
2011-04-25 17:03:13 +02:00
|
|
|
|
2013-06-18 22:53:19 +02:00
|
|
|
# http://www.gnu.org/software/make/manual/html_node/Libraries_002fSearch.html
|
|
|
|
preConfigure = ''
|
2014-12-17 19:11:30 +01:00
|
|
|
makeFlags=VPATH=`cat $NIX_CC/nix-support/orig-libc`/lib
|
2013-06-18 22:53:19 +02:00
|
|
|
'';
|
|
|
|
|
|
|
|
crossAttrs = {
|
|
|
|
# This works for uclibc, at least.
|
|
|
|
preConfigure = ''
|
2014-12-17 19:11:30 +01:00
|
|
|
makeFlags=VPATH=`cat ${stdenv.ccCross}/nix-support/orig-libc`/lib
|
2013-06-18 22:53:19 +02:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
2011-04-25 16:40:10 +02:00
|
|
|
patches = [
|
|
|
|
# Allow sessions to inherit the PATH from the parent dropbear.
|
|
|
|
# Otherwise they only get the usual /bin:/usr/bin kind of PATH
|
|
|
|
./pass-path.patch
|
|
|
|
];
|
|
|
|
|
2010-03-10 00:11:12 +01:00
|
|
|
buildInputs = [ zlib ];
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = http://matt.ucc.asn.au/dropbear/dropbear.html;
|
|
|
|
description = "An small footprint implementation of the SSH 2 protocol";
|
2014-06-19 06:19:00 +02:00
|
|
|
license = stdenv.lib.licenses.mit;
|
2010-03-10 00:11:12 +01:00
|
|
|
};
|
|
|
|
}
|