mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-25 20:34:52 +03:00
Add `tcp-wrapper'.
svn path=/nixpkgs/trunk/; revision=11136
This commit is contained in:
parent
8a72053717
commit
ac2f2f6cc5
34
pkgs/os-specific/linux/tcp-wrapper/builder.sh
Normal file
34
pkgs/os-specific/linux/tcp-wrapper/builder.sh
Normal file
@ -0,0 +1,34 @@
|
||||
source "$stdenv/setup" || exit 1
|
||||
|
||||
# Unpack
|
||||
unpackPhase && \
|
||||
cd "$sourceRoot/upstream/tarballs" && \
|
||||
tar xzvf * && \
|
||||
cd tcp_wrappers_7.6 && \
|
||||
\
|
||||
# Patch
|
||||
substituteInPlace "Makefile" --replace \
|
||||
"REAL_DAEMON_DIR=/usr/sbin" "REAL_DAEMON_DIR=$out/sbin" \
|
||||
--replace "/tmp" '$$TMPDIR' && \
|
||||
substituteInPlace "scaffold.c" --replace \
|
||||
'extern char *malloc();' " " && \
|
||||
substituteInPlace "environ.c" --replace \
|
||||
'extern char *malloc();' " " && \
|
||||
\
|
||||
# The `linux' target doesn't work on Linux...
|
||||
echo building... && \
|
||||
make REAL_DAEMON_DIR="$out/sbin" freebsd && \
|
||||
\
|
||||
# Install
|
||||
ensureDir "$out/sbin" && \
|
||||
cp safe_finger tcpd tcpdchk tcpdmatch try-from "$out/sbin" && \
|
||||
\
|
||||
ensureDir "$out/lib" && \
|
||||
cp lib*.a "$out/lib" && \
|
||||
\
|
||||
ensureDir "$out/man" && \
|
||||
for i in 3 5 8; \
|
||||
do \
|
||||
ensureDir "$out/man/man$i" && \
|
||||
cp *.$i "$out/man/man$i" ; \
|
||||
done \
|
@ -1,26 +1,14 @@
|
||||
args: with args;
|
||||
{ fetchurl, stdenv }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "tcp-wrappers-7.6";
|
||||
|
||||
src = fetchurl {
|
||||
url = http://ftp.debian.org/debian/pool/main/t/tcp-wrappers/tcp-wrappers_7.6.dbs.orig.tar.gz;
|
||||
url = mirror://debian/pool/main/t/tcp-wrappers/tcp-wrappers_7.6.dbs.orig.tar.gz;
|
||||
sha256 = "0k68ziinx6biwar5lcb9jvv0rp6b3vmj6861n75bvrz4w1piwkdp";
|
||||
};
|
||||
|
||||
# we need to set REAL_DAEMON_DIR somehow. I'm getting compilation errors
|
||||
# I've managed to compile tcpd manually using
|
||||
# make CFLAGS='-DSYS_ERRLIST_DEFINED=1 -Dvsyslog=1' tcpd
|
||||
# see Makefile target all for details
|
||||
|
||||
postUnpack="cd upstream/tarballs; tar xfz *; cd tcp_wrappers_7.6;
|
||||
sed -i -e 's=#REAL_DAEMON_DIR=/usr/sbin=REAL_DAEMON_DIR=/usr/sbin=' Makefile
|
||||
";
|
||||
|
||||
buildPhase="
|
||||
make CFLAGS='-DSYS_ERRLIST_DEFINED=1 -Dvsyslog=1' tcpd
|
||||
"
|
||||
|
||||
buildInputs = [kernelHeaders gnused];
|
||||
builder = ./builder.sh;
|
||||
|
||||
# meta = ...
|
||||
}
|
||||
|
@ -4372,12 +4372,10 @@ rec {
|
||||
withoutInitTools = true;
|
||||
};
|
||||
|
||||
/*
|
||||
# needed for nfs utils
|
||||
tcp_wrapper = import ../os-specific/linux/tcp-wrapper {
|
||||
inherit fetchurl stdenv kernelHeaders gnused;
|
||||
# FIXME: `tcp-wrapper' is actually not OS-specific.
|
||||
tcpWrapper = import ../os-specific/linux/tcp-wrapper {
|
||||
inherit fetchurl stdenv;
|
||||
};
|
||||
*/
|
||||
|
||||
udev = import ../os-specific/linux/udev {
|
||||
inherit fetchurl stdenv;
|
||||
|
Loading…
Reference in New Issue
Block a user