about summary refs log tree commit diff
path: root/pkgs/servers/http
diff options
context:
space:
mode:
authorzimbatm <zimbatm@zimbatm.com>2016-06-12 23:38:57 +0100
committerGitHub <noreply@github.com>2016-06-12 23:38:57 +0100
commita95229a963ce35341347d00406c7b8102a42e59f (patch)
tree6d448f21e0a1258f53add3a19959663c942702ee /pkgs/servers/http
parentecdd2721da9d0e1614a0c3f0aa76cbf78613a744 (diff)
parent25fbac5b52f80b43c778e16e906f2d5223412707 (diff)
downloadnixlib-a95229a963ce35341347d00406c7b8102a42e59f.tar
nixlib-a95229a963ce35341347d00406c7b8102a42e59f.tar.gz
nixlib-a95229a963ce35341347d00406c7b8102a42e59f.tar.bz2
nixlib-a95229a963ce35341347d00406c7b8102a42e59f.tar.lz
nixlib-a95229a963ce35341347d00406c7b8102a42e59f.tar.xz
nixlib-a95229a963ce35341347d00406c7b8102a42e59f.tar.zst
nixlib-a95229a963ce35341347d00406c7b8102a42e59f.zip
Merge pull request #15677 from womfoo/mod_auth_mellon
mod_auth_mellon: init at 0.12.0 and dependency lasso: init at 2.5.1
Diffstat (limited to 'pkgs/servers/http')
-rw-r--r--pkgs/servers/http/apache-modules/mod_auth_mellon/default.nix38
-rw-r--r--pkgs/servers/http/apache-modules/mod_auth_mellon/fixdeps.patch30
2 files changed, 68 insertions, 0 deletions
diff --git a/pkgs/servers/http/apache-modules/mod_auth_mellon/default.nix b/pkgs/servers/http/apache-modules/mod_auth_mellon/default.nix
new file mode 100644
index 000000000000..5bad8b7dc53d
--- /dev/null
+++ b/pkgs/servers/http/apache-modules/mod_auth_mellon/default.nix
@@ -0,0 +1,38 @@
+{ stdenv, apacheHttpd, autoconf, automake, autoreconfHook, curl, fetchFromGitHub, glib, lasso, libtool, libxml2, libxslt, openssl, pkgconfig, xmlsec }:
+
+stdenv.mkDerivation rec {
+
+  name = "mod_auth_mellon-${version}";
+  version = "0.12.0";
+
+  src = fetchFromGitHub {
+    owner = "UNINETT";
+    repo = "mod_auth_mellon";
+    rev = "v${version}";
+    sha256 = "1p6v6vgrfvgvc5y2ygqyyxi0klpm3nxaw3fg35zmpmw663w8skqn";
+  };
+
+  patches = [
+    ./fixdeps.patch
+  ];
+
+  buildInputs = [ apacheHttpd autoconf autoreconfHook automake curl glib lasso libtool libxml2 libxslt openssl pkgconfig xmlsec ];
+
+  configureFlags = ["--with-apxs2=${apacheHttpd}/bin/apxs" "--exec-prefix=$out"];
+
+  installPhase = ''
+    mkdir -p $out/bin
+    cp ./mellon_create_metadata.sh $out/bin
+    mkdir -p $out/modules
+    cp ./.libs/mod_auth_mellon.so $out/modules
+  '';
+
+  meta = with stdenv.lib; {
+    homepage = https://github.com/UNINETT/mod_auth_mellon;
+    description = "An Apache module with a simple SAML 2.0 service provider";
+    license = licenses.gpl2Plus;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ womfoo ];
+  };
+
+}
diff --git a/pkgs/servers/http/apache-modules/mod_auth_mellon/fixdeps.patch b/pkgs/servers/http/apache-modules/mod_auth_mellon/fixdeps.patch
new file mode 100644
index 000000000000..63b69fb142f6
--- /dev/null
+++ b/pkgs/servers/http/apache-modules/mod_auth_mellon/fixdeps.patch
@@ -0,0 +1,30 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -74,6 +74,16 @@ PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.12])
+ AC_SUBST(GLIB_CFLAGS)
+ AC_SUBST(GLIB_LIBS)
+ 
++#include <libxml/uri.h>
++PKG_CHECK_MODULES(LIBXML2, libxml-2.0)
++AC_SUBST(LIBXML2_CFLAGS)
++AC_SUBST(LIBXML2_LIBS)
++
++#include <xmlsec/xmlenc.h>
++PKG_CHECK_MODULES(XMLSEC, xmlsec1-openssl)
++AC_SUBST(XMLSEC_CFLAGS)
++AC_SUBST(XMLSEC_LIBS)
++
+ # Test to see if we can include lasso/utils.h
+ # AC_CHECK_HEADER won't work correctly unless we specifiy the include directories
+ # found in the LASSO_CFLAGS. Save and restore CFLAGS and CPPFLAGS.
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -25,7 +25,7 @@
+ all:	mod_auth_mellon.la
+ 
+ mod_auth_mellon.la: $(SRC) auth_mellon.h auth_mellon_compat.h
+-	@APXS2@ -Wc,"-std=c99 @OPENSSL_CFLAGS@ @LASSO_CFLAGS@ @CURL_CFLAGS@ @GLIB_CFLAGS@ @CFLAGS@" -Wl,"@OPENSSL_LIBS@ @LASSO_LIBS@ @CURL_LIBS@ @GLIB_LIBS@" -Wc,-Wall -Wc,-g -c $(SRC)
++	@APXS2@ -Wc,"-std=c99 @OPENSSL_CFLAGS@ @LASSO_CFLAGS@ @CURL_CFLAGS@ @GLIB_CFLAGS@ @CFLAGS@ @LIBXML2_CFLAGS@ @XMLSEC_CFLAGS@ @CFLAGS@" -Wl,"@OPENSSL_LIBS@ @LASSO_LIBS@ @CURL_LIBS@ @GLIB_LIBS@ @LIBXML2_LIBS@ @XMLSEC_LIBS@" -Wc,-Wall -Wc,-g -c $(SRC)
+ 
+ 
+ # Building configure (for distribution)