Commit 41769b4f authored by wxt's avatar wxt
Browse files

_389_ds_base: nixfmt

parent 70ad3289
Loading
Loading
Loading
Loading
+86 −78
Original line number Diff line number Diff line
{ lib
, stdenv
, fetchFromGitHub
, autoconf
, automake
, cargo
, libtool
, pkg-config
, cracklib
, lmdb
, json_c
, linux-pam
, libevent
, libxcrypt
, nspr
, nss
, openldap
, withOpenldap ? true
, db
, withBdb ? true
, cyrus_sasl
, icu
, net-snmp
, withNetSnmp ? true
, krb5
, pcre2
, python3
, rustPlatform
, rustc
, openssl
, withSystemd ? lib.meta.availableOn stdenv.hostPlatform systemd, systemd
, zlib
, rsync
, withCockpit ? true
, withAsan ? false
{
  lib,
  stdenv,
  fetchFromGitHub,
  autoconf,
  automake,
  cargo,
  libtool,
  pkg-config,
  cracklib,
  lmdb,
  json_c,
  linux-pam,
  libevent,
  libxcrypt,
  nspr,
  nss,
  openldap,
  withOpenldap ? true,
  db,
  withBdb ? true,
  cyrus_sasl,
  icu,
  net-snmp,
  withNetSnmp ? true,
  krb5,
  pcre2,
  python3,
  rustPlatform,
  rustc,
  openssl,
  withSystemd ? lib.meta.availableOn stdenv.hostPlatform systemd,
  systemd,
  zlib,
  rsync,
  withCockpit ? true,
  withAsan ? false,
}:

stdenv.mkDerivation rec {
@@ -61,10 +63,10 @@ stdenv.mkDerivation rec {
    python3
    cargo
    rustc
  ]
  ++ lib.optional withCockpit rsync;
  ] ++ lib.optional withCockpit rsync;

  buildInputs = [
  buildInputs =
    [
      cracklib
      lmdb
      json_c
@@ -98,24 +100,30 @@ stdenv.mkDerivation rec {
    tar -xzf ${cargoDeps} -C ./vendor --strip-components=1
  '';

  configureFlags = [
  configureFlags =
    [
      "--enable-rust-offline"
      "--enable-autobind"
    ]
    ++ lib.optionals withSystemd [
      "--with-systemd"
      "--with-systemdsystemunitdir=${placeholder "out"}/etc/systemd/system"
  ] ++ lib.optionals withOpenldap [
    ]
    ++ lib.optionals withOpenldap [
      "--with-openldap"
  ] ++ lib.optionals withBdb [
    ]
    ++ lib.optionals withBdb [
      "--with-db-inc=${lib.getDev db}/include"
      "--with-db-lib=${lib.getLib db}/lib"
  ] ++ lib.optionals withNetSnmp [
    ]
    ++ lib.optionals withNetSnmp [
      "--with-netsnmp-inc=${lib.getDev net-snmp}/include"
      "--with-netsnmp-lib=${lib.getLib net-snmp}/lib"
  ] ++ lib.optionals (!withCockpit) [
    ]
    ++ lib.optionals (!withCockpit) [
      "--disable-cockpit"
  ] ++ lib.optionals withAsan [
    ]
    ++ lib.optionals withAsan [
      "--enable-asan"
      "--enable-debug"
    ];