From 5bfb4a4f30f110833a5477b43a1a060c2cd04dab Mon Sep 17 00:00:00 2001 From: "Jason \"Don\" O'Conal" Date: Sat, 7 Sep 2013 10:49:38 +1000 Subject: [PATCH] fail2ban: fix build on darwin (close #933) --- pkgs/development/libraries/gamin/default.nix | 11 ++++ pkgs/tools/security/fail2ban/default.nix | 55 ++++++++++---------- 2 files changed, 38 insertions(+), 28 deletions(-) diff --git a/pkgs/development/libraries/gamin/default.nix b/pkgs/development/libraries/gamin/default.nix index b61101654ba..55f802d069a 100644 --- a/pkgs/development/libraries/gamin/default.nix +++ b/pkgs/development/libraries/gamin/default.nix @@ -17,4 +17,15 @@ stdenv.mkDerivation rec { configureFlags = "--disable-debug --with-python=${python} CPPFLAGS=-D_GNU_SOURCE"; patches = [ ./deadlock.patch ] ++ map fetchurl (import ./debian-patches.nix); + + preBuild = stdenv.lib.optionalString stdenv.isDarwin '' + sed -i 's/,--version-script=.*$/\\/' libgamin/Makefile + ''; + + meta = with stdenv.lib; { + homepage = https://people.gnome.org/~veillard/gamin/; + description = "A file and directory monitoring system"; + maintainers = with maintainers; [ lovek323 ]; + platforms = platforms.unix; + }; } diff --git a/pkgs/tools/security/fail2ban/default.nix b/pkgs/tools/security/fail2ban/default.nix index df4917e803d..dd869714e05 100644 --- a/pkgs/tools/security/fail2ban/default.nix +++ b/pkgs/tools/security/fail2ban/default.nix @@ -7,8 +7,8 @@ pythonPackages.buildPythonPackage { namePrefix = ""; src = fetchurl { - url = "https://github.com/fail2ban/fail2ban/zipball/${version}"; - name = "fail2ban-${version}.zip"; + url = "https://github.com/fail2ban/fail2ban/zipball/${version}"; + name = "fail2ban-${version}.zip"; sha256 = "0lbanfshr8kasa1bb7861w3mrm2d0c1bvv4s5703265s8zp5m284"; }; @@ -16,38 +16,37 @@ pythonPackages.buildPythonPackage { pythonPath = [ gamin ]; - preConfigure = - '' - substituteInPlace setup.cfg \ - --replace /usr $out + preConfigure = '' + substituteInPlace setup.cfg \ + --replace /usr $out - substituteInPlace setup.py \ - --replace /etc $out/etc \ - --replace /var $TMPDIR/var \ + substituteInPlace setup.py \ + --replace /etc $out/etc \ + --replace /var $TMPDIR/var \ - for i in fail2ban-client fail2ban-regex fail2ban-server; do - substituteInPlace $i \ - --replace /usr/share/fail2ban $out/share/fail2ban - done - - for i in config/action.d/sendmail*.conf; do - substituteInPlace $i \ - --replace /usr/sbin/sendmail sendmail \ - --replace /usr/bin/whois whois - done - ''; + for i in fail2ban-client fail2ban-regex fail2ban-server; do + substituteInPlace $i \ + --replace /usr/share/fail2ban $out/share/fail2ban + done + + for i in config/action.d/sendmail*.conf; do + substituteInPlace $i \ + --replace /usr/sbin/sendmail sendmail \ + --replace /usr/bin/whois whois + done + ''; doCheck = false; - installCommand = - '' - python setup.py install --prefix=$out - ''; + installCommand = '' + python setup.py install --prefix=$out + ''; - meta = { - homepage = http://www.fail2ban.org/; + meta = with stdenv.lib; { + homepage = http://www.fail2ban.org/; description = "A program that scans log files for repeated failing login attempts and bans IP addresses"; - license = stdenv.lib.licenses.gpl2Plus; - maintainers = [ stdenv.lib.maintainers.eelco ]; + license = licenses.gpl2Plus; + maintainers = with maintainers; [ eelco lovek323 ]; + platforms = platforms.unix; }; }