From fa7d35dcbf8842892271463acf2fcc59b514549f Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Tue, 31 Mar 2020 04:08:35 +0200 Subject: [PATCH 1/8] tevent: 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 --- pkgs/development/libraries/tevent/default.nix | 30 ++++++++++++++----- 1 file changed, 23 insertions(+), 7 deletions(-) diff --git a/pkgs/development/libraries/tevent/default.nix b/pkgs/development/libraries/tevent/default.nix index 9f94f4f7217d..b3c31ffd88d2 100644 --- a/pkgs/development/libraries/tevent/default.nix +++ b/pkgs/development/libraries/tevent/default.nix @@ -1,18 +1,34 @@ -{ stdenv, fetchurl, python, pkgconfig, readline, talloc -, libxslt, docbook_xsl, docbook_xml_dtd_42 +{ stdenv +, fetchurl +, python +, pkg-config +, readline +, talloc +, libxslt +, docbook-xsl-nons +, docbook_xml_dtd_42 }: stdenv.mkDerivation rec { - name = "tevent-0.9.37"; + pname = "tevent"; + version = "0.9.37"; src = fetchurl { - url = "mirror://samba/tevent/${name}.tar.gz"; + url = "mirror://samba/tevent/${pname}-${version}.tar.gz"; sha256 = "1q77vbjic2bb79li2a54ffscnrnwwww55fbpry2kgh7acpnlb0qn"; }; - nativeBuildInputs = [ pkgconfig ]; + nativeBuildInputs = [ + pkg-config + ]; + buildInputs = [ - python readline talloc libxslt docbook_xsl docbook_xml_dtd_42 + python + readline + talloc + libxslt + docbook-xsl-nons + docbook_xml_dtd_42 ]; preConfigure = '' @@ -26,7 +42,7 @@ stdenv.mkDerivation rec { meta = with stdenv.lib; { description = "An event system based on the talloc memory management library"; - homepage = https://tevent.samba.org/; + homepage = "https://tevent.samba.org/"; license = licenses.lgpl3Plus; platforms = platforms.all; }; From f6f09daa23ad872c7d0a1704d6922c56cfc479dc Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Tue, 31 Mar 2020 04:14:20 +0200 Subject: [PATCH 2/8] tevent: clean up expression * format with nixpkgs-fmt * do not use aliases --- pkgs/development/libraries/talloc/default.nix | 27 +++++++++++++++---- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/pkgs/development/libraries/talloc/default.nix b/pkgs/development/libraries/talloc/default.nix index 9e9bc1c804bb..f464364e8a0a 100644 --- a/pkgs/development/libraries/talloc/default.nix +++ b/pkgs/development/libraries/talloc/default.nix @@ -1,5 +1,12 @@ -{ stdenv, fetchurl, python, pkgconfig, readline, libxslt -, docbook_xsl, docbook_xml_dtd_42, fixDarwinDylibNames +{ stdenv +, fetchurl +, python +, pkg-config +, readline +, libxslt +, docbook-xsl-nons +, docbook_xml_dtd_42 +, fixDarwinDylibNames , wafHook }: @@ -12,9 +19,19 @@ stdenv.mkDerivation rec { sha256 = "0xwzgzrqamfdlklwacp9d219pqkah0yfrhxb1j7bxlmgzp924j7g"; }; - nativeBuildInputs = [ pkgconfig fixDarwinDylibNames python wafHook - docbook_xsl docbook_xml_dtd_42 ]; - buildInputs = [ readline libxslt ]; + nativeBuildInputs = [ + pkg-config + fixDarwinDylibNames + python + wafHook + docbook-xsl-nons + docbook_xml_dtd_42 + ]; + + buildInputs = [ + readline + libxslt + ]; wafPath = "buildtools/bin/waf"; From 2ef17b38fbc7a6845567def91204bfa64091f762 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Tue, 31 Mar 2020 04:28:43 +0200 Subject: [PATCH 3/8] =?UTF-8?q?tevent:=200.9.37=20=E2=86=92=200.10.2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Now requires Python 3 * Which was also coincidentally required to fix build (https://github.com/NixOS/nixpkgs/issues/82489) * Also switch to wafhook Changes: * https://git.samba.org/samba.git/?p=samba.git;a=commit;h=1c73f38633ce40bcf19775fbeaf5e3baacdba9ab * https://git.samba.org/samba.git/?p=samba.git;a=commit;h=db58a50296041ca57675daee15caea8850f1d3f8 * https://git.samba.org/samba.git/?p=samba.git;a=commit;h=6f2278018436184785e19f69efc60ec408b14aa7 * https://git.samba.org/samba.git/?p=samba.git;a=commit;h=123267138e993c6a87990c0022e89f4970c0ac12 * https://git.samba.org/samba.git/?p=samba.git;a=commit;h=4aea5c0972de53c143530cc42ef6d3b8cfafb973 --- pkgs/development/libraries/tevent/default.nix | 29 ++++++++++--------- pkgs/top-level/all-packages.nix | 4 +-- 2 files changed, 17 insertions(+), 16 deletions(-) diff --git a/pkgs/development/libraries/tevent/default.nix b/pkgs/development/libraries/tevent/default.nix index b3c31ffd88d2..66d65e639510 100644 --- a/pkgs/development/libraries/tevent/default.nix +++ b/pkgs/development/libraries/tevent/default.nix @@ -1,41 +1,44 @@ { stdenv , fetchurl -, python +, python3 , pkg-config , readline , talloc , libxslt , docbook-xsl-nons , docbook_xml_dtd_42 +, which +, wafHook }: stdenv.mkDerivation rec { pname = "tevent"; - version = "0.9.37"; + version = "0.10.2"; src = fetchurl { url = "mirror://samba/tevent/${pname}-${version}.tar.gz"; - sha256 = "1q77vbjic2bb79li2a54ffscnrnwwww55fbpry2kgh7acpnlb0qn"; + sha256 = "+EJ4IuWyh4+4so1vUNloSHNPPzEwYS+1dP3S0hSKZpY="; }; nativeBuildInputs = [ pkg-config - ]; - - buildInputs = [ - python - readline - talloc + which + python3 libxslt docbook-xsl-nons docbook_xml_dtd_42 + wafHook ]; - preConfigure = '' - sed -i 's,#!/usr/bin/env python,#!${python}/bin/python,g' buildtools/bin/waf - ''; + buildInputs = [ + python3 + readline # required to build python + talloc + ]; - configureFlags = [ + wafPath = "buildtools/bin/waf"; + + wafConfigureFlags = [ "--bundled-libraries=NONE" "--builtin-libraries=replace" ]; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 5638580166c8..72a76af34036 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -14653,9 +14653,7 @@ in termbox = callPackage ../development/libraries/termbox { }; - tevent = callPackage ../development/libraries/tevent { - python = python2; - }; + tevent = callPackage ../development/libraries/tevent { }; tet = callPackage ../development/tools/misc/tet { }; From b04ace2fbbc4d9355d8703ccc3e097fd679e1778 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Tue, 31 Mar 2020 04:34:20 +0200 Subject: [PATCH 4/8] 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; }; From 43f550744662b8044fd44002728be17298c6ba96 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Tue, 31 Mar 2020 04:44:49 +0200 Subject: [PATCH 5/8] tdb: 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/tdb/default.nix | 29 +++++++++++++++------- 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/pkgs/development/libraries/tdb/default.nix b/pkgs/development/libraries/tdb/default.nix index 2764e8878875..03955a9ac710 100644 --- a/pkgs/development/libraries/tdb/default.nix +++ b/pkgs/development/libraries/tdb/default.nix @@ -1,23 +1,34 @@ -{ stdenv, fetchurl, pkgconfig -, wafHook, python3, readline -, libxslt, docbook_xsl, docbook_xml_dtd_45 +{ stdenv +, fetchurl +, pkg-config +, wafHook +, python +, readline +, libxslt +, docbook-xsl-nons +, docbook_xml_dtd_45 }: stdenv.mkDerivation rec { - name = "tdb-1.4.3"; + pname = "tdb"; + version = "1.4.3"; src = fetchurl { - url = "mirror://samba/tdb/${name}.tar.gz"; + url = "mirror://samba/tdb/${pname}-${version}.tar.gz"; sha256 = "06waz0k50c7v3chd08mzp2rv7w4k4q9isbxx3vhlfpx1vy9q61f8"; }; nativeBuildInputs = [ - pkgconfig wafHook - libxslt docbook_xsl docbook_xml_dtd_45 + pkg-config + wafHook + libxslt + docbook-xsl-nons + docbook_xml_dtd_45 ]; buildInputs = [ - python3 readline + python + readline # required to build python ]; wafPath = "buildtools/bin/waf"; @@ -35,7 +46,7 @@ stdenv.mkDerivation rec { and uses locking internally to keep writers from trampling on each other. TDB is also extremely small. ''; - homepage = https://tdb.samba.org/; + homepage = "https://tdb.samba.org/"; license = licenses.lgpl3Plus; platforms = platforms.all; }; From f1582a04df910d585763ec647958e1f7dfbdbd4b Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Tue, 31 Mar 2020 04:47:34 +0200 Subject: [PATCH 6/8] tdb: Port to Python 3 Half of the Samba libraries needs it now --- pkgs/development/libraries/tdb/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/tdb/default.nix b/pkgs/development/libraries/tdb/default.nix index 03955a9ac710..b8e6552bc7b5 100644 --- a/pkgs/development/libraries/tdb/default.nix +++ b/pkgs/development/libraries/tdb/default.nix @@ -2,7 +2,7 @@ , fetchurl , pkg-config , wafHook -, python +, python3 , readline , libxslt , docbook-xsl-nons @@ -27,7 +27,7 @@ stdenv.mkDerivation rec { ]; buildInputs = [ - python + python3 readline # required to build python ]; From 4cfdc7af5399d243be7723b870ecb7ca4eeb36d7 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Tue, 31 Mar 2020 05:13:44 +0200 Subject: [PATCH 7/8] =?UTF-8?q?ldb:=201.3.3=20=E2=86=92=202.1.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Move build tools to nativeBuildInputs * Switch to Python 3 as it is required by most Samba libraries * Do not yet enable the experimental lmdb backend introduced in 1.4.0 Changes: * https://git.samba.org/samba.git/?p=samba.git;a=commit;h=4e2eb5660a11cea215d39495844aa76ffb5a1a2e * https://git.samba.org/samba.git/?p=samba.git;a=commit;h=3eecdbcc38dbe084b285c9720443d819304f7b97 * https://git.samba.org/samba.git/?p=samba.git;a=commit;h=b7f0ee93f58e663bb8fc0b39985aa49b254582d9 * https://git.samba.org/samba.git/?p=samba.git;a=commit;h=bdbb9422c0430d74c3173822257e23a9dfb2713e * https://git.samba.org/samba.git/?p=samba.git;a=commit;h=340cb9ca97bc2a23f102f80897a8d8f4809f0072 * https://git.samba.org/samba.git/?p=samba.git;a=commit;h=de3bb5cd5236565f2b79644d99e55d03b254b65e * https://git.samba.org/samba.git/?p=samba.git;a=commit;h=09d281d69b668a71e4457889bb5e949414a664fb * https://git.samba.org/samba.git/?p=samba.git;a=commit;h=81648d576d56e924945b2214ac12ca6a40679db8 * https://git.samba.org/samba.git/?p=samba.git;a=commit;h=86d480ade25953a175b0837667ce5efb8b7e65df * https://git.samba.org/samba.git/?p=samba.git;a=commit;h=80bd467affbda1d962f4deb3caa8a42c6531425d * https://git.samba.org/samba.git/?p=samba.git;a=commit;h=bc0d16c9d8eacd254552ff28726a2ba5f2a1c8c0 * https://git.samba.org/samba.git/?p=samba.git;a=commit;h=c37b94fd0a7b24df93b664ad4c2d197c516c9dce * https://git.samba.org/samba.git/?p=samba.git;a=commit;h=79460b1b9f3452d6d68014b84f4a9dc3988bd916 * https://git.samba.org/samba.git/?p=samba.git;a=commit;h=0ca46a37268c8219192abc3ab5f2546a02ed8862 --- pkgs/development/libraries/ldb/default.nix | 29 ++++++++-------------- pkgs/top-level/all-packages.nix | 4 +-- 2 files changed, 11 insertions(+), 22 deletions(-) diff --git a/pkgs/development/libraries/ldb/default.nix b/pkgs/development/libraries/ldb/default.nix index 036afbed5990..7ee869b53c35 100644 --- a/pkgs/development/libraries/ldb/default.nix +++ b/pkgs/development/libraries/ldb/default.nix @@ -1,6 +1,6 @@ { stdenv , fetchurl -, python +, python3 , pkg-config , readline , tdb @@ -16,49 +16,40 @@ stdenv.mkDerivation rec { pname = "ldb"; - version = "1.3.3"; + version = "2.1.1"; src = fetchurl { url = "mirror://samba/ldb/${pname}-${version}.tar.gz"; - sha256 = "14gsrm7dvyjpbpnc60z75j6fz2p187abm2h353lq95kx2bv70c1b"; + sha256 = "jO+y8l/KkT+hinktDvsDrwf4f1uVGkze0DD1uY8lx7A="; }; outputs = [ "out" "dev" ]; nativeBuildInputs = [ pkg-config + python3 wafHook + libxslt + docbook-xsl-nons + docbook_xml_dtd_42 ]; buildInputs = [ - python - readline + python3 + readline # required to build python tdb talloc tevent popt - libxslt - docbook-xsl-nons - docbook_xml_dtd_42 cmocka ]; - patches = [ - # CVE-2019-3824 - # downloading the patch from debian as they have ported the patch from samba to ldb but otherwise is identical to - # https://bugzilla.samba.org/attachment.cgi?id=14857 - (fetchurl { - name = "CVE-2019-3824.patch"; - url = "https://sources.debian.org/data/main/l/ldb/2:1.1.27-1+deb9u1/debian/patches/CVE-2019-3824-master-v4-5-02.patch"; - sha256 = "1idnqckvjh18rh9sbq90rr4sxfviha9nd1ca9pd6lai0y6r6q4yd"; - }) - ]; - wafPath = "buildtools/bin/waf"; wafConfigureFlags = [ "--bundled-libraries=NONE" "--builtin-libraries=replace" + "--without-ldb-lmdb" ]; stripDebugList = "bin lib modules"; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 72a76af34036..7aa7435916bb 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -12341,9 +12341,7 @@ in ldacbt = callPackage ../development/libraries/ldacbt { }; - ldb = callPackage ../development/libraries/ldb { - python = python2; - }; + ldb = callPackage ../development/libraries/ldb { }; lensfun = callPackage ../development/libraries/lensfun {}; From 1be7664496efff14ff61459e339145b738d57e94 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Tue, 31 Mar 2020 05:17:21 +0200 Subject: [PATCH 8/8] 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 {};