From 1be7664496efff14ff61459e339145b738d57e94 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Tue, 31 Mar 2020 05:17:21 +0200 Subject: [PATCH] ntdb: 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 * move build tools to nativeBuildInputs --- pkgs/development/libraries/ntdb/default.nix | 40 ++++++++++++++------- pkgs/top-level/all-packages.nix | 4 +-- 2 files changed, 29 insertions(+), 15 deletions(-) diff --git a/pkgs/development/libraries/ntdb/default.nix b/pkgs/development/libraries/ntdb/default.nix index a310d2f27802..de0db887d4bf 100644 --- a/pkgs/development/libraries/ntdb/default.nix +++ b/pkgs/development/libraries/ntdb/default.nix @@ -1,32 +1,48 @@ -{ stdenv, fetchurl, python, pkgconfig, readline, gettext, libxslt -, docbook_xsl, docbook_xml_dtd_42 +{ stdenv +, fetchurl +, python3 +, pkg-config +, readline +, gettext +, libxslt +, docbook-xsl-nons +, docbook_xml_dtd_42 +, wafHook }: stdenv.mkDerivation rec { - name = "ntdb-1.0"; + pname = "ntdb"; + version = "1.0"; src = fetchurl { - url = "mirror://samba/tdb/${name}.tar.gz"; + url = "mirror://samba/tdb/${pname}-${version}.tar.gz"; sha256 = "0jdzgrz5sr25k83yrw7wqb3r0yj1v04z4s3lhsmnr5z6n5ifhyl1"; }; - nativeBuildInputs = [ pkgconfig ]; - buildInputs = [ - python readline gettext libxslt docbook_xsl docbook_xml_dtd_42 + nativeBuildInputs = [ + pkg-config + gettext + libxslt + docbook-xsl-nons + docbook_xml_dtd_42 + wafHook ]; - preConfigure = '' - patchShebangs buildtools/bin/waf - ''; + buildInputs = [ + python3 + readline # required to build python + ]; - configureFlags = [ + wafPath = "buildtools/bin/waf"; + + wafConfigureFlags = [ "--bundled-libraries=NONE" "--builtin-libraries=replace,ccan" ]; meta = with stdenv.lib; { description = "The not-so trivial database"; - homepage = https://tdb.samba.org/; + homepage = "https://tdb.samba.org/"; license = licenses.lgpl3Plus; platforms = platforms.all; }; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 7aa7435916bb..4188dbfc2932 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -14627,9 +14627,7 @@ in tclx = callPackage ../development/libraries/tclx { }; - ntdb = callPackage ../development/libraries/ntdb { - python = python2; - }; + ntdb = callPackage ../development/libraries/ntdb { }; tdb = callPackage ../development/libraries/tdb {};