summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2015-06-02 11:35:28 +0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2015-06-04 14:54:52 +0200
commit020cb43f551006173582d1f8b440865572770c84 (patch)
tree689c83d4be135878b247009d1e39a6ed7d32be65 /pkgs
parent056e2c8d6aec835c72edd852d64a67da10451868 (diff)
downloadnixlib-020cb43f551006173582d1f8b440865572770c84.tar
nixlib-020cb43f551006173582d1f8b440865572770c84.tar.gz
nixlib-020cb43f551006173582d1f8b440865572770c84.tar.bz2
nixlib-020cb43f551006173582d1f8b440865572770c84.tar.lz
nixlib-020cb43f551006173582d1f8b440865572770c84.tar.xz
nixlib-020cb43f551006173582d1f8b440865572770c84.tar.zst
nixlib-020cb43f551006173582d1f8b440865572770c84.zip
Revert "kerberos: Modernize build"
This reverts commit 9740b0d12d467aaa0ddc1cc27559374250ae5549.
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/development/libraries/kerberos/heimdal.nix79
-rw-r--r--pkgs/top-level/all-packages.nix1
2 files changed, 16 insertions, 64 deletions
diff --git a/pkgs/development/libraries/kerberos/heimdal.nix b/pkgs/development/libraries/kerberos/heimdal.nix
index c06fcdb384e8..aeea290bdb28 100644
--- a/pkgs/development/libraries/kerberos/heimdal.nix
+++ b/pkgs/development/libraries/kerberos/heimdal.nix
@@ -1,32 +1,7 @@
-{ stdenv, fetchurl, pkgconfig, flex, yacc
-
-# Optional Dependencies
-, openldap ? null, libcap_ng ? null, sqlite ? null, openssl ? null, db ? null
-, readline ? null, libedit ? null, pam ? null
-
-#, readline, openldap, libcap_ng
-#, sqlite, db, ncurses, openssl, cyrus_sasl
+{ stdenv, fetchurl, pkgconfig, flex, yacc, readline, openldap, libcap_ng
+, sqlite, db, ncurses, openssl, cyrus_sasl
 }:
 
-let
-  mkFlag = trueStr: falseStr: cond: name: val:
-    if cond == null then null else
-      "--${if cond != false then trueStr else falseStr}${name}${if val != null && cond != false then "=${val}" else ""}";
-  mkEnable = mkFlag "enable-" "disable-";
-  mkWith = mkFlag "with-" "without-";
-  mkOther = mkFlag "" "" true;
-
-  shouldUsePkg = pkg: if pkg != null && stdenv.lib.any (x: x == stdenv.system) pkg.meta.platforms then pkg else null;
-
-  optOpenldap = shouldUsePkg openldap;
-  optLibcap_ng = shouldUsePkg libcap_ng;
-  optSqlite = shouldUsePkg sqlite;
-  optOpenssl = shouldUsePkg openssl;
-  optDb = shouldUsePkg db;
-  optReadline = shouldUsePkg readline;
-  optLibedit = shouldUsePkg libedit;
-  optPam = shouldUsePkg pam;
-in
 stdenv.mkDerivation rec {
   name = "heimdal-1.5.3";
 
@@ -38,43 +13,14 @@ stdenv.mkDerivation rec {
     sha256 = "19gypf9vzfrs2bw231qljfl4cqc1riyg0ai0xmm1nd1wngnpphma";
   };
 
-  nativeBuildInputs = [ pkgconfig flex yacc ];
-  buildInputs = [
-    optOpenldap optLibcap_ng optSqlite optOpenssl optDb optReadline optLibedit
-    optPam
-  ];
-
+  ## ugly, X should be made an option
   configureFlags = [
-    (mkOther                         "sysconfdir"            "/etc")
-    (mkOther                         "localstatedir"         "/var")
-    (mkWith   (optOpenldap != null)  "openldap"              optOpenldap)
-    (mkEnable (optOpenldap != null)  "hdb-openldap-module"   null)
-    (mkEnable true                   "pk-init"               null)
-    (mkEnable true                   "digest"                null)
-    (mkEnable true                   "kx509"                 null)
-    (mkWith   (optLibcap_ng != null) "capng"                 null)
-    (mkWith   (optSqlite != null)    "sqlite3"               sqlite)
-    (mkEnable (optSqlite != null)    "sqlite-cache"          null)
-    #(mkWith  true                   "libintl"               glibc)              # TODO libintl fix
-    (mkWith   true                   "hdbdir"                "/var/lib/heimdal")
-    (mkWith   (optOpenssl != null)   "openssl"               optOpenssl)
-    (mkEnable true                   "pthread-support"       null)
-    (mkEnable true                   "dce"                   null)
-    (mkEnable true                   "afs-support"           null)
-    (mkWith   (optDb != null)        "berkeley-db"           optDb)
-    (mkEnable false                  "nmdb"                  null)
-    (mkEnable false                  "developer"             null)
-    (mkWith   true                   "ipv6"                  null)
-    (mkEnable false                  "socket-wrapper"        null)
-    (mkEnable true                   "otp"                   null)
-    (mkEnable false                  "osfc2"                 null)
-    (mkEnable true                   "mmap"                  null)
-    (mkEnable true                   "afs-string-to-key"     null)
-    (mkWith   (optReadline != null)  "readline"              optReadline)
-    (mkWith   (optLibedit != null)   "libedit"               optLibedit)
-    (mkWith   false                  "x"                     null)
-    (mkEnable true                   "kcm"                   null)
-    (mkEnable true                   "heimdal-documentation" null)
+    "--enable-hdb-openldap-module"
+    "--with-capng"
+    "--with-openldap=${openldap}"
+    "--with-sqlite3=${sqlite}"
+    "--with-openssl-lib=${openssl}/lib"
+    "--without-x"
   ];
 
   # We need to build hcrypt for applications like samba
@@ -88,11 +34,16 @@ stdenv.mkDerivation rec {
     (cd lib/hcrypto; make install)
     (cd include/hcrypto; make install)
 
-    # Doesn't succeed with --libexec=$out/sbin, so
+    # dont succeed with --libexec=$out/sbin, so
     mv "$out/libexec/"* $out/sbin/
     rmdir $out/libexec
   '';
 
+  buildInputs = [
+    pkgconfig flex yacc readline openldap libcap_ng sqlite db ncurses
+    cyrus_sasl openssl
+  ];
+
   meta = with stdenv.lib; {
     description = "an implementation of Kerberos 5 (and some more stuff) largely written in Sweden";
     license = licenses.bsd3;
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 465717c6e40b..529a89befce2 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -6376,6 +6376,7 @@ let
     openldap = openldap.override {
       cyrus_sasl = cyrus_sasl.override { kerberos = null; };
     };
+    cyrus_sasl = cyrus_sasl.override { kerberos = null; };
   };
 
   harfbuzz = callPackage ../development/libraries/harfbuzz { };