From b04ace2fbbc4d9355d8703ccc3e097fd679e1778 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Tue, 31 Mar 2020 04:34:20 +0200 Subject: [PATCH] ldb: clean up expression MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * format with nixpkgs-fmt * quote homepage as per RFC 0045 * split name → pname & version * do not use aliases * switch to wafHook --- pkgs/development/libraries/ldb/default.nix | 48 ++++++++++++++++------ 1 file changed, 35 insertions(+), 13 deletions(-) diff --git a/pkgs/development/libraries/ldb/default.nix b/pkgs/development/libraries/ldb/default.nix index 12f7b176bb7b..036afbed5990 100644 --- a/pkgs/development/libraries/ldb/default.nix +++ b/pkgs/development/libraries/ldb/default.nix @@ -1,21 +1,45 @@ -{ stdenv, fetchurl, python, pkgconfig, readline, tdb, talloc, tevent -, popt, libxslt, docbook_xsl, docbook_xml_dtd_42, cmocka +{ stdenv +, fetchurl +, python +, pkg-config +, readline +, tdb +, talloc +, tevent +, popt +, libxslt +, docbook-xsl-nons +, docbook_xml_dtd_42 +, cmocka +, wafHook }: stdenv.mkDerivation rec { - name = "ldb-1.3.3"; + pname = "ldb"; + version = "1.3.3"; src = fetchurl { - url = "mirror://samba/ldb/${name}.tar.gz"; - sha256 = "14gsrm7dvyjpbpnc60z75j6fz2p187abm2h353lq95kx2bv70c1b" ; + url = "mirror://samba/ldb/${pname}-${version}.tar.gz"; + sha256 = "14gsrm7dvyjpbpnc60z75j6fz2p187abm2h353lq95kx2bv70c1b"; }; outputs = [ "out" "dev" ]; - nativeBuildInputs = [ pkgconfig ]; + nativeBuildInputs = [ + pkg-config + wafHook + ]; + buildInputs = [ - python readline tdb talloc tevent popt - libxslt docbook_xsl docbook_xml_dtd_42 + python + readline + tdb + talloc + tevent + popt + libxslt + docbook-xsl-nons + docbook_xml_dtd_42 cmocka ]; @@ -30,11 +54,9 @@ stdenv.mkDerivation rec { }) ]; - preConfigure = '' - sed -i 's,#!/usr/bin/env python,#!${python}/bin/python,g' buildtools/bin/waf - ''; + wafPath = "buildtools/bin/waf"; - configureFlags = [ + wafConfigureFlags = [ "--bundled-libraries=NONE" "--builtin-libraries=replace" ]; @@ -43,7 +65,7 @@ stdenv.mkDerivation rec { meta = with stdenv.lib; { description = "A LDAP-like embedded database"; - homepage = https://ldb.samba.org/; + homepage = "https://ldb.samba.org/"; license = licenses.lgpl3Plus; platforms = platforms.all; };