From 94235b625649a4707b1a6117d220e06aa3390723 Mon Sep 17 00:00:00 2001 From: Tom Hunger Date: Thu, 14 Jan 2021 13:36:43 +0000 Subject: [PATCH 01/15] python3Packages.diskcache: 4.1.0 -> 5.1.0 --- .../python-modules/diskcache/default.nix | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/pkgs/development/python-modules/diskcache/default.nix b/pkgs/development/python-modules/diskcache/default.nix index 793b0edd6974..8b968c3272fb 100644 --- a/pkgs/development/python-modules/diskcache/default.nix +++ b/pkgs/development/python-modules/diskcache/default.nix @@ -1,7 +1,8 @@ -{ lib +{ stdenv +, lib , buildPythonPackage , fetchFromGitHub -, pytest +, pytestCheckHook , pytestcov , pytest_xdist , pytest-django @@ -11,28 +12,25 @@ buildPythonPackage rec { pname = "diskcache"; - version = "4.1.0"; + version = "5.1.0"; src = fetchFromGitHub { owner = "grantjenks"; repo = "python-diskcache"; rev = "v${version}"; - sha256 = "0xy2vpk4hixb4gg871d9sx9wxdz8pi0pmnfdwg4bf8jqfjg022w8"; + sha256 = "0xwqw60dbn1x2294galcs08vm6ydcr677lr8slqz8a3ry6sgkhn9"; }; checkInputs = [ - pytest + pytestCheckHook pytestcov pytest_xdist pytest-django mock ]; - disabled = lib.versionAtLeast django.version "2.0"; - - checkPhase = '' - pytest - ''; + # Darwin sandbox causes most tests to fail. + doCheck = !stdenv.isDarwin; meta = with lib; { description = "Disk and file backed persistent cache"; From 628b9538a43599b25f68b63f0fffb79d77af0ba9 Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Thu, 21 Jan 2021 02:06:01 +0000 Subject: [PATCH 02/15] postgresql11Packages.pg_partman: 4.4.0 -> 4.4.1 --- pkgs/servers/sql/postgresql/ext/pg_partman.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/sql/postgresql/ext/pg_partman.nix b/pkgs/servers/sql/postgresql/ext/pg_partman.nix index d0bc8435c3e3..fb690e96328d 100644 --- a/pkgs/servers/sql/postgresql/ext/pg_partman.nix +++ b/pkgs/servers/sql/postgresql/ext/pg_partman.nix @@ -2,7 +2,7 @@ stdenv.mkDerivation rec { pname = "pg_partman"; - version = "4.4.0"; + version = "4.4.1"; buildInputs = [ postgresql ]; @@ -10,7 +10,7 @@ stdenv.mkDerivation rec { owner = "pgpartman"; repo = pname; rev = "refs/tags/v${version}"; - sha256 = "0wr2nivp0b8vk355rnv4bygiashq98q9zhfgdbxzhm7bgxd01rk2"; + sha256 = "sha256-jFG2Zna97FHZin2V3Cwy5JcdeFh09Yy/eoyHtcCorPA="; }; installPhase = '' From 6973cc608ee57c46b1398676526ba93ec5aa4ccb Mon Sep 17 00:00:00 2001 From: tu-maurice Date: Thu, 21 Jan 2021 20:04:20 +0100 Subject: [PATCH 03/15] vlc: 3.0.11.1 -> 3.0.12 --- pkgs/applications/video/vlc/default.nix | 13 +------ .../fix-missing-includes-with-qt-5.15.patch | 37 ------------------- 2 files changed, 2 insertions(+), 48 deletions(-) delete mode 100644 pkgs/applications/video/vlc/fix-missing-includes-with-qt-5.15.patch diff --git a/pkgs/applications/video/vlc/default.nix b/pkgs/applications/video/vlc/default.nix index cab42ae3f6f7..c925eca302a8 100644 --- a/pkgs/applications/video/vlc/default.nix +++ b/pkgs/applications/video/vlc/default.nix @@ -24,19 +24,13 @@ with lib; stdenv.mkDerivation rec { pname = "${optionalString onlyLibVLC "lib"}vlc"; - version = "3.0.11.1"; + version = "3.0.12"; src = fetchurl { url = "http://get.videolan.org/vlc/${version}/vlc-${version}.tar.xz"; - sha256 = "1f46h0hv7fk35zg4iczlp7ib7h2jmh8m4r5klw3g2558ib9134qq"; + sha256 = "0ygqihw2c5vvzv8950dlf7rdwz1cpz1668jgyja604ljibrmix7g"; }; - patches = [ - # Couldn't find an upstream version of this patch - # https://build.opensuse.org/package/view_file/openSUSE:Factory/vlc/fix-missing-includes-with-qt-5.15.patch?expand=1 - ./fix-missing-includes-with-qt-5.15.patch - ]; - # VLC uses a *ton* of libraries for various pieces of functionality, many of # which are not included here for no other reason that nobody has mentioned # needing them @@ -67,9 +61,6 @@ stdenv.mkDerivation rec { BUILDCC = "${stdenv.cc}/bin/gcc"; postPatch = '' - substituteInPlace configure \ - --replace /bin/echo echo - substituteInPlace modules/text_renderer/freetype/platform_fonts.h --replace \ /usr/share/fonts/truetype/freefont ${freefont_ttf}/share/fonts/truetype ''; diff --git a/pkgs/applications/video/vlc/fix-missing-includes-with-qt-5.15.patch b/pkgs/applications/video/vlc/fix-missing-includes-with-qt-5.15.patch deleted file mode 100644 index d980fd2f6da8..000000000000 --- a/pkgs/applications/video/vlc/fix-missing-includes-with-qt-5.15.patch +++ /dev/null @@ -1,37 +0,0 @@ -Index: vlc-3.0.8/modules/gui/qt/util/timetooltip.hpp -=================================================================== ---- vlc-3.0.8.orig/modules/gui/qt/util/timetooltip.hpp -+++ vlc-3.0.8/modules/gui/qt/util/timetooltip.hpp -@@ -25,6 +25,7 @@ - #include "qt.hpp" - - #include -+#include - - class TimeTooltip : public QWidget - { -Index: vlc-3.0.8/modules/gui/qt/components/playlist/views.cpp -=================================================================== ---- vlc-3.0.8.orig/modules/gui/qt/components/playlist/views.cpp -+++ vlc-3.0.8/modules/gui/qt/components/playlist/views.cpp -@@ -27,6 +27,7 @@ - #include "input_manager.hpp" /* THEMIM */ - - #include -+#include - #include - #include - #include -Index: vlc-3.0.8/modules/gui/qt/dialogs/plugins.cpp -=================================================================== ---- vlc-3.0.8.orig/modules/gui/qt/dialogs/plugins.cpp -+++ vlc-3.0.8/modules/gui/qt/dialogs/plugins.cpp -@@ -53,6 +53,7 @@ - #include - #include - #include -+#include - #include - #include - #include - From 491667c51a77281b7973c04d23a892bb7df7c63e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABl=20de=20Kok?= Date: Sat, 23 Jan 2021 12:30:55 +0100 Subject: [PATCH 04/15] python3Packages.wasmer: make cargoHash invariant to the Python version The package name used the Python version. Since the name is used in the Cargo vendor directory, the Cargo vendor hash depended on the Python version. Remove the Python version from the name. --- pkgs/development/python-modules/wasmer/default.nix | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/pkgs/development/python-modules/wasmer/default.nix b/pkgs/development/python-modules/wasmer/default.nix index e8307365574c..0bb60d6b9e30 100644 --- a/pkgs/development/python-modules/wasmer/default.nix +++ b/pkgs/development/python-modules/wasmer/default.nix @@ -11,7 +11,7 @@ let version = "1.0.0-beta1"; wheel = rustPlatform.buildRustPackage rec { - name = "${pname}-${version}-py${python.version}"; + inherit pname version; src = fetchFromGitHub { owner = "wasmerio"; @@ -20,7 +20,7 @@ let sha256 = "0302lcfjlw7nz18nf86z6swhhpp1qnpwcsm2fj4avl22rsv0h78j"; }; - cargoSha256 = "0d83dniijjq8rc4fcwj6ja5x4hxh187afnqfd8c9fzb8nx909a0v"; + cargoHash = "sha256-Rq5m9Lu6kePvohfhODLMOpGPFtCh0woTsQY2TufoiNQ="; nativeBuildInputs = [ maturin python ]; @@ -50,8 +50,6 @@ let in buildPythonPackage rec { inherit pname version; - # we can only support one python version because the cargo hash changes with the python version - disabled = !isPy38; format = "wheel"; src = wheel; From 87dc37562b67103a56ea4bea27f9e1a7b43ecbd1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Sat, 23 Jan 2021 22:16:41 +0100 Subject: [PATCH 05/15] home-assistant: don't mark home-assistant-frontend as missing --- .../home-assistant/component-packages.nix | 18 +++++++++--------- .../home-assistant/parse-requirements.py | 3 ++- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/pkgs/servers/home-assistant/component-packages.nix b/pkgs/servers/home-assistant/component-packages.nix index b642ffc8cde0..caf8a27973e2 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -153,7 +153,7 @@ "deconz" = ps: with ps; [ ]; # missing inputs: pydeconz "decora" = ps: with ps; [ bluepy ]; # missing inputs: decora "decora_wifi" = ps: with ps; [ ]; # missing inputs: decora_wifi - "default_config" = ps: with ps; [ pynacl aiohttp-cors defusedxml distro emoji hass-nabucasa netdisco pillow sqlalchemy zeroconf ]; # missing inputs: home-assistant-frontend + "default_config" = ps: with ps; [ pynacl aiohttp-cors defusedxml distro emoji hass-nabucasa netdisco pillow sqlalchemy zeroconf ]; "delijn" = ps: with ps; [ ]; # missing inputs: pydelijn "deluge" = ps: with ps; [ deluge-client ]; "demo" = ps: with ps; [ aiohttp-cors ]; @@ -281,7 +281,7 @@ "fritzbox_callmonitor" = ps: with ps; [ fritzconnection ]; "fritzbox_netmonitor" = ps: with ps; [ fritzconnection ]; "fronius" = ps: with ps; [ ]; # missing inputs: pyfronius - "frontend" = ps: with ps; [ aiohttp-cors pillow ]; # missing inputs: home-assistant-frontend + "frontend" = ps: with ps; [ aiohttp-cors pillow ]; "frontier_silicon" = ps: with ps; [ ]; # missing inputs: afsapi "futurenow" = ps: with ps; [ pyfnip ]; "garadget" = ps: with ps; [ ]; @@ -333,7 +333,7 @@ "hangouts" = ps: with ps; [ ]; # missing inputs: hangups "harman_kardon_avr" = ps: with ps; [ ]; # missing inputs: hkavr "harmony" = ps: with ps; [ aioharmony ]; - "hassio" = ps: with ps; [ aiohttp-cors pillow ]; # missing inputs: home-assistant-frontend + "hassio" = ps: with ps; [ aiohttp-cors pillow ]; "haveibeenpwned" = ps: with ps; [ ]; "hddtemp" = ps: with ps; [ ]; "hdmi_cec" = ps: with ps; [ ]; # missing inputs: pyCEC @@ -448,7 +448,7 @@ "local_ip" = ps: with ps; [ ]; "locative" = ps: with ps; [ aiohttp-cors ]; "lock" = ps: with ps; [ ]; - "logbook" = ps: with ps; [ aiohttp-cors pillow sqlalchemy ]; # missing inputs: home-assistant-frontend + "logbook" = ps: with ps; [ aiohttp-cors pillow sqlalchemy ]; "logentries" = ps: with ps; [ ]; "logger" = ps: with ps; [ ]; "logi_circle" = ps: with ps; [ aiohttp-cors ha-ffmpeg ]; # missing inputs: logi_circle @@ -468,7 +468,7 @@ "mailgun" = ps: with ps; [ aiohttp-cors ]; # missing inputs: pymailgunner "manual" = ps: with ps; [ ]; "manual_mqtt" = ps: with ps; [ aiohttp-cors paho-mqtt ]; - "map" = ps: with ps; [ aiohttp-cors pillow ]; # missing inputs: home-assistant-frontend + "map" = ps: with ps; [ aiohttp-cors pillow ]; "marytts" = ps: with ps; [ ]; # missing inputs: speak2mary "mastodon" = ps: with ps; [ ]; # missing inputs: Mastodon.py "matrix" = ps: with ps; [ matrix-client ]; @@ -572,7 +572,7 @@ "ohmconnect" = ps: with ps; [ defusedxml ]; "ombi" = ps: with ps; [ ]; # missing inputs: pyombi "omnilogic" = ps: with ps; [ ]; # missing inputs: omnilogic - "onboarding" = ps: with ps; [ aiohttp-cors pillow ]; # missing inputs: home-assistant-frontend + "onboarding" = ps: with ps; [ aiohttp-cors pillow ]; "onewire" = ps: with ps; [ ]; # missing inputs: pi1wire pyownet "onkyo" = ps: with ps; [ onkyo-eiscp ]; "onvif" = ps: with ps; [ ha-ffmpeg zeep ]; # missing inputs: WSDiscovery onvif-zeep-async @@ -603,8 +603,8 @@ "panasonic_bluray" = ps: with ps; [ ]; # missing inputs: panacotta "panasonic_viera" = ps: with ps; [ ]; # missing inputs: panasonic_viera "pandora" = ps: with ps; [ pexpect ]; - "panel_custom" = ps: with ps; [ aiohttp-cors pillow ]; # missing inputs: home-assistant-frontend - "panel_iframe" = ps: with ps; [ aiohttp-cors pillow ]; # missing inputs: home-assistant-frontend + "panel_custom" = ps: with ps; [ aiohttp-cors pillow ]; + "panel_iframe" = ps: with ps; [ aiohttp-cors pillow ]; "pcal9535a" = ps: with ps; [ ]; # missing inputs: pcal9535a "pencom" = ps: with ps; [ ]; # missing inputs: pencompy "persistent_notification" = ps: with ps; [ ]; @@ -698,7 +698,7 @@ "russound_rio" = ps: with ps; [ ]; # missing inputs: russound_rio "russound_rnet" = ps: with ps; [ ]; # missing inputs: russound "sabnzbd" = ps: with ps; [ aiohttp-cors netdisco zeroconf ]; # missing inputs: pysabnzbd - "safe_mode" = ps: with ps; [ aiohttp-cors hass-nabucasa pillow ]; # missing inputs: home-assistant-frontend + "safe_mode" = ps: with ps; [ aiohttp-cors hass-nabucasa pillow ]; "saj" = ps: with ps; [ ]; # missing inputs: pysaj "samsungtv" = ps: with ps; [ samsungctl samsungtvws ]; "satel_integra" = ps: with ps; [ ]; # missing inputs: satel_integra diff --git a/pkgs/servers/home-assistant/parse-requirements.py b/pkgs/servers/home-assistant/parse-requirements.py index fc0e790bd6f1..55e58d7a017f 100755 --- a/pkgs/servers/home-assistant/parse-requirements.py +++ b/pkgs/servers/home-assistant/parse-requirements.py @@ -161,7 +161,8 @@ def main() -> None: if attr_path is not None: # Add attribute path without "python3Packages." prefix attr_paths.append(attr_path[len(PKG_SET + ".") :]) - else: + # home-assistant-frontend is always in propagatedBuildInputs + elif name != 'home-assistant-frontend': missing_reqs.append(name) else: build_inputs[component] = (attr_paths, missing_reqs) From a7f0bf791608cd5674adf69fe4ea35f42b9a96fc Mon Sep 17 00:00:00 2001 From: Ivan Babrou Date: Sat, 23 Jan 2021 14:19:29 -0800 Subject: [PATCH 06/15] mc: move dependency pruning from post to pre fixup See: https://github.com/NixOS/nixpkgs/pull/105026#issuecomment-751163086 --- pkgs/tools/misc/mc/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/tools/misc/mc/default.nix b/pkgs/tools/misc/mc/default.nix index 674b39c51af8..99944c7f8247 100644 --- a/pkgs/tools/misc/mc/default.nix +++ b/pkgs/tools/misc/mc/default.nix @@ -52,7 +52,7 @@ stdenv.mkDerivation rec { --replace /bin/rm ${coreutils}/bin/rm ''; - postFixup = '' + preFixup = '' # remove unwanted build-dependency references sed -i -e "s!PKG_CONFIG_PATH=''${PKG_CONFIG_PATH}!PKG_CONFIG_PATH=$(echo "$PKG_CONFIG_PATH" | sed -e 's/./0/g')!" $out/bin/mc ''; From 26017cf53660833e6c7124f60a17be44ca295294 Mon Sep 17 00:00:00 2001 From: AndersonTorres Date: Sat, 23 Jan 2021 20:09:53 -0300 Subject: [PATCH 07/15] pyspread: add desktop item Also, remove "spurious" pyspread package. --- pkgs/applications/office/pyspread/default.nix | 18 ++++++ .../python-modules/pyspread/default.nix | 56 ------------------- pkgs/top-level/python-packages.nix | 2 - 3 files changed, 18 insertions(+), 58 deletions(-) delete mode 100644 pkgs/development/python-modules/pyspread/default.nix diff --git a/pkgs/applications/office/pyspread/default.nix b/pkgs/applications/office/pyspread/default.nix index 5b7a80747d09..0b657e38f7fe 100644 --- a/pkgs/applications/office/pyspread/default.nix +++ b/pkgs/applications/office/pyspread/default.nix @@ -1,6 +1,7 @@ { lib , buildPythonApplication , fetchPypi +, makeDesktopItem , makePythonPath , dateutil , matplotlib @@ -38,6 +39,23 @@ buildPythonApplication rec { doCheck = false; # it fails miserably with a core dump + desktopItem = makeDesktopItem rec { + name = pname; + exec = name; + icon = name; + desktopName = "Pyspread"; + genericName = "Spreadsheet"; + comment = meta.description; + categories = "Office;Development;Spreadsheet;"; + }; + + postInstall = '' + runHook preInstall + install -D $out/share/applications + install -m 644 $desktopItem/share/applications/* $out/share/applications + runHook postInstall + ''; + fixupPhase = '' runHook preFixup sed -i -e "s|#!/bin/bash|#!${runtimeShell}|" $out/bin/pyspread diff --git a/pkgs/development/python-modules/pyspread/default.nix b/pkgs/development/python-modules/pyspread/default.nix deleted file mode 100644 index a14911b7a3ed..000000000000 --- a/pkgs/development/python-modules/pyspread/default.nix +++ /dev/null @@ -1,56 +0,0 @@ -{ buildPythonPackage -, fetchPypi -, isPy3k -, lib, stdenv -, numpy -, wxPython -, matplotlib -, pycairo -, python-gnupg -, xlrd -, xlwt -, jedi -, pyenchant -, basemap -, pygtk -, makeDesktopItem -}: - -buildPythonPackage rec { - pname = "pyspread"; - version = "1.99.5"; - - src = fetchPypi { - inherit pname version; - sha256 = "d396c2f94bf1ef6140877ab19205e6f2375bfe01d1bf50ff33bb63384744dd78"; - }; - - propagatedBuildInputs = [ numpy wxPython matplotlib pycairo python-gnupg xlrd xlwt jedi pyenchant basemap pygtk ]; - # Could also (optionally) add pyrsvg and python bindings for libvlc - - # Tests try to access X Display - doCheck = false; - - disabled = isPy3k; - - desktopItem = makeDesktopItem rec { - name = pname; - exec = name; - icon = name; - desktopName = "Pyspread"; - genericName = "Spreadsheet"; - comment = meta.description; - categories = "Development;Spreadsheet;"; - }; - - postInstall = '' - mkdir -p $out/share/applications - cp $desktopItem/share/applications/* $out/share/applications - ''; - - meta = with lib; { - description = "Pyspread is a non-traditional spreadsheet application that is based on and written in the programming language Python"; - homepage = "https://manns.github.io/pyspread/"; - license = licenses.gpl3; - }; -} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index d37d837e4e12..d69502ace2c7 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -5906,8 +5906,6 @@ in { pyspotify = callPackage ../development/python-modules/pyspotify { }; - pyspread = callPackage ../development/python-modules/pyspread { }; - pysptk = callPackage ../development/python-modules/pysptk { }; pysqlcipher3 = callPackage ../development/python-modules/pysqlcipher3 { From 5f35338b1897de95b1862a64ff8226a046cfc254 Mon Sep 17 00:00:00 2001 From: "\"Matthieu Coudron\"" <"mcoudron@hotmail.com"> Date: Sun, 24 Jan 2021 00:20:53 +0100 Subject: [PATCH 08/15] vimPlugins: update --- pkgs/misc/vim-plugins/generated.nix | 144 ++++++++++++++-------------- 1 file changed, 72 insertions(+), 72 deletions(-) diff --git a/pkgs/misc/vim-plugins/generated.nix b/pkgs/misc/vim-plugins/generated.nix index e6ccbe2ef063..4aa08e4f3bea 100644 --- a/pkgs/misc/vim-plugins/generated.nix +++ b/pkgs/misc/vim-plugins/generated.nix @@ -65,12 +65,12 @@ let ale = buildVimPluginFrom2Nix { pname = "ale"; - version = "2021-01-20"; + version = "2021-01-23"; src = fetchFromGitHub { owner = "dense-analysis"; repo = "ale"; - rev = "7e3d2930d8defbcb233b0bc21822cb8e8377bec2"; - sha256 = "10ddyvbcy1m00sbcxnba3ijwxjcymqzxlk3hs2gb7z5ng85cryyb"; + rev = "9fd9435cd525b1d3c4470db0d514f72ed31cfece"; + sha256 = "0nbnq3wmwm5m4g2b8jknjvallq1pq7qdxmbz81nnjkdmf6sw75ji"; }; meta.homepage = "https://github.com/dense-analysis/ale/"; }; @@ -377,12 +377,12 @@ let chadtree = buildVimPluginFrom2Nix { pname = "chadtree"; - version = "2021-01-21"; + version = "2021-01-23"; src = fetchFromGitHub { owner = "ms-jpq"; repo = "chadtree"; - rev = "4b1d61cc00baf7b5f77efb75d1973d453248153f"; - sha256 = "1w166j4syxwv1qhm0s813rixgc83j6ba5m4db1n2a8bnqwgcc9i6"; + rev = "614af72a9b0afaac26e3e7fe2e1f30eb416bb96b"; + sha256 = "04mnhwk1sn174nrvr9jfvcfq4dff1c595y9i2r94xy6yag5cv61l"; }; meta.homepage = "https://github.com/ms-jpq/chadtree/"; }; @@ -846,12 +846,12 @@ let defx-nvim = buildVimPluginFrom2Nix { pname = "defx-nvim"; - version = "2021-01-08"; + version = "2021-01-23"; src = fetchFromGitHub { owner = "Shougo"; repo = "defx.nvim"; - rev = "a9259687391457c71fa8bcbf609ca83742b6d277"; - sha256 = "0smlfvxdily3vz9i3vr0b5r3410zp5asf13cbjxxv219fqa3z22a"; + rev = "09c8f1bff43b0cc607f7aeab872f04fcf26b150b"; + sha256 = "1sapg0az9vfd33vhxxi68hd23c01p8fy5yvx8fy0mvj5ak2gzbnn"; }; meta.homepage = "https://github.com/Shougo/defx.nvim/"; }; @@ -894,12 +894,12 @@ let denite-nvim = buildVimPluginFrom2Nix { pname = "denite-nvim"; - version = "2021-01-21"; + version = "2021-01-23"; src = fetchFromGitHub { owner = "Shougo"; repo = "denite.nvim"; - rev = "18f8a297d1f8ddb3f9fea8941888d57194b7e1e9"; - sha256 = "0a6vlmzpi7i7wpsc49jrh6bk3m7nq562k6k1lb33vfc41dvyz3am"; + rev = "9637bc88220c0117e0bc20b730348aaa744a78d6"; + sha256 = "1gwx6x584h98w31g1ynyqbjs6vypx121wcbsq1bq4npn71a9yvxv"; }; meta.homepage = "https://github.com/Shougo/denite.nvim/"; }; @@ -1136,12 +1136,12 @@ let deoplete-nvim = buildVimPluginFrom2Nix { pname = "deoplete-nvim"; - version = "2021-01-15"; + version = "2021-01-23"; src = fetchFromGitHub { owner = "Shougo"; repo = "deoplete.nvim"; - rev = "5fb8291d5f5238bdd52025e02470c7602d66f7c4"; - sha256 = "08fidhbqxhzxabww0zb5lxfignl3qmjn8ffl1g81acl2v62bz3hn"; + rev = "e149cc4b581721c434986b2681db30d9ff4cb372"; + sha256 = "0cfizq9zbbfqypqjkph7np1mn4vakfim7qylblmzc6s24kx9kyf7"; }; meta.homepage = "https://github.com/Shougo/deoplete.nvim/"; }; @@ -1220,12 +1220,12 @@ let echodoc-vim = buildVimPluginFrom2Nix { pname = "echodoc-vim"; - version = "2020-10-13"; + version = "2021-01-21"; src = fetchFromGitHub { owner = "Shougo"; repo = "echodoc.vim"; - rev = "2a6d6bd6255fbfe152da6bb7f2404afa29479941"; - sha256 = "18nm20ivkcjlh0rgf3c1wdxf1wsc4r95znm2dhgmw1ym4wmh0v4s"; + rev = "1b657bccd69c0498a865b930959a36279e7213e0"; + sha256 = "1n9wa4p9ng04ckklca32xz9c8zlkmzlhmwva7sf8l217bcr3zb9y"; }; meta.homepage = "https://github.com/Shougo/echodoc.vim/"; }; @@ -1835,12 +1835,12 @@ let indent-blankline-nvim = buildVimPluginFrom2Nix { pname = "indent-blankline-nvim"; - version = "2020-12-18"; + version = "2021-01-22"; src = fetchFromGitHub { owner = "lukas-reineke"; repo = "indent-blankline.nvim"; - rev = "3e4eb10fd57dec3ca11ecb4afa6b3a76558c4182"; - sha256 = "1qgnrdflw8c7afh060xk5fl5yw7jbap5fp8a4mbhdhgrfr7gv6ll"; + rev = "207e001be64b39b72f8661e4a723d5bab698b5cd"; + sha256 = "0vnnfm319y3n0vvwbwls40fb6s73rqc8yyi31g0f0hdwd6ahsafm"; }; meta.homepage = "https://github.com/lukas-reineke/indent-blankline.nvim/"; }; @@ -1956,12 +1956,12 @@ let Jenkinsfile-vim-syntax = buildVimPluginFrom2Nix { pname = "Jenkinsfile-vim-syntax"; - version = "2020-06-05"; + version = "2021-01-23"; src = fetchFromGitHub { owner = "martinda"; repo = "Jenkinsfile-vim-syntax"; - rev = "a701341879c6db93f5dffa37f4589eef3c4ded85"; - sha256 = "0nm3lf37l1g8lpa4yz1va0s6vw0vw99zghy3dzq933j0kqmspgvp"; + rev = "7760006fc591e5a109432a0de0a705c92f7ffcd7"; + sha256 = "1cqqk25x7km4qy0qxhjnqn77911a9nzjdif5905b99n1n6yn36q0"; }; meta.homepage = "https://github.com/martinda/Jenkinsfile-vim-syntax/"; }; @@ -2844,24 +2844,24 @@ let nvim-dap = buildVimPluginFrom2Nix { pname = "nvim-dap"; - version = "2021-01-20"; + version = "2021-01-23"; src = fetchFromGitHub { owner = "mfussenegger"; repo = "nvim-dap"; - rev = "0e4ddd517bce79dbc351b89710becf4c711afd84"; - sha256 = "0dr2cdfwd8dirwqqwwp4iay24p9ssrynq2801mrk5wd7rnv20x7b"; + rev = "55833f58a65ab703bb1f34860f60a98ce601fc08"; + sha256 = "0sljqwm48p3i2ps3p5rh0vr7lxbzwd67npkqd9scbmgcmci6blvj"; }; meta.homepage = "https://github.com/mfussenegger/nvim-dap/"; }; nvim-dap-virtual-text = buildVimPluginFrom2Nix { pname = "nvim-dap-virtual-text"; - version = "2020-12-06"; + version = "2021-01-23"; src = fetchFromGitHub { owner = "theHamsta"; repo = "nvim-dap-virtual-text"; - rev = "5257a5a7b759ba5d4fe695b02569526cdd32ad43"; - sha256 = "0ghf6g5wdxdzja9i2d1r4s4p828safw6vx8636yx798lqqlvp8i7"; + rev = "ce5223283753f1583ebe547c197f2c52975d545f"; + sha256 = "1nrzkyfdy01rw52mlr1xpf01yf8kqdmv8z9wrkl27q9240hklq9y"; }; meta.homepage = "https://github.com/theHamsta/nvim-dap-virtual-text/"; }; @@ -2916,12 +2916,12 @@ let nvim-lspconfig = buildVimPluginFrom2Nix { pname = "nvim-lspconfig"; - version = "2021-01-21"; + version = "2021-01-23"; src = fetchFromGitHub { owner = "neovim"; repo = "nvim-lspconfig"; - rev = "86b316140a5fdc902e89ff585ce429357ce4d5df"; - sha256 = "1d0qb4kpdk677m53wl4lpbkmz283b27x34d78bsq7q078l642sg4"; + rev = "6a33e9ba757245a300531e370c6b2ebe6e5a7097"; + sha256 = "1grsh5186in83n0j28n8r0vw64kx8h1c5z8pm19adwdan0pcbs1r"; }; meta.homepage = "https://github.com/neovim/nvim-lspconfig/"; }; @@ -2964,24 +2964,24 @@ let nvim-tree-lua = buildVimPluginFrom2Nix { pname = "nvim-tree-lua"; - version = "2021-01-20"; + version = "2021-01-22"; src = fetchFromGitHub { owner = "kyazdani42"; repo = "nvim-tree.lua"; - rev = "91bd2b53ba605dd66712178454c3ae9800885c0e"; - sha256 = "16wwfhly3ii855kq7kdrcyvvcdf1zfrsj24yb5r15dzjp104ahrx"; + rev = "b2852578769b53430af678ae7a99482f2a4be0da"; + sha256 = "057w9nqn0xc207s7y7fcl84xi14251yhyjd6xsajv9hlh4zcgarv"; }; meta.homepage = "https://github.com/kyazdani42/nvim-tree.lua/"; }; nvim-treesitter = buildVimPluginFrom2Nix { pname = "nvim-treesitter"; - version = "2021-01-21"; + version = "2021-01-22"; src = fetchFromGitHub { owner = "nvim-treesitter"; repo = "nvim-treesitter"; - rev = "f84c93c484ec3f5fb2a7ca461bf5b93994662fda"; - sha256 = "0wh2rv1awlvm1d4fgvcgl0cg9sw20x5axmnq2ch0q18qca37v5i5"; + rev = "6d2b1fc56679038fb839b7f7707b65808ff5d9e4"; + sha256 = "0jw5igzargbhxrim7256535n6z18ffbzng2qaxsz0mkzp1mr9kik"; }; meta.homepage = "https://github.com/nvim-treesitter/nvim-treesitter/"; }; @@ -3024,12 +3024,12 @@ let nvim-ts-rainbow = buildVimPluginFrom2Nix { pname = "nvim-ts-rainbow"; - version = "2021-01-21"; + version = "2021-01-23"; src = fetchFromGitHub { owner = "p00f"; repo = "nvim-ts-rainbow"; - rev = "18c879acbcf9349b131c6d78eba41c489796ec74"; - sha256 = "1nqw98yhqbm4afr60x6njdfgm0gk2sqv91dcvrvw2jjwa1dzzcc5"; + rev = "955f6d08e2e829f819d5f838e742761b43a263f5"; + sha256 = "19yy39sv1xv36aa9chrlkpf9xfw5l556s5sljcspynn66sdz8n5y"; }; meta.homepage = "https://github.com/p00f/nvim-ts-rainbow/"; }; @@ -3939,12 +3939,12 @@ let telescope-nvim = buildVimPluginFrom2Nix { pname = "telescope-nvim"; - version = "2021-01-20"; + version = "2021-01-23"; src = fetchFromGitHub { owner = "nvim-telescope"; repo = "telescope.nvim"; - rev = "a81f316712b26a04ec35eda9c46a641ece635881"; - sha256 = "0cvh5c86cv5jir0ibf1gn5kwkrmrshapi8al8lqavgsh7ryib4nw"; + rev = "099910dcd922723b2634c74c0958ef4d169721dd"; + sha256 = "0nyd6ym87xmhd8zr5fl4h2hdnd9f0sc42ra5s0a8z8s52rd651x2"; }; meta.homepage = "https://github.com/nvim-telescope/telescope.nvim/"; }; @@ -4036,12 +4036,12 @@ let traces-vim = buildVimPluginFrom2Nix { pname = "traces-vim"; - version = "2021-01-14"; + version = "2021-01-23"; src = fetchFromGitHub { owner = "markonm"; repo = "traces.vim"; - rev = "2b54b52badf9e052cbb78f5c21d9dc994110ff52"; - sha256 = "0p5xkyyrdr3gph4q4p0n517g6rv1vzqfjqzzmrjclf4zpqqiarc5"; + rev = "0f29f8e53503b8ce0bb43467064b2401cf34acd1"; + sha256 = "1xx2b59wcnbh5662j7b68maz5ccxj5xpfpnjn2r669aiv0a5snhw"; }; meta.homepage = "https://github.com/markonm/traces.vim/"; }; @@ -4672,12 +4672,12 @@ let vim-clap = buildVimPluginFrom2Nix { pname = "vim-clap"; - version = "2021-01-19"; + version = "2021-01-23"; src = fetchFromGitHub { owner = "liuchengxu"; repo = "vim-clap"; - rev = "7442976f0c5dea79f8cfb342e7abb25cea9a8daa"; - sha256 = "1gzc800i4zsxav4h7smqgapnrallarbgrq9arfhydrq41hy2h6wr"; + rev = "890aaca21af5ce9569d4393f72240283c198a246"; + sha256 = "1n11vb609v6fxrv5vxzf9z1hkzlzky0lx9sf5hjzmf54kny77f3r"; }; meta.homepage = "https://github.com/liuchengxu/vim-clap/"; }; @@ -5476,12 +5476,12 @@ let vim-go = buildVimPluginFrom2Nix { pname = "vim-go"; - version = "2021-01-20"; + version = "2021-01-22"; src = fetchFromGitHub { owner = "fatih"; repo = "vim-go"; - rev = "cf7ff75a3f5f6600474dc1912819fd0ce12e97ee"; - sha256 = "01i2cffnivj9p8fz5l49z4g0cja5hk8klim7wbn38zm7xmq0cn8f"; + rev = "007d9bc7786d703dc778de7b69895b8c1907dde7"; + sha256 = "1r7jv3cbawh9n2d6nd3iwga6bgj8z0nx94c3dhn5286si1s3857c"; }; meta.homepage = "https://github.com/fatih/vim-go/"; }; @@ -5741,12 +5741,12 @@ let vim-illuminate = buildVimPluginFrom2Nix { pname = "vim-illuminate"; - version = "2021-01-17"; + version = "2021-01-23"; src = fetchFromGitHub { owner = "RRethy"; repo = "vim-illuminate"; - rev = "85103ff4ab0c5c8017af106ba1af9949aa28793e"; - sha256 = "1aixb0rbjdmask0miry1b9xi0f8bcg8z6w58bphxa7f9ndfgbppw"; + rev = "d69a2787524a6973a187e67c978e1a92529fd910"; + sha256 = "013xnvxrma4jdv9a5i33qzjw65c0rrlvidsgdg4snrmwhdqw744q"; }; meta.homepage = "https://github.com/RRethy/vim-illuminate/"; }; @@ -6114,24 +6114,24 @@ let vim-lsc = buildVimPluginFrom2Nix { pname = "vim-lsc"; - version = "2021-01-19"; + version = "2021-01-23"; src = fetchFromGitHub { owner = "natebosch"; repo = "vim-lsc"; - rev = "3012f39ce120ffdc5b89a85f074fc66d6f4905bf"; - sha256 = "157jm2wwvp4dp7rzilhrb4040paldjx7qkp116v4q5kj699w42i7"; + rev = "ec4818d6fc7bd6705972ef138a71293678e8abed"; + sha256 = "0v54bmwr9cxqp2dnb7f413i1lnyk6vaf9vgprmyj3yzrycwgpqam"; }; meta.homepage = "https://github.com/natebosch/vim-lsc/"; }; vim-lsp = buildVimPluginFrom2Nix { pname = "vim-lsp"; - version = "2021-01-18"; + version = "2021-01-23"; src = fetchFromGitHub { owner = "prabirshrestha"; repo = "vim-lsp"; - rev = "7380d31c4f49d76ce3895c386e2a7a40b2b2df08"; - sha256 = "082il6bk7rnqvxqqy1070y3182kqk34i1bgcczj4k43llnghskx9"; + rev = "7d5cd2763cbede18728e1254ed8d5e89fd500fd2"; + sha256 = "0hymc1ni3wrbwbn8iql4qy4gb1xvcx2qsxqzna0f861c8kc9v4y4"; }; meta.homepage = "https://github.com/prabirshrestha/vim-lsp/"; }; @@ -6775,12 +6775,12 @@ let vim-projectionist = buildVimPluginFrom2Nix { pname = "vim-projectionist"; - version = "2020-10-31"; + version = "2021-01-22"; src = fetchFromGitHub { owner = "tpope"; repo = "vim-projectionist"; - rev = "0c6967d3a8c3bd3d3b42013531c3f12c843aff80"; - sha256 = "1s6yxnlwxlblj5m9gxlc8699g2a1d7cbjacp4fk4fa9mrkga7bv8"; + rev = "348e070867d02bd471df486bfbe25e2e2ce13061"; + sha256 = "0fyp1zikw16kzjcs7a6g3kjk74xr46bdhwrwfi9ppfqlhb936kgr"; }; meta.homepage = "https://github.com/tpope/vim-projectionist/"; }; @@ -7123,12 +7123,12 @@ let vim-signify = buildVimPluginFrom2Nix { pname = "vim-signify"; - version = "2020-08-13"; + version = "2021-01-22"; src = fetchFromGitHub { owner = "mhinz"; repo = "vim-signify"; - rev = "98c693f7a1a91b73d9232d868765b4d20af892fe"; - sha256 = "05ppj7sqp8i7qhaf6vz427nnwsnkgf9nlq3lhyhbl14cjkrhqny9"; + rev = "26e8c8d9cf27838cd13b45cb54118d74af34087d"; + sha256 = "11aahxvpxv6h2yl3dlcdfb2715d6m2m6f53xw13sir25hmwlj8k8"; }; meta.homepage = "https://github.com/mhinz/vim-signify/"; }; @@ -7219,12 +7219,12 @@ let vim-snipmate = buildVimPluginFrom2Nix { pname = "vim-snipmate"; - version = "2021-01-21"; + version = "2021-01-22"; src = fetchFromGitHub { owner = "garbas"; repo = "vim-snipmate"; - rev = "d4554cd646c3c015d85bd44487a0e019f88c959a"; - sha256 = "1jmyrlbwrljc6jnn44yqz5s090srykn3dp7w08iaq10vpxav987g"; + rev = "cbec960ab558b20281c0634b9b1a45fb16aaf638"; + sha256 = "1k35rh5gq8lv67qx3l31xvl4iz7rlpybls7pwhsbmz4m598w03bm"; }; meta.homepage = "https://github.com/garbas/vim-snipmate/"; }; From 1b848b95bdcbc3f2261d249b542a013bbc85ff8a Mon Sep 17 00:00:00 2001 From: "\"Matthieu Coudron\"" <"mcoudron@hotmail.com"> Date: Sun, 24 Jan 2021 00:21:18 +0100 Subject: [PATCH 09/15] vimPlugins.sql-nvim: init at 2021-01-22 --- pkgs/misc/vim-plugins/generated.nix | 12 ++++++++++++ pkgs/misc/vim-plugins/overrides.nix | 5 +++++ pkgs/misc/vim-plugins/vim-plugin-names | 1 + 3 files changed, 18 insertions(+) diff --git a/pkgs/misc/vim-plugins/generated.nix b/pkgs/misc/vim-plugins/generated.nix index 4aa08e4f3bea..13d9de704486 100644 --- a/pkgs/misc/vim-plugins/generated.nix +++ b/pkgs/misc/vim-plugins/generated.nix @@ -3744,6 +3744,18 @@ let meta.homepage = "https://github.com/AndrewRadev/splitjoin.vim/"; }; + sql-nvim = buildVimPluginFrom2Nix { + pname = "sql-nvim"; + version = "2021-01-22"; + src = fetchFromGitHub { + owner = "tami5"; + repo = "sql.nvim"; + rev = "af875daf178fe38c2186b14d55a6bbdb6fbb2e15"; + sha256 = "00qa9m6bij9y39xyf73a3gz0xx0l0mqc1byrk6xl3kdbcngig5il"; + }; + meta.homepage = "https://github.com/tami5/sql.nvim/"; + }; + srcery-vim = buildVimPluginFrom2Nix { pname = "srcery-vim"; version = "2020-12-22"; diff --git a/pkgs/misc/vim-plugins/overrides.nix b/pkgs/misc/vim-plugins/overrides.nix index e4130554ad4e..dcb8c0600e10 100644 --- a/pkgs/misc/vim-plugins/overrides.nix +++ b/pkgs/misc/vim-plugins/overrides.nix @@ -14,6 +14,7 @@ , buildVimPluginFrom2Nix , nodePackages , dasht +, sqlite # deoplete-khard dependency , khard @@ -285,6 +286,10 @@ self: super: { dependencies = [ self.skim ]; }); + sql-nvim = super.sql-nvim.overrideAttrs(old: { + buildInputs = [ sqlite ]; + }); + sved = let # we put the script in its own derivation to benefit the magic of wrapGAppsHook svedbackend = stdenv.mkDerivation { diff --git a/pkgs/misc/vim-plugins/vim-plugin-names b/pkgs/misc/vim-plugins/vim-plugin-names index 438027ba5ef7..d97fd16a34e1 100644 --- a/pkgs/misc/vim-plugins/vim-plugin-names +++ b/pkgs/misc/vim-plugins/vim-plugin-names @@ -537,6 +537,7 @@ svermeulen/vim-subversive t9md/vim-choosewin t9md/vim-smalls takac/vim-hardtime +tami5/sql.nvim tbodt/deoplete-tabnine ternjs/tern_for_vim terryma/vim-expand-region From eba7b3848d65160b1d91c0b9bafd57dfd46df7f8 Mon Sep 17 00:00:00 2001 From: "\"Matthieu Coudron\"" <"mcoudron@hotmail.com"> Date: Sun, 24 Jan 2021 00:21:40 +0100 Subject: [PATCH 10/15] vimPlugins.telescope-frecency-nvim: init at 2021-01-20 --- pkgs/misc/vim-plugins/generated.nix | 12 ++++++++++++ pkgs/misc/vim-plugins/vim-plugin-names | 1 + 2 files changed, 13 insertions(+) diff --git a/pkgs/misc/vim-plugins/generated.nix b/pkgs/misc/vim-plugins/generated.nix index 13d9de704486..aee3796b8374 100644 --- a/pkgs/misc/vim-plugins/generated.nix +++ b/pkgs/misc/vim-plugins/generated.nix @@ -3924,6 +3924,18 @@ let meta.homepage = "https://github.com/tomtom/tcomment_vim/"; }; + telescope-frecency-nvim = buildVimPluginFrom2Nix { + pname = "telescope-frecency-nvim"; + version = "2021-01-20"; + src = fetchFromGitHub { + owner = "nvim-telescope"; + repo = "telescope-frecency.nvim"; + rev = "a770d59b925ff4ff87036afff06c87d620cd6861"; + sha256 = "04kla2nyz1rh0b9iyi5nynyzpmyjiql2wvs2gdf964a79m86493l"; + }; + meta.homepage = "https://github.com/nvim-telescope/telescope-frecency.nvim/"; + }; + telescope-fzf-writer-nvim = buildVimPluginFrom2Nix { pname = "telescope-fzf-writer-nvim"; version = "2021-01-10"; diff --git a/pkgs/misc/vim-plugins/vim-plugin-names b/pkgs/misc/vim-plugins/vim-plugin-names index d97fd16a34e1..6d1dd017a0fa 100644 --- a/pkgs/misc/vim-plugins/vim-plugin-names +++ b/pkgs/misc/vim-plugins/vim-plugin-names @@ -408,6 +408,7 @@ nvim-lua/lsp-status.nvim nvim-lua/lsp_extensions.nvim nvim-lua/plenary.nvim nvim-lua/popup.nvim +nvim-telescope/telescope-frecency.nvim nvim-telescope/telescope-fzf-writer.nvim nvim-telescope/telescope-fzy-native.nvim nvim-telescope/telescope.nvim From 69113ace45c94ad47cbc133e3366a935cbafa70e Mon Sep 17 00:00:00 2001 From: "\"Matthieu Coudron\"" <"mcoudron@hotmail.com"> Date: Sun, 24 Jan 2021 00:22:04 +0100 Subject: [PATCH 11/15] vimPlugins.packer-nvim: init at 2021-01-22 --- pkgs/misc/vim-plugins/generated.nix | 12 ++++++++++++ pkgs/misc/vim-plugins/vim-plugin-names | 1 + 2 files changed, 13 insertions(+) diff --git a/pkgs/misc/vim-plugins/generated.nix b/pkgs/misc/vim-plugins/generated.nix index aee3796b8374..71cfd70356f5 100644 --- a/pkgs/misc/vim-plugins/generated.nix +++ b/pkgs/misc/vim-plugins/generated.nix @@ -3130,6 +3130,18 @@ let meta.homepage = "https://github.com/tyru/open-browser.vim/"; }; + packer-nvim = buildVimPluginFrom2Nix { + pname = "packer-nvim"; + version = "2021-01-22"; + src = fetchFromGitHub { + owner = "wbthomason"; + repo = "packer.nvim"; + rev = "3567ab93c60540407df7ce4faced7c454f89b941"; + sha256 = "14k6iajrari85cl3bi8vn193khhchxn62mq0j2f49gn47pl47f4k"; + }; + meta.homepage = "https://github.com/wbthomason/packer.nvim/"; + }; + palenight-vim = buildVimPluginFrom2Nix { pname = "palenight-vim"; version = "2020-10-20"; diff --git a/pkgs/misc/vim-plugins/vim-plugin-names b/pkgs/misc/vim-plugins/vim-plugin-names index 6d1dd017a0fa..a7e3ea1a3a75 100644 --- a/pkgs/misc/vim-plugins/vim-plugin-names +++ b/pkgs/misc/vim-plugins/vim-plugin-names @@ -667,6 +667,7 @@ VundleVim/Vundle.vim w0ng/vim-hybrid wakatime/vim-wakatime wannesm/wmgraphviz.vim +wbthomason/packer.nvim weirongxu/coc-explorer wellle/targets.vim wellle/tmux-complete.vim From 43697057562d750004e9b9d12cd8bd772f5ee249 Mon Sep 17 00:00:00 2001 From: tobim Date: Sun, 24 Jan 2021 00:54:44 +0100 Subject: [PATCH 12/15] re2: fix for pkgsStatic (#110581) Co-authored-by: Sandro --- pkgs/development/libraries/re2/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/development/libraries/re2/default.nix b/pkgs/development/libraries/re2/default.nix index faa576faa0d0..2d8d00597647 100644 --- a/pkgs/development/libraries/re2/default.nix +++ b/pkgs/development/libraries/re2/default.nix @@ -17,10 +17,14 @@ stdenv.mkDerivation { substituteInPlace Makefile --replace "SED_INPLACE=sed -i '''" "SED_INPLACE=sed -i" ''; + buildFlags = lib.optionals stdenv.hostPlatform.isStatic [ "static" ]; + preCheck = "patchShebangs runtests"; doCheck = true; checkTarget = "test"; + installTargets = lib.optionals stdenv.hostPlatform.isStatic [ "static-install" ]; + doInstallCheck = true; installCheckTarget = "testinstall"; From 95f8678091d82ab653e5c7a4407af5c1124715ba Mon Sep 17 00:00:00 2001 From: Ryan Horiguchi Date: Sun, 24 Jan 2021 01:11:22 +0100 Subject: [PATCH 13/15] gitkraken: 7.4.1 -> 7.5.0 (#110561) --- .../version-management/gitkraken/default.nix | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/pkgs/applications/version-management/gitkraken/default.nix b/pkgs/applications/version-management/gitkraken/default.nix index 7618b3f3ff16..7dd8ff43974d 100644 --- a/pkgs/applications/version-management/gitkraken/default.nix +++ b/pkgs/applications/version-management/gitkraken/default.nix @@ -13,11 +13,11 @@ let in stdenv.mkDerivation rec { pname = "gitkraken"; - version = "7.4.1"; + version = "7.5.0"; src = fetchzip { url = "https://release.axocdn.com/linux/GitKraken-v${version}.tar.gz"; - sha256 = "1c9cyxx5sqvnilf6xp3ildq3lwl6mj8v1vl0wzyjpaiqky99lj9p"; + sha256 = "1v89aza7iwph7k5phyld5m5856c5wbh8ncgg6lh7558v4xna0x57"; }; dontBuild = true; @@ -66,7 +66,7 @@ stdenv.mkDerivation rec { ]; desktopItem = makeDesktopItem { - name = "gitkraken"; + name = pname; exec = "gitkraken"; icon = "gitkraken"; desktopName = "GitKraken"; @@ -88,10 +88,7 @@ stdenv.mkDerivation rec { ln -s $out/share/gitkraken/gitkraken $out/bin/gitkraken mkdir -p $out/share/applications - cp ${desktopItem}/share/applications/* $out/share/applications/ - - substituteInPlace $out/share/applications/gitkraken.desktop \ - --replace $out/usr/share/gitkraken $out/bin + ln -s ${desktopItem}/share/applications/* $out/share/applications mkdir -p $out/share/pixmaps cp gitkraken.png $out/share/pixmaps/gitkraken.png From a4bbfba80dbdccf7c3d3ac64fc7afa2494cf743a Mon Sep 17 00:00:00 2001 From: Pavol Rusnak Date: Sun, 24 Jan 2021 01:29:22 +0100 Subject: [PATCH 14/15] pkgs/development/python-modules: stdenv.lib -> lib --- .../python-modules/Cython/default.nix | 8 +++--- .../python-modules/HTSeq/default.nix | 4 +-- .../python-modules/Theano/default.nix | 8 +++--- .../python-modules/aenum/default.nix | 8 +++--- .../python-modules/aiodns/default.nix | 6 ++--- .../python-modules/aioredis/default.nix | 2 +- .../python-modules/altair/default.nix | 2 +- .../python-modules/aniso8601/default.nix | 2 +- .../python-modules/apipkg/default.nix | 6 ++--- .../python-modules/avro/default.nix | 2 +- .../python-modules/bcrypt/default.nix | 12 ++++----- .../python-modules/beancount/default.nix | 8 +++--- .../python-modules/beanstalkc/default.nix | 8 +++--- .../python-modules/bedup/default.nix | 2 +- .../python-modules/behave/default.nix | 2 +- .../python-modules/binwalk/default.nix | 2 +- .../bootstrapped-pip/default.nix | 6 ++--- .../python-modules/buildout-nix/default.nix | 8 +++--- .../python-modules/cadquery/default.nix | 2 +- .../python-modules/capstone/default.nix | 2 +- .../python-modules/cddb/default.nix | 2 +- .../python-modules/cdecimal/default.nix | 4 +-- .../python-modules/cffi/default.nix | 6 ++--- .../python-modules/cheetah3/default.nix | 8 +++--- .../python-modules/cherrypy/17.nix | 2 +- .../python-modules/cherrypy/default.nix | 2 +- .../python-modules/cld2-cffi/default.nix | 2 +- .../python-modules/cmd2/default.nix | 6 ++--- .../python-modules/codecov/default.nix | 6 ++--- .../python-modules/colorlover/default.nix | 10 ++++--- .../python-modules/construct/default.nix | 2 +- .../python-modules/cot/default.nix | 2 +- .../python-modules/cryptography/3.3.nix | 8 +++--- .../python-modules/cryptography/default.nix | 8 +++--- .../python-modules/csscompressor/default.nix | 7 ++--- .../python-modules/curtsies/default.nix | 2 +- .../python-modules/dbf/default.nix | 2 +- .../python-modules/demjson/default.nix | 2 +- .../django-polymorphic/default.nix | 6 ++--- .../python-modules/django-raster/default.nix | 2 +- pkgs/development/python-modules/django/2.nix | 2 +- pkgs/development/python-modules/django/3.nix | 2 +- .../python-modules/dufte/default.nix | 2 +- .../python-modules/easydict/default.nix | 6 ++--- .../elasticsearch-dsl/default.nix | 2 +- .../python-modules/enzyme/default.nix | 6 ++--- .../python-modules/etebase/default.nix | 2 +- .../python-modules/fasteners/default.nix | 2 +- .../python-modules/fire/default.nix | 2 +- .../python-modules/flake8/default.nix | 8 +++--- .../python-modules/flask-migrate/default.nix | 10 +++---- .../python-modules/flask-testing/default.nix | 2 +- .../python-modules/flatbuffers/default.nix | 4 +-- .../python-modules/funcsigs/default.nix | 2 +- .../python-modules/gevent/default.nix | 2 +- .../python-modules/glymur/default.nix | 2 +- .../python-modules/goocalendar/default.nix | 4 +-- .../python-modules/grpcio/default.nix | 6 ++--- .../python-modules/gst-python/default.nix | 9 +++---- .../python-modules/gumath/default.nix | 5 ++-- .../python-modules/gyp/default.nix | 2 +- .../python-modules/h5py/default.nix | 21 +++++++-------- .../python-modules/hg-evolve/default.nix | 4 +-- .../python-modules/hg-git/default.nix | 4 +-- .../python-modules/hidapi/default.nix | 8 +++--- .../python-modules/hoomd-blue/default.nix | 4 +-- .../python-modules/htmlmin/default.nix | 7 ++--- .../python-modules/httpretty/0.nix | 6 ++--- .../python-modules/httpretty/default.nix | 6 ++--- .../python-modules/hupper/default.nix | 4 +-- .../python-modules/imageio/default.nix | 2 +- .../python-modules/influxgraph/default.nix | 2 +- pkgs/development/python-modules/ipython/5.nix | 2 +- .../johnnycanencrypt/default.nix | 7 ++--- .../json-schema-for-humans/default.nix | 4 +-- .../python-modules/jsonpointer/default.nix | 4 +-- pkgs/development/python-modules/keyring/2.nix | 2 +- .../python-modules/keyrings-alt/default.nix | 2 +- .../python-modules/kiwisolver/1_1.nix | 2 +- .../python-modules/kiwisolver/default.nix | 2 +- .../python-modules/koji/default.nix | 8 +++--- .../python-modules/latexcodec/default.nix | 6 ++--- .../python-modules/ledgerwallet/default.nix | 2 +- .../python-modules/libevdev/default.nix | 4 +-- .../python-modules/libgpuarray/default.nix | 2 +- .../python-modules/lightgbm/default.nix | 4 +-- .../python-modules/linode-api/default.nix | 4 +-- .../python-modules/livestreamer/default.nix | 2 +- .../python-modules/llfuse/default.nix | 14 +++++----- .../python-modules/llvmlite/default.nix | 13 ++++----- .../python-modules/loguru/default.nix | 4 +-- .../python-modules/maestral/default.nix | 8 +++--- .../python-modules/magic-wormhole/default.nix | 2 +- .../python-modules/mailman-rss/default.nix | 2 +- .../markdownsuperscript/default.nix | 6 ++--- .../python-modules/matplotlib/2.nix | 19 +++++++------ .../python-modules/matplotlib/default.nix | 15 +++++------ .../python-modules/mezzanine/default.nix | 4 +-- .../python-modules/mockito/default.nix | 2 +- .../python-modules/modestmaps/default.nix | 2 +- .../python-modules/monotonic/default.nix | 4 +-- .../python-modules/moviepy/default.nix | 2 +- .../python-modules/mpi4py/default.nix | 9 +++---- .../python-modules/mxnet/default.nix | 4 +-- .../python-modules/ndtypes/default.nix | 5 ++-- .../python-modules/netaddr/default.nix | 2 +- .../python-modules/nipy/default.nix | 2 +- .../python-modules/notify/default.nix | 2 +- .../python-modules/nuitka/default.nix | 2 +- .../python-modules/numba/default.nix | 13 ++++----- .../python-modules/omegaconf/default.nix | 2 +- .../orderedmultidict/default.nix | 2 +- .../python-modules/oset/default.nix | 6 ++--- .../python-modules/pamela/default.nix | 4 +-- pkgs/development/python-modules/pandas/2.nix | 27 +++++++++---------- .../python-modules/pandas/default.nix | 18 +++++-------- .../python-modules/parse-type/default.nix | 2 +- .../python-modules/pbr/default.nix | 6 ++--- .../python-modules/pecan/default.nix | 2 +- .../python-modules/peewee/default.nix | 6 +++-- .../python-modules/pgsanity/default.nix | 4 +-- .../python-modules/phonenumbers/default.nix | 8 +++--- .../python-modules/pickleshare/default.nix | 2 +- pkgs/development/python-modules/pillow/6.nix | 6 ++--- .../python-modules/pillow/default.nix | 6 ++--- .../python-modules/pip-tools/default.nix | 4 +-- .../python-modules/plyvel/default.nix | 2 +- .../python-modules/protobuf/default.nix | 23 ++++++++-------- .../python-modules/pulp/default.nix | 2 +- .../python-modules/pwntools/default.nix | 2 +- .../python-modules/py3exiv2/default.nix | 12 ++++----- .../python-modules/pyannotate/default.nix | 2 +- .../python-modules/pyatspi/default.nix | 4 +-- .../pybtex-docutils/default.nix | 6 ++--- .../python-modules/pybtex/default.nix | 6 ++--- .../python-modules/pycassa/default.nix | 6 ++--- .../python-modules/pycdio/default.nix | 2 +- .../python-modules/pycryptodome/default.nix | 6 ++--- .../python-modules/pycuda/default.nix | 4 +-- .../python-modules/pydub/default.nix | 2 +- .../python-modules/pyee/default.nix | 2 +- .../python-modules/pyexiv2/default.nix | 6 ++--- .../python-modules/pyface/default.nix | 4 +-- .../python-modules/pyfakefs/default.nix | 2 +- .../python-modules/pyfribidi/default.nix | 7 ++--- .../python-modules/pygal/default.nix | 2 +- .../python-modules/pygobject/3.36.nix | 4 +-- .../python-modules/pygobject/3.nix | 4 +-- .../python-modules/pygobject/default.nix | 10 +++---- .../python-modules/pygtk/default.nix | 8 +++--- .../python-modules/pync/default.nix | 2 +- .../python-modules/pynput/default.nix | 2 +- .../python-modules/pyobjc/default.nix | 8 +++--- .../python-modules/pyopenssl/default.nix | 17 +++++------- .../python-modules/pyparted/default.nix | 2 +- .../python-modules/pypass/default.nix | 16 +++++------ pkgs/development/python-modules/pyqt/4.x.nix | 14 +++++----- .../python-modules/pyscard/default.nix | 17 +++++------- .../python-modules/pyscss/default.nix | 4 +-- .../python-modules/pyside/apiextractor.nix | 8 +++--- .../python-modules/pyside/generatorrunner.nix | 8 +++--- .../python-modules/pyspotify/default.nix | 2 +- .../python-modules/pysqlite/default.nix | 2 +- .../python-modules/pytest-asyncio/default.nix | 2 +- pkgs/development/python-modules/pytest/4.nix | 4 +-- pkgs/development/python-modules/pytest/5.nix | 2 +- .../python-modules/pytest/default.nix | 2 +- .../python-engineio/default.nix | 2 +- .../python-jsonrpc-server/default.nix | 2 +- .../python-language-server/default.nix | 22 +++++++-------- .../python-modules/python-mapnik/default.nix | 2 +- .../python-redis-lock/default.nix | 2 +- .../python-xmp-toolkit/default.nix | 2 +- .../python-modules/pythonocc-core/default.nix | 2 +- .../python-modules/pytorch/bin.nix | 2 +- .../python-modules/pytorch/default.nix | 2 +- .../python-modules/pyutil/default.nix | 2 +- .../python-modules/rbtools/default.nix | 4 +-- .../python-modules/reikna/default.nix | 12 ++++----- .../python-modules/rfc6555/default.nix | 8 +++--- .../python-modules/rich/default.nix | 2 +- pkgs/development/python-modules/rsa/4_0.nix | 2 +- .../python-modules/rsa/default.nix | 2 +- .../python-modules/s3transfer/default.nix | 8 +++--- .../python-modules/scrapy/default.nix | 2 +- .../python-modules/screeninfo/default.nix | 2 +- .../python-modules/selenium/default.nix | 2 +- .../python-modules/sentry-sdk/default.nix | 2 +- .../python-modules/shapely/default.nix | 2 +- .../python-modules/simplebayes/default.nix | 2 +- .../python-modules/spacy/models.nix | 6 ++--- .../python-modules/stringtemplate/default.nix | 6 ++--- .../development/python-modules/tables/3.5.nix | 16 +++++------ .../python-modules/tables/default.nix | 16 +++++------ .../python-modules/tatsu/default.nix | 4 +-- .../python-modules/tensorflow/bin.nix | 2 +- .../python-modules/tkinter/default.nix | 5 ++-- .../python-modules/todoist/default.nix | 10 +++---- .../python-modules/trackpy/default.nix | 2 +- .../python-modules/transformers/default.nix | 2 +- .../python-modules/trytond/default.nix | 8 +++--- .../python-modules/tumpa/default.nix | 4 +-- .../python-modules/twisted/default.nix | 2 +- .../python-modules/unicorn/default.nix | 2 +- .../python-modules/urllib3/default.nix | 4 +-- .../python-modules/watchdog/default.nix | 2 +- .../python-modules/werkzeug/default.nix | 2 +- .../python-modules/xcffib/default.nix | 2 +- .../python-modules/xnd/default.nix | 5 ++-- .../python-modules/zconfig/default.nix | 2 +- .../zope_lifecycleevent/default.nix | 2 +- 211 files changed, 525 insertions(+), 546 deletions(-) diff --git a/pkgs/development/python-modules/Cython/default.nix b/pkgs/development/python-modules/Cython/default.nix index 84f54fd7af62..64f5bb3ab656 100644 --- a/pkgs/development/python-modules/Cython/default.nix +++ b/pkgs/development/python-modules/Cython/default.nix @@ -16,12 +16,12 @@ let ++ [ "reimport_from_subinterpreter" ] # cython's testsuite is not working very well with libc++ # We are however optimistic about things outside of testsuite still working - ++ stdenv.lib.optionals (stdenv.cc.isClang or false) [ "cpdef_extern_func" "libcpp_algo" ] + ++ lib.optionals (stdenv.cc.isClang or false) [ "cpdef_extern_func" "libcpp_algo" ] # Some tests in the test suite isn't working on aarch64. Disable them for # now until upstream finds a workaround. # Upstream issue here: https://github.com/cython/cython/issues/2308 - ++ stdenv.lib.optionals stdenv.isAarch64 [ "numpy_memoryview" ] - ++ stdenv.lib.optionals stdenv.isi686 [ "future_division" "overflow_check_longlong" ] + ++ lib.optionals stdenv.isAarch64 [ "numpy_memoryview" ] + ++ lib.optionals stdenv.isi686 [ "future_division" "overflow_check_longlong" ] ; in buildPythonPackage rec { @@ -55,7 +55,7 @@ in buildPythonPackage rec { export HOME="$NIX_BUILD_TOP" ${python.interpreter} runtests.py -j$NIX_BUILD_CORES \ --no-code-style \ - ${stdenv.lib.optionalString (builtins.length excludedTests != 0) + ${lib.optionalString (builtins.length excludedTests != 0) ''--exclude="(${builtins.concatStringsSep "|" excludedTests})"''} ''; diff --git a/pkgs/development/python-modules/HTSeq/default.nix b/pkgs/development/python-modules/HTSeq/default.nix index 178b6a7b85cd..be4bb9e31d32 100644 --- a/pkgs/development/python-modules/HTSeq/default.nix +++ b/pkgs/development/python-modules/HTSeq/default.nix @@ -13,9 +13,9 @@ buildPythonPackage rec { nativeBuildInputs = [ cython ]; propagatedBuildInputs = [ numpy pysam matplotlib ]; - checkPhase = stdenv.lib.optionalString isPy27 '' + checkPhase = lib.optionalString isPy27 '' ${python.interpreter} python2/test/test_general.py - '' + stdenv.lib.optionalString isPy3k '' + '' + lib.optionalString isPy3k '' ${python.interpreter} python3/test/test_general.py ''; diff --git a/pkgs/development/python-modules/Theano/default.nix b/pkgs/development/python-modules/Theano/default.nix index c2dd7460b133..e279100e9cc6 100644 --- a/pkgs/development/python-modules/Theano/default.nix +++ b/pkgs/development/python-modules/Theano/default.nix @@ -40,8 +40,8 @@ let if stdenv.cc.isClang then "clang++" else throw "Unknown C++ compiler"; cxx_compiler = wrapped cxx_compiler_name "\\$HOME/.theano" - ( stdenv.lib.optional cudaSupport libgpuarray_ - ++ stdenv.lib.optional cudnnSupport cudnn ); + ( lib.optional cudaSupport libgpuarray_ + ++ lib.optional cudnnSupport cudnn ); libgpuarray_ = libgpuarray.override { inherit cudaSupport cudatoolkit; }; @@ -60,10 +60,10 @@ in buildPythonPackage rec { substituteInPlace theano/configdefaults.py \ --replace 'StrParam(param, is_valid=warn_cxx)' 'StrParam('\'''${cxx_compiler}'\''', is_valid=warn_cxx)' \ --replace 'rc == 0 and config.cxx != ""' 'config.cxx != ""' - '' + stdenv.lib.optionalString cudaSupport '' + '' + lib.optionalString cudaSupport '' substituteInPlace theano/configdefaults.py \ --replace 'StrParam(get_cuda_root)' 'StrParam('\'''${cudatoolkit}'\''')' - '' + stdenv.lib.optionalString cudnnSupport '' + '' + lib.optionalString cudnnSupport '' substituteInPlace theano/configdefaults.py \ --replace 'StrParam(default_dnn_base_path)' 'StrParam('\'''${cudnn}'\''')' ''; diff --git a/pkgs/development/python-modules/aenum/default.nix b/pkgs/development/python-modules/aenum/default.nix index 32b26a5e0355..f21d8f4195a4 100644 --- a/pkgs/development/python-modules/aenum/default.nix +++ b/pkgs/development/python-modules/aenum/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchPypi, buildPythonPackage, python, isPy3k, glibcLocales }: +{ lib, stdenv, fetchPypi, buildPythonPackage, python, isPy3k, glibcLocales }: buildPythonPackage rec { pname = "aenum"; @@ -22,10 +22,10 @@ buildPythonPackage rec { runHook postCheck ''; - meta = { + meta = with lib; { description = "Advanced Enumerations (compatible with Python's stdlib Enum), NamedTuples, and NamedConstants"; - maintainers = with stdenv.lib.maintainers; [ vrthra ]; - license = with stdenv.lib.licenses; [ bsd3 ]; + maintainers = with maintainers; [ vrthra ]; + license = licenses.bsd3; homepage = "https://github.com/ethanfurman/aenum"; }; } diff --git a/pkgs/development/python-modules/aiodns/default.nix b/pkgs/development/python-modules/aiodns/default.nix index e1130331365c..4ba4bd59af27 100644 --- a/pkgs/development/python-modules/aiodns/default.nix +++ b/pkgs/development/python-modules/aiodns/default.nix @@ -10,9 +10,9 @@ buildPythonPackage rec { sha256 = "815fdef4607474295d68da46978a54481dd1e7be153c7d60f9e72773cd38d77d"; }; - propagatedBuildInputs = with stdenv.lib; [ pycares ] - ++ optional (pythonOlder "3.7") typing - ++ optional (isPy27 || isPyPy) trollius; + propagatedBuildInputs = [ pycares ] + ++ lib.optional (pythonOlder "3.7") typing + ++ lib.optional (isPy27 || isPyPy) trollius; checkPhase = '' ${python.interpreter} tests.py diff --git a/pkgs/development/python-modules/aioredis/default.nix b/pkgs/development/python-modules/aioredis/default.nix index 2e59168157be..94f503fe2cc3 100644 --- a/pkgs/development/python-modules/aioredis/default.nix +++ b/pkgs/development/python-modules/aioredis/default.nix @@ -15,7 +15,7 @@ buildPythonPackage rec { propagatedBuildInputs = [ async-timeout - ] ++ stdenv.lib.optional (!isPyPy) hiredis; + ] ++ lib.optional (!isPyPy) hiredis; # Wants to run redis-server, hardcoded FHS paths, too much trouble. doCheck = false; diff --git a/pkgs/development/python-modules/altair/default.nix b/pkgs/development/python-modules/altair/default.nix index 018ac7ddf501..a3b515ebeca8 100644 --- a/pkgs/development/python-modules/altair/default.nix +++ b/pkgs/development/python-modules/altair/default.nix @@ -33,7 +33,7 @@ buildPythonPackage rec { pandas six toolz - ] ++ stdenv.lib.optionals (pythonOlder "3.5") [ typing ]; + ] ++ lib.optionals (pythonOlder "3.5") [ typing ]; checkInputs = [ glibcLocales diff --git a/pkgs/development/python-modules/aniso8601/default.nix b/pkgs/development/python-modules/aniso8601/default.nix index c6c05283f280..804402a4ca67 100644 --- a/pkgs/development/python-modules/aniso8601/default.nix +++ b/pkgs/development/python-modules/aniso8601/default.nix @@ -13,7 +13,7 @@ buildPythonPackage rec { propagatedBuildInputs = [ dateutil ]; - checkInputs = stdenv.lib.optional (!isPy3k) mock; + checkInputs = lib.optional (!isPy3k) mock; src = fetchPypi { inherit pname version; diff --git a/pkgs/development/python-modules/apipkg/default.nix b/pkgs/development/python-modules/apipkg/default.nix index 88535bb7cf1e..604c37b42ba1 100644 --- a/pkgs/development/python-modules/apipkg/default.nix +++ b/pkgs/development/python-modules/apipkg/default.nix @@ -22,13 +22,13 @@ buildPythonPackage rec { # Failing tests on Python 3 # https://github.com/pytest-dev/apipkg/issues/17 checkPhase = let - disabledTests = stdenv.lib.optionals isPy3k [ + disabledTests = lib.optionals isPy3k [ "test_error_loading_one_element" "test_aliasmodule_proxy_methods" "test_eagerload_on_bython" ]; - testExpression = stdenv.lib.optionalString (disabledTests != []) - "-k 'not ${stdenv.lib.concatStringsSep " and not " disabledTests}'"; + testExpression = lib.optionalString (disabledTests != []) + "-k 'not ${lib.concatStringsSep " and not " disabledTests}'"; in '' py.test ${testExpression} ''; diff --git a/pkgs/development/python-modules/avro/default.nix b/pkgs/development/python-modules/avro/default.nix index 6f7b8b9c6c1d..35cab724a862 100644 --- a/pkgs/development/python-modules/avro/default.nix +++ b/pkgs/development/python-modules/avro/default.nix @@ -12,7 +12,7 @@ buildPythonPackage rec { patchPhase = '' # this test requires network access sed -i 's/test_server_with_path/noop/' avro/test/test_ipc.py - '' + (stdenv.lib.optionalString isPy3k '' + '' + (lib.optionalString isPy3k '' # these files require twisted, which is not python3 compatible rm avro/txipc.py rm avro/test/txsample* diff --git a/pkgs/development/python-modules/bcrypt/default.nix b/pkgs/development/python-modules/bcrypt/default.nix index dc50c56018e0..e74b0934b308 100644 --- a/pkgs/development/python-modules/bcrypt/default.nix +++ b/pkgs/development/python-modules/bcrypt/default.nix @@ -1,8 +1,6 @@ -{ stdenv, buildPythonPackage, isPyPy, fetchPypi, pythonOlder +{ lib, stdenv, buildPythonPackage, isPyPy, fetchPypi, pythonOlder , cffi, pycparser, mock, pytest, py, six }: -with stdenv.lib; - buildPythonPackage rec { version = "3.2.0"; pname = "bcrypt"; @@ -12,10 +10,12 @@ buildPythonPackage rec { inherit pname version; sha256 = "5b93c1726e50a93a033c36e5ca7fdcd29a5c7395af50a6892f5d9e7c6cfbfb29"; }; - buildInputs = [ pycparser mock pytest py ]; - propagatedBuildInputs = [ six ] ++ optional (!isPyPy) cffi; - meta = { + buildInputs = [ pycparser mock pytest py ]; + + propagatedBuildInputs = [ six ] ++ lib.optional (!isPyPy) cffi; + + meta = with lib; { maintainers = with maintainers; [ domenkozar ]; description = "Modern password hashing for your software and your servers"; license = licenses.asl20; diff --git a/pkgs/development/python-modules/beancount/default.nix b/pkgs/development/python-modules/beancount/default.nix index f1dc7a5349d9..fa97c7c97a94 100644 --- a/pkgs/development/python-modules/beancount/default.nix +++ b/pkgs/development/python-modules/beancount/default.nix @@ -1,4 +1,4 @@ -{ stdenv, buildPythonPackage, fetchPypi, isPy3k +{ lib, stdenv, buildPythonPackage, fetchPypi, isPy3k , beautifulsoup4, bottle, chardet, dateutil , google_api_python_client, lxml, oauth2client , ply, python_magic, pytest, requests }: @@ -33,7 +33,7 @@ buildPythonPackage rec { pytest ]; - meta = { + meta = with lib; { homepage = "http://furius.ca/beancount/"; description = "Double-entry bookkeeping computer language"; longDescription = '' @@ -41,8 +41,8 @@ buildPythonPackage rec { financial transaction records in a text file, read them in memory, generate a variety of reports from them, and provides a web interface. ''; - license = stdenv.lib.licenses.gpl2; - maintainers = with stdenv.lib.maintainers; [ ]; + license = licenses.gpl2; + maintainers = with maintainers; [ ]; }; } diff --git a/pkgs/development/python-modules/beanstalkc/default.nix b/pkgs/development/python-modules/beanstalkc/default.nix index c24e9a03d158..a74f6c6f8f28 100644 --- a/pkgs/development/python-modules/beanstalkc/default.nix +++ b/pkgs/development/python-modules/beanstalkc/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, buildPythonPackage }: +{ lib, stdenv, fetchFromGitHub, buildPythonPackage }: buildPythonPackage rec { pname = "beanstalkc"; @@ -13,10 +13,10 @@ buildPythonPackage rec { doCheck = false; - meta = { + meta = with lib; { description = "A simple beanstalkd client library for Python"; - maintainers = with stdenv.lib.maintainers; [ aanderse ]; - license = with stdenv.lib.licenses; [ asl20 ]; + maintainers = with maintainers; [ aanderse ]; + license = licenses.asl20; homepage = "https://github.com/earl/beanstalkc"; }; } diff --git a/pkgs/development/python-modules/bedup/default.nix b/pkgs/development/python-modules/bedup/default.nix index 0e339dca0973..f38d4263c248 100644 --- a/pkgs/development/python-modules/bedup/default.nix +++ b/pkgs/development/python-modules/bedup/default.nix @@ -25,7 +25,7 @@ buildPythonPackage rec { buildInputs = [ btrfs-progs ]; propagatedBuildInputs = [ contextlib2 pyxdg pycparser alembic ] - ++ stdenv.lib.optionals (!isPyPy) [ cffi ]; + ++ lib.optionals (!isPyPy) [ cffi ]; meta = with lib; { description = "Deduplication for Btrfs"; diff --git a/pkgs/development/python-modules/behave/default.nix b/pkgs/development/python-modules/behave/default.nix index 56217dca617d..43c74fc95716 100644 --- a/pkgs/development/python-modules/behave/default.nix +++ b/pkgs/development/python-modules/behave/default.nix @@ -26,7 +26,7 @@ buildPythonApplication rec { # timing-based test flaky on Darwin # https://github.com/NixOS/nixpkgs/pull/97737#issuecomment-691489824 - disabledTests = stdenv.lib.optionals stdenv.isDarwin [ "test_step_decorator_async_run_until_complete" ]; + disabledTests = lib.optionals stdenv.isDarwin [ "test_step_decorator_async_run_until_complete" ]; postCheck = '' export LANG="en_US.UTF-8" diff --git a/pkgs/development/python-modules/binwalk/default.nix b/pkgs/development/python-modules/binwalk/default.nix index 3d1b9c0a90c4..c2f059dd93dc 100644 --- a/pkgs/development/python-modules/binwalk/default.nix +++ b/pkgs/development/python-modules/binwalk/default.nix @@ -35,7 +35,7 @@ buildPythonPackage { }; propagatedBuildInputs = [ zlib xz ncompress gzip bzip2 gnutar p7zip cabextract cramfsswap cramfsprogs sasquatch squashfsTools lzma pycrypto ] - ++ stdenv.lib.optionals visualizationSupport [ matplotlib pyqtgraph ]; + ++ lib.optionals visualizationSupport [ matplotlib pyqtgraph ]; # setup.py only installs version.py during install, not test postPatch = '' diff --git a/pkgs/development/python-modules/bootstrapped-pip/default.nix b/pkgs/development/python-modules/bootstrapped-pip/default.nix index 690c88b83f43..5a6333d656af 100644 --- a/pkgs/development/python-modules/bootstrapped-pip/default.nix +++ b/pkgs/development/python-modules/bootstrapped-pip/default.nix @@ -1,4 +1,4 @@ -{ stdenv, python, fetchPypi, makeWrapper, unzip, makeSetupHook +{ lib, stdenv, python, fetchPypi, makeWrapper, unzip, makeSetupHook , pipInstallHook , setuptoolsBuildHook , wheel, pip, setuptools @@ -32,7 +32,7 @@ stdenv.mkDerivation rec { buildPhase = ":"; - installPhase = stdenv.lib.strings.optionalString (!stdenv.hostPlatform.isWindows) '' + installPhase = lib.strings.optionalString (!stdenv.hostPlatform.isWindows) '' export SETUPTOOLS_INSTALL_WINDOWS_SPECIFIC_FILES=0 '' + '' # Give folders a known name @@ -61,7 +61,7 @@ stdenv.mkDerivation rec { meta = { description = "Version of pip used for bootstrapping"; - license = stdenv.lib.unique (pip.meta.license ++ setuptools.meta.license ++ wheel.meta.license); + license = lib.unique (pip.meta.license ++ setuptools.meta.license ++ wheel.meta.license); homepage = pip.meta.homepage; }; } diff --git a/pkgs/development/python-modules/buildout-nix/default.nix b/pkgs/development/python-modules/buildout-nix/default.nix index cf8b13823015..7f7afd67e7e0 100644 --- a/pkgs/development/python-modules/buildout-nix/default.nix +++ b/pkgs/development/python-modules/buildout-nix/default.nix @@ -1,4 +1,4 @@ -{ fetchPypi, stdenv, buildPythonPackage }: +{ lib, buildPythonPackage, fetchPypi }: buildPythonPackage rec { pname = "zc.buildout"; @@ -13,10 +13,10 @@ buildPythonPackage rec { postInstall = "mv $out/bin/buildout{,-nix}"; - meta = { + meta = with lib; { homepage = "http://www.buildout.org"; description = "A software build and configuration system"; - license = stdenv.lib.licenses.zpl21; - maintainers = [ stdenv.lib.maintainers.goibhniu ]; + license = licenses.zpl21; + maintainers = [ maintainers.goibhniu ]; }; } diff --git a/pkgs/development/python-modules/cadquery/default.nix b/pkgs/development/python-modules/cadquery/default.nix index e1566baff6b6..72334390bc3e 100644 --- a/pkgs/development/python-modules/cadquery/default.nix +++ b/pkgs/development/python-modules/cadquery/default.nix @@ -48,7 +48,7 @@ let libGL libGLU libX11 - ] ++ stdenv.lib.optionals stdenv.isDarwin [ Cocoa ]; + ] ++ lib.optionals stdenv.isDarwin [ Cocoa ]; propagatedBuildInputs = [ six diff --git a/pkgs/development/python-modules/capstone/default.nix b/pkgs/development/python-modules/capstone/default.nix index 7d5e416a9c5d..d7df0bee5ca9 100644 --- a/pkgs/development/python-modules/capstone/default.nix +++ b/pkgs/development/python-modules/capstone/default.nix @@ -8,7 +8,7 @@ buildPythonPackage rec { pname = "capstone"; - version = stdenv.lib.getVersion capstone; + version = lib.getVersion capstone; src = capstone.src; sourceRoot = "${capstone.name}/bindings/python"; diff --git a/pkgs/development/python-modules/cddb/default.nix b/pkgs/development/python-modules/cddb/default.nix index 0956a971ebd8..55d659376c61 100644 --- a/pkgs/development/python-modules/cddb/default.nix +++ b/pkgs/development/python-modules/cddb/default.nix @@ -9,7 +9,7 @@ buildPythonPackage rec { version = "1.4"; disabled = isPy3k; - buildInputs = stdenv.lib.optionals stdenv.isDarwin [ pkgs.darwin.apple_sdk.frameworks.IOKit ]; + buildInputs = lib.optionals stdenv.isDarwin [ pkgs.darwin.apple_sdk.frameworks.IOKit ]; src = pkgs.fetchurl { url = "http://cddb-py.sourceforge.net/${pname}-${version}.tar.gz"; diff --git a/pkgs/development/python-modules/cdecimal/default.nix b/pkgs/development/python-modules/cdecimal/default.nix index f788d32520e1..cf8890505904 100644 --- a/pkgs/development/python-modules/cdecimal/default.nix +++ b/pkgs/development/python-modules/cdecimal/default.nix @@ -1,6 +1,4 @@ -{ lib, stdenv, fetchurl, buildPythonPackage, isPy3k }: - -with stdenv.lib; +{ lib, buildPythonPackage, fetchurl, isPy3k }: buildPythonPackage rec { pname = "cdecimal"; diff --git a/pkgs/development/python-modules/cffi/default.nix b/pkgs/development/python-modules/cffi/default.nix index 55390ea5ff94..3dcd6a996cb9 100644 --- a/pkgs/development/python-modules/cffi/default.nix +++ b/pkgs/development/python-modules/cffi/default.nix @@ -17,7 +17,7 @@ if isPyPy then null else buildPythonPackage rec { # On Darwin, the cffi tests want to hit libm a lot, and look for it in a global # impure search path. It's obnoxious how much repetition there is, and how difficult # it is to get it to search somewhere else (since we do actually have a libm symlink in libSystem) - prePatch = stdenv.lib.optionalString stdenv.isDarwin '' + prePatch = lib.optionalString stdenv.isDarwin '' substituteInPlace testing/cffi0/test_parsing.py \ --replace 'lib_m = "m"' 'lib_m = "System"' \ --replace '"libm" in name' '"libSystem" in name' @@ -29,7 +29,7 @@ if isPyPy then null else buildPythonPackage rec { ''; # The tests use -Werror but with python3.6 clang detects some unreachable code. - NIX_CFLAGS_COMPILE = stdenv.lib.optionalString stdenv.cc.isClang + NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang "-Wno-unused-command-line-argument -Wno-unreachable-code"; doCheck = !stdenv.hostPlatform.isMusl && !stdenv.isDarwin; # TODO: Investigate @@ -40,7 +40,7 @@ if isPyPy then null else buildPythonPackage rec { meta = with lib; { maintainers = with maintainers; [ domenkozar lnl7 ]; homepage = "https://cffi.readthedocs.org/"; - license = with licenses; [ mit ]; + license = licenses.mit; description = "Foreign Function Interface for Python calling C code"; }; } diff --git a/pkgs/development/python-modules/cheetah3/default.nix b/pkgs/development/python-modules/cheetah3/default.nix index e4fd549445ad..a705bffa810a 100644 --- a/pkgs/development/python-modules/cheetah3/default.nix +++ b/pkgs/development/python-modules/cheetah3/default.nix @@ -1,4 +1,4 @@ -{ lib, buildPythonPackage, fetchPypi, stdenv }: +{ lib, buildPythonPackage, fetchPypi }: buildPythonPackage rec { pname = "Cheetah3"; @@ -11,10 +11,10 @@ buildPythonPackage rec { doCheck = false; # Circular dependency - meta = { + meta = with lib; { homepage = "http://www.cheetahtemplate.org/"; description = "A template engine and code generation tool"; - license = lib.licenses.mit; - maintainers = with stdenv.lib.maintainers; [ pjjw ]; + license = licenses.mit; + maintainers = with maintainers; [ pjjw ]; }; } diff --git a/pkgs/development/python-modules/cherrypy/17.nix b/pkgs/development/python-modules/cherrypy/17.nix index 9982db19f381..2ee8eb3bd0ca 100644 --- a/pkgs/development/python-modules/cherrypy/17.nix +++ b/pkgs/development/python-modules/cherrypy/17.nix @@ -25,7 +25,7 @@ buildPythonPackage rec { ]; checkPhase = '' - pytest ${stdenv.lib.optionalString stdenv.isDarwin "--ignore=cherrypy/test/test_wsgi_unix_socket.py"} + pytest ${lib.optionalString stdenv.isDarwin "--ignore=cherrypy/test/test_wsgi_unix_socket.py"} ''; meta = with lib; { diff --git a/pkgs/development/python-modules/cherrypy/default.nix b/pkgs/development/python-modules/cherrypy/default.nix index 76fd780e5231..8a915d520e5c 100644 --- a/pkgs/development/python-modules/cherrypy/default.nix +++ b/pkgs/development/python-modules/cherrypy/default.nix @@ -41,7 +41,7 @@ buildPythonPackage rec { -k 'not KeyboardInterrupt and not daemonize and not Autoreload' \ --deselect=cherrypy/test/test_static.py::StaticTest::test_null_bytes \ --deselect=cherrypy/test/test_tools.py::ToolTests::testCombinedTools \ - ${stdenv.lib.optionalString stdenv.isDarwin + ${lib.optionalString stdenv.isDarwin "--deselect=cherrypy/test/test_bus.py::BusMethodTests::test_block"} ''; diff --git a/pkgs/development/python-modules/cld2-cffi/default.nix b/pkgs/development/python-modules/cld2-cffi/default.nix index df28bcdf3aa7..fc5a6b0e54bc 100644 --- a/pkgs/development/python-modules/cld2-cffi/default.nix +++ b/pkgs/development/python-modules/cld2-cffi/default.nix @@ -13,7 +13,7 @@ buildPythonPackage rec { checkInputs = [ nose ]; # gcc doesn't approve of this code, so disable -Werror - NIX_CFLAGS_COMPILE = "-w" + stdenv.lib.optionalString stdenv.cc.isClang " -Wno-error=c++11-narrowing"; + NIX_CFLAGS_COMPILE = "-w" + lib.optionalString stdenv.cc.isClang " -Wno-error=c++11-narrowing"; checkPhase = "nosetests -v"; diff --git a/pkgs/development/python-modules/cmd2/default.nix b/pkgs/development/python-modules/cmd2/default.nix index be4e64f760ee..bafdb9cb95da 100644 --- a/pkgs/development/python-modules/cmd2/default.nix +++ b/pkgs/development/python-modules/cmd2/default.nix @@ -15,7 +15,7 @@ buildPythonPackage rec { LC_ALL="en_US.UTF-8"; - postPatch = stdenv.lib.optional stdenv.isDarwin '' + postPatch = lib.optional stdenv.isDarwin '' # Fake the impure dependencies pbpaste and pbcopy mkdir bin echo '#!${stdenv.shell}' > bin/pbpaste @@ -38,7 +38,7 @@ buildPythonPackage rec { wcwidth attrs ] - ++ stdenv.lib.optionals (pythonOlder "3.5") [contextlib2 typing] + ++ lib.optionals (pythonOlder "3.5") [contextlib2 typing] ; @@ -46,7 +46,7 @@ buildPythonPackage rec { # pytest-cov # argcomplete will generate errors checkInputs= [ pytest mock which vim glibcLocales pytest-mock ] - ++ stdenv.lib.optional (pythonOlder "3.6") [ mock ]; + ++ lib.optional (pythonOlder "3.6") [ mock ]; checkPhase = '' # test_path_completion_user_expansion might be fixed in the next release py.test -k 'not test_path_completion_user_expansion' diff --git a/pkgs/development/python-modules/codecov/default.nix b/pkgs/development/python-modules/codecov/default.nix index 455888c447da..924422bf7d4f 100644 --- a/pkgs/development/python-modules/codecov/default.nix +++ b/pkgs/development/python-modules/codecov/default.nix @@ -1,4 +1,4 @@ -{ stdenv, buildPythonPackage, fetchPypi, requests, coverage, unittest2 }: +{ lib, buildPythonPackage, fetchPypi, requests, coverage, unittest2 }: buildPythonPackage rec { pname = "codecov"; @@ -20,9 +20,9 @@ buildPythonPackage rec { # No tests in archive doCheck = false; - meta = { + meta = with lib; { description = "Python report uploader for Codecov"; homepage = "https://codecov.io/"; - license = stdenv.lib.licenses.asl20; + license = licenses.asl20; }; } diff --git a/pkgs/development/python-modules/colorlover/default.nix b/pkgs/development/python-modules/colorlover/default.nix index 6aea26e89366..70dd66e8f813 100644 --- a/pkgs/development/python-modules/colorlover/default.nix +++ b/pkgs/development/python-modules/colorlover/default.nix @@ -1,4 +1,6 @@ -{ buildPythonPackage, fetchPypi, stdenv +{ lib +, buildPythonPackage +, fetchPypi }: buildPythonPackage rec { @@ -13,10 +15,10 @@ buildPythonPackage rec { # no tests included in distributed archive doCheck = false; - meta = { + meta = with lib; { homepage = "https://github.com/jackparmer/colorlover"; description = "Color scales in Python for humans"; - license = stdenv.lib.licenses.mit; - maintainers = with stdenv.lib.maintainers; [ globin ]; + license = licenses.mit; + maintainers = with maintainers; [ globin ]; }; } diff --git a/pkgs/development/python-modules/construct/default.nix b/pkgs/development/python-modules/construct/default.nix index bb334f11c756..8d0c83ca9e8e 100644 --- a/pkgs/development/python-modules/construct/default.nix +++ b/pkgs/development/python-modules/construct/default.nix @@ -18,7 +18,7 @@ buildPythonPackage rec { checkInputs = [ pytestCheckHook pytest-benchmark numpy arrow ruamel_yaml ]; - disabledTests = stdenv.lib.optionals stdenv.isDarwin [ "test_multiprocessing" ]; + disabledTests = lib.optionals stdenv.isDarwin [ "test_multiprocessing" ]; pytestFlagsArray = [ "--benchmark-disable" ]; diff --git a/pkgs/development/python-modules/cot/default.nix b/pkgs/development/python-modules/cot/default.nix index 0c2bb9612908..a6de8321dc0c 100644 --- a/pkgs/development/python-modules/cot/default.nix +++ b/pkgs/development/python-modules/cot/default.nix @@ -16,7 +16,7 @@ buildPythonPackage rec { }; propagatedBuildInputs = [ colorlog pyvmomi requests verboselogs pyopenssl setuptools ] - ++ stdenv.lib.optional (pythonOlder "3.3") psutil; + ++ lib.optional (pythonOlder "3.3") psutil; checkInputs = [ mock pytestCheckHook pytest-mock qemu ]; diff --git a/pkgs/development/python-modules/cryptography/3.3.nix b/pkgs/development/python-modules/cryptography/3.3.nix index a95318241584..b6972e6d56bb 100644 --- a/pkgs/development/python-modules/cryptography/3.3.nix +++ b/pkgs/development/python-modules/cryptography/3.3.nix @@ -33,18 +33,18 @@ buildPythonPackage rec { outputs = [ "out" "dev" ]; - nativeBuildInputs = stdenv.lib.optionals (!isPyPy) [ + nativeBuildInputs = lib.optionals (!isPyPy) [ cffi ]; buildInputs = [ openssl ] - ++ stdenv.lib.optional stdenv.isDarwin darwin.apple_sdk.frameworks.Security; + ++ lib.optional stdenv.isDarwin darwin.apple_sdk.frameworks.Security; propagatedBuildInputs = [ packaging six - ] ++ stdenv.lib.optionals (!isPyPy) [ + ] ++ lib.optionals (!isPyPy) [ cffi - ] ++ stdenv.lib.optionals isPy27 [ + ] ++ lib.optionals isPy27 [ ipaddress enum34 ]; diff --git a/pkgs/development/python-modules/cryptography/default.nix b/pkgs/development/python-modules/cryptography/default.nix index bae494989c7d..ad402efd7593 100644 --- a/pkgs/development/python-modules/cryptography/default.nix +++ b/pkgs/development/python-modules/cryptography/default.nix @@ -31,18 +31,18 @@ buildPythonPackage rec { outputs = [ "out" "dev" ]; - nativeBuildInputs = stdenv.lib.optionals (!isPyPy) [ + nativeBuildInputs = lib.optionals (!isPyPy) [ cffi ]; buildInputs = [ openssl ] - ++ stdenv.lib.optional stdenv.isDarwin darwin.apple_sdk.frameworks.Security; + ++ lib.optional stdenv.isDarwin darwin.apple_sdk.frameworks.Security; propagatedBuildInputs = [ packaging six - ] ++ stdenv.lib.optionals (!isPyPy) [ + ] ++ lib.optionals (!isPyPy) [ cffi - ] ++ stdenv.lib.optionals isPy27 [ + ] ++ lib.optionals isPy27 [ ipaddress enum34 ]; diff --git a/pkgs/development/python-modules/csscompressor/default.nix b/pkgs/development/python-modules/csscompressor/default.nix index a7256a54e3be..b3d08c12e62f 100644 --- a/pkgs/development/python-modules/csscompressor/default.nix +++ b/pkgs/development/python-modules/csscompressor/default.nix @@ -1,4 +1,5 @@ -{ stdenv, buildPythonPackage, fetchPypi }: +{ lib, buildPythonPackage, fetchPypi }: + buildPythonPackage rec { pname = "csscompressor"; version = "0.9.5"; @@ -10,10 +11,10 @@ buildPythonPackage rec { doCheck = false; # No tests - meta = { + meta = with lib; { description = "A python port of YUI CSS Compressor"; homepage = "https://pypi.python.org/pypi/csscompressor"; - license = stdenv.lib.licenses.bsd3; + license = licenses.bsd3; maintainers = []; }; } diff --git a/pkgs/development/python-modules/curtsies/default.nix b/pkgs/development/python-modules/curtsies/default.nix index f860f2ae5ebc..4c4c7dbe231a 100644 --- a/pkgs/development/python-modules/curtsies/default.nix +++ b/pkgs/development/python-modules/curtsies/default.nix @@ -17,7 +17,7 @@ buildPythonPackage rec { ]; propagatedBuildInputs = [ blessings wcwidth ] - ++ stdenv.lib.optionals (pythonOlder "3.5") [ typing ]; + ++ lib.optionals (pythonOlder "3.5") [ typing ]; checkInputs = [ mock pyte nose ]; diff --git a/pkgs/development/python-modules/dbf/default.nix b/pkgs/development/python-modules/dbf/default.nix index 348f91ea6831..b9c264a20150 100644 --- a/pkgs/development/python-modules/dbf/default.nix +++ b/pkgs/development/python-modules/dbf/default.nix @@ -9,7 +9,7 @@ buildPythonPackage rec { sha256 = "a4a7a8cdc113d840142d21a796c16c7d329ad35c48f17156446732c83ebc571a"; }; - propagatedBuildInputs = [ aenum ] ++ stdenv.lib.optional (pythonOlder "3.4") enum34; + propagatedBuildInputs = [ aenum ] ++ lib.optional (pythonOlder "3.4") enum34; doCheck = !isPy3k; # tests are not yet ported. diff --git a/pkgs/development/python-modules/demjson/default.nix b/pkgs/development/python-modules/demjson/default.nix index 988c2815da8c..fc70562938ef 100644 --- a/pkgs/development/python-modules/demjson/default.nix +++ b/pkgs/development/python-modules/demjson/default.nix @@ -9,7 +9,7 @@ buildPythonPackage rec { sha256 = "0ygbddpnvp5lby6mr5kz60la3hkvwwzv3wwb3z0w9ngxl0w21pii"; }; - checkPhase = stdenv.lib.optionalString isPy3k '' + checkPhase = lib.optionalString isPy3k '' ${python.interpreter} -m lib2to3 -w test/test_demjson.py '' + '' ${python.interpreter} test/test_demjson.py diff --git a/pkgs/development/python-modules/django-polymorphic/default.nix b/pkgs/development/python-modules/django-polymorphic/default.nix index c08facd3650e..b3b71231b75b 100644 --- a/pkgs/development/python-modules/django-polymorphic/default.nix +++ b/pkgs/development/python-modules/django-polymorphic/default.nix @@ -1,4 +1,4 @@ -{ stdenv, buildPythonPackage, fetchFromGitHub, python, django, dj-database-url }: +{ lib, stdenv, buildPythonPackage, fetchFromGitHub, python, django, dj-database-url }: buildPythonPackage rec { pname = "django-polymorphic"; @@ -19,9 +19,9 @@ buildPythonPackage rec { ${python.interpreter} runtests.py ''; - meta = { + meta = with lib; { homepage = "https://github.com/django-polymorphic/django-polymorphic"; description = "Improved Django model inheritance with automatic downcasting"; - license = stdenv.lib.licenses.bsd3; + license = licenses.bsd3; }; } diff --git a/pkgs/development/python-modules/django-raster/default.nix b/pkgs/development/python-modules/django-raster/default.nix index a3aed647a33b..173452ebe484 100644 --- a/pkgs/development/python-modules/django-raster/default.nix +++ b/pkgs/development/python-modules/django-raster/default.nix @@ -2,7 +2,7 @@ numpy, django_colorful, pillow, psycopg2, pyparsing, django, celery, boto3, importlib-metadata }: -if stdenv.lib.versionOlder django.version "2.0" +if lib.versionOlder django.version "2.0" then throw "django-raster requires Django >= 2.0. Consider overiding the python package set to use django_2." else buildPythonPackage rec { diff --git a/pkgs/development/python-modules/django/2.nix b/pkgs/development/python-modules/django/2.nix index 641ec02aae01..eac48593de20 100644 --- a/pkgs/development/python-modules/django/2.nix +++ b/pkgs/development/python-modules/django/2.nix @@ -15,7 +15,7 @@ buildPythonPackage rec { sha256 = "cf5370a4d7765a9dd6d42a7b96b53c74f9446cd38209211304b210fe0404b861"; }; - patches = stdenv.lib.optional withGdal + patches = lib.optional withGdal (substituteAll { src = ./1.10-gis-libs.template.patch; geos = geos; diff --git a/pkgs/development/python-modules/django/3.nix b/pkgs/development/python-modules/django/3.nix index 2ea5b5a006c8..2444146e8374 100644 --- a/pkgs/development/python-modules/django/3.nix +++ b/pkgs/development/python-modules/django/3.nix @@ -22,7 +22,7 @@ buildPythonPackage rec { sha256 = "2d78425ba74c7a1a74b196058b261b9733a8570782f4e2828974777ccca7edf7"; }; - patches = stdenv.lib.optional withGdal + patches = lib.optional withGdal (substituteAll { src = ./django_3_set_geos_gdal_lib.patch; geos = geos; diff --git a/pkgs/development/python-modules/dufte/default.nix b/pkgs/development/python-modules/dufte/default.nix index 7836c8aa60a0..d8435afa3f97 100644 --- a/pkgs/development/python-modules/dufte/default.nix +++ b/pkgs/development/python-modules/dufte/default.nix @@ -23,7 +23,7 @@ buildPythonPackage rec { propagatedBuildInputs = [ matplotlib numpy - ] ++ stdenv.lib.optionals (pythonOlder "3.8") [ + ] ++ lib.optionals (pythonOlder "3.8") [ importlib-metadata ]; diff --git a/pkgs/development/python-modules/easydict/default.nix b/pkgs/development/python-modules/easydict/default.nix index d8dbb045ddca..e1898d3fc9e4 100644 --- a/pkgs/development/python-modules/easydict/default.nix +++ b/pkgs/development/python-modules/easydict/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchPypi, buildPythonPackage }: +{ lib, buildPythonPackage, fetchPypi }: buildPythonPackage rec { pname = "easydict"; @@ -11,9 +11,9 @@ buildPythonPackage rec { docheck = false; # No tests in archive - meta = { + meta = with lib; { homepage = "https://github.com/makinacorpus/easydict"; - license = with stdenv.lib; licenses.lgpl3; + license = licenses.lgpl3; description = "Access dict values as attributes (works recursively)"; }; } diff --git a/pkgs/development/python-modules/elasticsearch-dsl/default.nix b/pkgs/development/python-modules/elasticsearch-dsl/default.nix index 441889025911..67e277b57ac4 100644 --- a/pkgs/development/python-modules/elasticsearch-dsl/default.nix +++ b/pkgs/development/python-modules/elasticsearch-dsl/default.nix @@ -18,7 +18,7 @@ buildPythonPackage rec { }; propagatedBuildInputs = [ elasticsearch python-dateutil six ] - ++ stdenv.lib.optional (!isPy3k) ipaddress; + ++ lib.optional (!isPy3k) ipaddress; # ImportError: No module named test_elasticsearch_dsl # Tests require a local instance of elasticsearch diff --git a/pkgs/development/python-modules/enzyme/default.nix b/pkgs/development/python-modules/enzyme/default.nix index 110575464cb6..ee547ad9b7bc 100644 --- a/pkgs/development/python-modules/enzyme/default.nix +++ b/pkgs/development/python-modules/enzyme/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchPypi, buildPythonPackage }: +{ lib, fetchPypi, buildPythonPackage }: buildPythonPackage rec { pname = "enzyme"; @@ -12,9 +12,9 @@ buildPythonPackage rec { sha256 = "1fv2kh2v4lwj0hhrhj9pib1pdjh01yr4xgyljhx11l94gjlpy5pj"; }; - meta = { + meta = with lib; { homepage = "https://github.com/Diaoul/enzyme"; - license = with stdenv.lib; licenses.asl20; + license = licenses.asl20; description = "Python video metadata parser"; }; } diff --git a/pkgs/development/python-modules/etebase/default.nix b/pkgs/development/python-modules/etebase/default.nix index c0f9125a8d79..7832f6b4787a 100644 --- a/pkgs/development/python-modules/etebase/default.nix +++ b/pkgs/development/python-modules/etebase/default.nix @@ -35,7 +35,7 @@ rustPlatform.buildRustPackage rec { wheel ]; - buildInputs = stdenv.lib.optionals stdenv.isDarwin [ Security ]; + buildInputs = lib.optionals stdenv.isDarwin [ Security ]; propagatedBuildInputs = [ python diff --git a/pkgs/development/python-modules/fasteners/default.nix b/pkgs/development/python-modules/fasteners/default.nix index b81ebb4faa03..57ad69c0be41 100644 --- a/pkgs/development/python-modules/fasteners/default.nix +++ b/pkgs/development/python-modules/fasteners/default.nix @@ -20,7 +20,7 @@ buildPythonPackage rec { propagatedBuildInputs = [ six monotonic ]; - checkInputs = [ testtools nose ] ++ stdenv.lib.optionals (!isPy3k) [ futures ]; + checkInputs = [ testtools nose ] ++ lib.optionals (!isPy3k) [ futures ]; checkPhase = '' nosetests diff --git a/pkgs/development/python-modules/fire/default.nix b/pkgs/development/python-modules/fire/default.nix index 5a14f772546f..6a2cc594360d 100644 --- a/pkgs/development/python-modules/fire/default.nix +++ b/pkgs/development/python-modules/fire/default.nix @@ -12,7 +12,7 @@ buildPythonPackage rec { sha256 = "0s5r6l39ck2scks54hmwwdf4lcihqqnqzjfx9lz2b67vxkajpwmc"; }; - propagatedBuildInputs = [ six termcolor ] ++ stdenv.lib.optional isPy27 enum34; + propagatedBuildInputs = [ six termcolor ] ++ lib.optional isPy27 enum34; checkInputs = [ hypothesis mock python-Levenshtein pytest ]; diff --git a/pkgs/development/python-modules/flake8/default.nix b/pkgs/development/python-modules/flake8/default.nix index 33459b7c66b3..9e53ed28ff34 100644 --- a/pkgs/development/python-modules/flake8/default.nix +++ b/pkgs/development/python-modules/flake8/default.nix @@ -14,10 +14,10 @@ buildPythonPackage rec { checkInputs = [ pytest mock pytestrunner ]; propagatedBuildInputs = [ pyflakes pycodestyle mccabe ] - ++ stdenv.lib.optionals (pythonOlder "3.2") [ configparser functools32 ] - ++ stdenv.lib.optionals (pythonOlder "3.4") [ enum34 ] - ++ stdenv.lib.optionals (pythonOlder "3.5") [ typing ] - ++ stdenv.lib.optionals (pythonOlder "3.8") [ importlib-metadata ]; + ++ lib.optionals (pythonOlder "3.2") [ configparser functools32 ] + ++ lib.optionals (pythonOlder "3.4") [ enum34 ] + ++ lib.optionals (pythonOlder "3.5") [ typing ] + ++ lib.optionals (pythonOlder "3.8") [ importlib-metadata ]; # fixtures fail to initialize correctly checkPhase = '' diff --git a/pkgs/development/python-modules/flask-migrate/default.nix b/pkgs/development/python-modules/flask-migrate/default.nix index 24ed04437a03..4d50ade30e1c 100644 --- a/pkgs/development/python-modules/flask-migrate/default.nix +++ b/pkgs/development/python-modules/flask-migrate/default.nix @@ -1,6 +1,4 @@ -{ stdenv, buildPythonPackage, fetchPypi, isPy3k, glibcLocales, flask, flask_sqlalchemy, flask_script, alembic }: - -with stdenv.lib; +{ lib, buildPythonPackage, fetchPypi, isPy3k, glibcLocales, flask, flask_sqlalchemy, flask_script, alembic }: buildPythonPackage rec { pname = "Flask-Migrate"; @@ -11,15 +9,15 @@ buildPythonPackage rec { sha256 = "a69d508c2e09d289f6e55a417b3b8c7bfe70e640f53d2d9deb0d056a384f37ee"; }; - checkInputs = [ flask_script ] ++ optional isPy3k glibcLocales; + checkInputs = [ flask_script ] ++ lib.optional isPy3k glibcLocales; propagatedBuildInputs = [ flask flask_sqlalchemy alembic ]; # tests invoke the flask cli which uses click and therefore has py3k encoding troubles - preCheck = optionalString isPy3k '' + preCheck = lib.optionalString isPy3k '' export LANG="en_US.UTF-8" ''; - meta = { + meta = with lib; { description = "SQLAlchemy database migrations for Flask applications using Alembic"; license = licenses.mit; homepage = "https://github.com/miguelgrinberg/Flask-Migrate"; diff --git a/pkgs/development/python-modules/flask-testing/default.nix b/pkgs/development/python-modules/flask-testing/default.nix index 9f4d66335de5..6cfcffdb7be8 100644 --- a/pkgs/development/python-modules/flask-testing/default.nix +++ b/pkgs/development/python-modules/flask-testing/default.nix @@ -15,7 +15,7 @@ buildPythonPackage rec { propagatedBuildInputs = [ flask ]; - checkInputs = [ blinker ] ++ stdenv.lib.optionals (!isPy3k) [ twill ]; + checkInputs = [ blinker ] ++ lib.optionals (!isPy3k) [ twill ]; # twill integration is outdated in Python 2, hence it the tests fails. # Some of the tests use localhost networking on darwin. diff --git a/pkgs/development/python-modules/flatbuffers/default.nix b/pkgs/development/python-modules/flatbuffers/default.nix index d06ea28b3344..f697f7b8ae09 100644 --- a/pkgs/development/python-modules/flatbuffers/default.nix +++ b/pkgs/development/python-modules/flatbuffers/default.nix @@ -1,4 +1,4 @@ -{ stdenv +{ lib , buildPythonPackage , flatbuffers }: @@ -16,6 +16,6 @@ buildPythonPackage rec { meta = flatbuffers.meta // { description = "Python runtime library for use with the Flatbuffers serialization format"; - maintainers = with stdenv.lib.maintainers; [ wulfsta ]; + maintainers = with lib.maintainers; [ wulfsta ]; }; } diff --git a/pkgs/development/python-modules/funcsigs/default.nix b/pkgs/development/python-modules/funcsigs/default.nix index aaa49254eccb..1464baa57df2 100644 --- a/pkgs/development/python-modules/funcsigs/default.nix +++ b/pkgs/development/python-modules/funcsigs/default.nix @@ -14,7 +14,7 @@ buildPythonPackage rec { buildInputs = [ unittest2 ]; # https://github.com/testing-cabal/funcsigs/issues/10 - patches = stdenv.lib.optional (isPyPy && isPy3k) [ ./fix-pypy3-tests.patch ]; + patches = lib.optional (isPyPy && isPy3k) [ ./fix-pypy3-tests.patch ]; meta = with lib; { description = "Python function signatures from PEP362 for Python 2.6, 2.7 and 3.2+"; diff --git a/pkgs/development/python-modules/gevent/default.nix b/pkgs/development/python-modules/gevent/default.nix index ba80a928f255..0fcf6cdfaaa9 100644 --- a/pkgs/development/python-modules/gevent/default.nix +++ b/pkgs/development/python-modules/gevent/default.nix @@ -15,7 +15,7 @@ buildPythonPackage rec { buildInputs = [ libev ]; propagatedBuildInputs = [ zope_interface - ] ++ stdenv.lib.optionals (!isPyPy) [ greenlet ]; + ] ++ lib.optionals (!isPyPy) [ greenlet ]; checkPhase = '' cd greentest diff --git a/pkgs/development/python-modules/glymur/default.nix b/pkgs/development/python-modules/glymur/default.nix index f8a0e4632389..50ed257f57e0 100644 --- a/pkgs/development/python-modules/glymur/default.nix +++ b/pkgs/development/python-modules/glymur/default.nix @@ -26,7 +26,7 @@ buildPythonPackage rec { propagatedBuildInputs = [ numpy - ] ++ stdenv.lib.optional isPy27 [ contextlib2 mock importlib-resources ]; + ] ++ lib.optional isPy27 [ contextlib2 mock importlib-resources ]; checkInputs = [ scikitimage diff --git a/pkgs/development/python-modules/goocalendar/default.nix b/pkgs/development/python-modules/goocalendar/default.nix index 85744d295934..b0eea600384e 100644 --- a/pkgs/development/python-modules/goocalendar/default.nix +++ b/pkgs/development/python-modules/goocalendar/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv +{ lib , fetchPypi , buildPythonPackage , pkg-config @@ -10,8 +10,6 @@ , isPy3k }: -with stdenv.lib; - buildPythonPackage rec { pname = "GooCalendar"; version = "0.7.1"; diff --git a/pkgs/development/python-modules/grpcio/default.nix b/pkgs/development/python-modules/grpcio/default.nix index 6288828cd1bf..1b1ffb975fb6 100644 --- a/pkgs/development/python-modules/grpcio/default.nix +++ b/pkgs/development/python-modules/grpcio/default.nix @@ -21,13 +21,13 @@ buildPythonPackage rec { outputs = [ "out" "dev" ]; nativeBuildInputs = [ cython pkg-config ] - ++ stdenv.lib.optional stdenv.isDarwin darwin.cctools; + ++ lib.optional stdenv.isDarwin darwin.cctools; buildInputs = [ c-ares openssl zlib ]; propagatedBuildInputs = [ six protobuf ] - ++ stdenv.lib.optionals (isPy27) [ enum34 futures ]; + ++ lib.optionals (isPy27) [ enum34 futures ]; - preBuild = stdenv.lib.optionalString stdenv.isDarwin "unset AR"; + preBuild = lib.optionalString stdenv.isDarwin "unset AR"; GRPC_BUILD_WITH_BORING_SSL_ASM = ""; GRPC_PYTHON_BUILD_SYSTEM_OPENSSL = 1; diff --git a/pkgs/development/python-modules/gst-python/default.nix b/pkgs/development/python-modules/gst-python/default.nix index 30c26b19c08d..9ff8434cc9aa 100644 --- a/pkgs/development/python-modules/gst-python/default.nix +++ b/pkgs/development/python-modules/gst-python/default.nix @@ -1,4 +1,5 @@ -{ buildPythonPackage +{ lib +, buildPythonPackage , fetchurl , meson , ninja @@ -51,11 +52,9 @@ buildPythonPackage rec { # https://github.com/NixOS/nixpkgs/issues/47390 installCheckPhase = "meson test --print-errorlogs"; - meta = { + meta = with lib; { homepage = "https://gstreamer.freedesktop.org"; - description = "Python bindings for GStreamer"; - - license = stdenv.lib.licenses.lgpl2Plus; + license = licenses.lgpl2Plus; }; } diff --git a/pkgs/development/python-modules/gumath/default.nix b/pkgs/development/python-modules/gumath/default.nix index ccf1627d7f32..601aecdf331c 100644 --- a/pkgs/development/python-modules/gumath/default.nix +++ b/pkgs/development/python-modules/gumath/default.nix @@ -1,4 +1,5 @@ -{ stdenv +{ lib +, stdenv , buildPythonPackage , python , numba @@ -28,7 +29,7 @@ buildPythonPackage { 'add_runtime_library_dirs = ["${libndtypes}/lib", "${libxnd}/lib", "${libgumath}/lib"]' ''; - postInstall = stdenv.lib.optionalString stdenv.isDarwin '' + postInstall = lib.optionalString stdenv.isDarwin '' install_name_tool -add_rpath ${libgumath}/lib $out/${python.sitePackages}/gumath/_gumath.*.so ''; diff --git a/pkgs/development/python-modules/gyp/default.nix b/pkgs/development/python-modules/gyp/default.nix index b08814d4bd12..5be56c81257a 100644 --- a/pkgs/development/python-modules/gyp/default.nix +++ b/pkgs/development/python-modules/gyp/default.nix @@ -14,7 +14,7 @@ buildPythonPackage { sha256 = "0r9phq5yrmj968vdvy9vivli35wn1j9a6iwshp69wl7q4p0x8q2b"; }; - patches = stdenv.lib.optionals stdenv.isDarwin [ + patches = lib.optionals stdenv.isDarwin [ ./no-darwin-cflags.patch ./no-xcode.patch ]; diff --git a/pkgs/development/python-modules/h5py/default.nix b/pkgs/development/python-modules/h5py/default.nix index a9ebdc5dfe88..c167e2115c66 100644 --- a/pkgs/development/python-modules/h5py/default.nix +++ b/pkgs/development/python-modules/h5py/default.nix @@ -1,11 +1,9 @@ -{ stdenv, fetchPypi, isPy27, python, buildPythonPackage, pythonOlder +{ lib, fetchPypi, isPy27, python, buildPythonPackage, pythonOlder , numpy, hdf5, cython, six, pkgconfig, unittest2, fetchpatch , mpi4py ? null, openssh, pytestCheckHook, cached-property }: assert hdf5.mpiSupport -> mpi4py != null && hdf5.mpi == mpi4py.mpi; -with stdenv.lib; - let mpi = hdf5.mpi; mpiSupport = hdf5.mpiSupport; @@ -31,27 +29,26 @@ in buildPythonPackage rec { postConfigure = '' # Needed to run the tests reliably. See: # https://bitbucket.org/mpi4py/mpi4py/issues/87/multiple-test-errors-with-openmpi-30 - ${optionalString mpiSupport "export OMPI_MCA_rmaps_base_oversubscribe=yes"} + ${lib.optionalString mpiSupport "export OMPI_MCA_rmaps_base_oversubscribe=yes"} ''; preBuild = if mpiSupport then "export CC=${mpi}/bin/mpicc" else ""; # tests now require pytest-mpi, which isn't available and difficult to package doCheck = false; - checkInputs = optional isPy27 unittest2 ++ [ pytestCheckHook openssh ]; + checkInputs = lib.optional isPy27 unittest2 ++ [ pytestCheckHook openssh ]; nativeBuildInputs = [ pkgconfig cython ]; buildInputs = [ hdf5 ] - ++ optional mpiSupport mpi; + ++ lib.optional mpiSupport mpi; propagatedBuildInputs = [ numpy six] - ++ optionals mpiSupport [ mpi4py openssh ] - ++ optionals (pythonOlder "3.8") [ cached-property ]; + ++ lib.optionals mpiSupport [ mpi4py openssh ] + ++ lib.optionals (pythonOlder "3.8") [ cached-property ]; pythonImportsCheck = [ "h5py" ]; - meta = { - description = - "Pythonic interface to the HDF5 binary data format"; + meta = with lib; { + description = "Pythonic interface to the HDF5 binary data format"; homepage = "http://www.h5py.org/"; - license = stdenv.lib.licenses.bsd2; + license = licenses.bsd2; }; } diff --git a/pkgs/development/python-modules/hg-evolve/default.nix b/pkgs/development/python-modules/hg-evolve/default.nix index bcc93ba10cb2..38a770e879fa 100644 --- a/pkgs/development/python-modules/hg-evolve/default.nix +++ b/pkgs/development/python-modules/hg-evolve/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv +{ lib , buildPythonPackage , fetchPypi , isPy3k @@ -19,6 +19,6 @@ buildPythonPackage rec { description = "Enables the “changeset evolution” feature of Mercurial core"; homepage = "https://www.mercurial-scm.org/doc/evolution/"; maintainers = with maintainers; [ xavierzwirtz ]; - license = stdenv.lib.licenses.gpl2Plus; + license = licenses.gpl2Plus; }; } diff --git a/pkgs/development/python-modules/hg-git/default.nix b/pkgs/development/python-modules/hg-git/default.nix index fd321493b09b..1d8e1ec1e29f 100644 --- a/pkgs/development/python-modules/hg-git/default.nix +++ b/pkgs/development/python-modules/hg-git/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv +{ lib , buildPythonPackage , fetchPypi , dulwich @@ -30,7 +30,7 @@ buildPythonPackage rec { description = "Push and pull from a Git server using Mercurial"; homepage = "http://hg-git.github.com/"; maintainers = with maintainers; [ koral ]; - license = stdenv.lib.licenses.gpl2; + license = licenses.gpl2; }; } diff --git a/pkgs/development/python-modules/hidapi/default.nix b/pkgs/development/python-modules/hidapi/default.nix index c5ee1c208392..790e7aa08fc2 100644 --- a/pkgs/development/python-modules/hidapi/default.nix +++ b/pkgs/development/python-modules/hidapi/default.nix @@ -10,16 +10,16 @@ buildPythonPackage rec { }; propagatedBuildInputs = - stdenv.lib.optionals stdenv.isLinux [ libusb1 udev ] ++ - stdenv.lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ AppKit CoreFoundation IOKit ]) ++ + lib.optionals stdenv.isLinux [ libusb1 udev ] ++ + lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ AppKit CoreFoundation IOKit ]) ++ [ cython ]; # Fix the USB backend library lookup - postPatch = stdenv.lib.optionalString stdenv.isLinux '' + postPatch = lib.optionalString stdenv.isLinux '' libusb=${libusb1.dev}/include/libusb-1.0 test -d $libusb || { echo "ERROR: $libusb doesn't exist, please update/fix this build expression."; exit 1; } sed -i -e "s|/usr/include/libusb-1.0|$libusb|" setup.py - '' + stdenv.lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.isDarwin '' substituteInPlace setup.py --replace 'macos_sdk_path =' 'macos_sdk_path = "" #' ''; diff --git a/pkgs/development/python-modules/hoomd-blue/default.nix b/pkgs/development/python-modules/hoomd-blue/default.nix index edb647a3fc60..f726340b7c88 100644 --- a/pkgs/development/python-modules/hoomd-blue/default.nix +++ b/pkgs/development/python-modules/hoomd-blue/default.nix @@ -29,9 +29,9 @@ stdenv.mkDerivation rec { }; nativeBuildInputs = [ cmake pkgconfig ]; - buildInputs = stdenv.lib.optionals withMPI [ mpi ]; + buildInputs = lib.optionals withMPI [ mpi ]; propagatedBuildInputs = [ python.pkgs.numpy ] - ++ stdenv.lib.optionals withMPI [ python.pkgs.mpi4py ]; + ++ lib.optionals withMPI [ python.pkgs.mpi4py ]; dontAddPrefix = true; cmakeFlags = [ diff --git a/pkgs/development/python-modules/htmlmin/default.nix b/pkgs/development/python-modules/htmlmin/default.nix index ccbc157837c3..e91aedc6cdb1 100644 --- a/pkgs/development/python-modules/htmlmin/default.nix +++ b/pkgs/development/python-modules/htmlmin/default.nix @@ -1,4 +1,5 @@ -{ stdenv, buildPythonPackage, fetchPypi }: +{ lib, buildPythonPackage, fetchPypi }: + buildPythonPackage rec { pname = "htmlmin"; version = "0.1.12"; @@ -10,10 +11,10 @@ buildPythonPackage rec { # Tests run fine in a normal source checkout, but not when being built by nix. doCheck = false; - meta = { + meta = with lib; { description = "A configurable HTML Minifier with safety features"; homepage = "https://pypi.python.org/pypi/htmlmin"; - license = stdenv.lib.licenses.bsd3; + license = licenses.bsd3; maintainers = []; }; } diff --git a/pkgs/development/python-modules/httpretty/0.nix b/pkgs/development/python-modules/httpretty/0.nix index 436bbd97fd2f..92ed5c6616e0 100644 --- a/pkgs/development/python-modules/httpretty/0.nix +++ b/pkgs/development/python-modules/httpretty/0.nix @@ -1,4 +1,4 @@ -{ lib, stdenv +{ lib , buildPythonPackage , fetchPypi , tornado @@ -20,7 +20,7 @@ buildPythonPackage rec { # drop this for version > 0.9.7 # Flaky tests: https://github.com/gabrielfalcao/HTTPretty/pull/394 - doCheck = stdenv.lib.versionAtLeast version "0.9.8"; + doCheck = lib.versionAtLeast version "0.9.8"; src = fetchPypi { inherit pname version; @@ -37,7 +37,7 @@ buildPythonPackage rec { __darwinAllowLocalNetworking = true; # Those flaky tests are failing intermittently on all platforms - NOSE_EXCLUDE = stdenv.lib.concatStringsSep "," [ + NOSE_EXCLUDE = lib.concatStringsSep "," [ "tests.functional.test_httplib2.test_callback_response" "tests.functional.test_requests.test_streaming_responses" "tests.functional.test_httplib2.test_callback_response" diff --git a/pkgs/development/python-modules/httpretty/default.nix b/pkgs/development/python-modules/httpretty/default.nix index 93cf6a0927f1..8974672d0a93 100644 --- a/pkgs/development/python-modules/httpretty/default.nix +++ b/pkgs/development/python-modules/httpretty/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv +{ lib , buildPythonPackage , fetchPypi , tornado @@ -23,7 +23,7 @@ buildPythonPackage rec { # drop this for version > 0.9.7 # Flaky tests: https://github.com/gabrielfalcao/HTTPretty/pull/394 - doCheck = stdenv.lib.versionAtLeast version "0.9.8"; + doCheck = lib.versionAtLeast version "0.9.8"; src = fetchPypi { inherit pname version; @@ -44,7 +44,7 @@ buildPythonPackage rec { __darwinAllowLocalNetworking = true; # Those flaky tests are failing intermittently on all platforms - NOSE_EXCLUDE = stdenv.lib.concatStringsSep "," [ + NOSE_EXCLUDE = lib.concatStringsSep "," [ "tests.functional.test_httplib2.test_callback_response" "tests.functional.test_requests.test_streaming_responses" "tests.functional.test_httplib2.test_callback_response" diff --git a/pkgs/development/python-modules/hupper/default.nix b/pkgs/development/python-modules/hupper/default.nix index b70202138d41..1fe5ab7153d3 100644 --- a/pkgs/development/python-modules/hupper/default.nix +++ b/pkgs/development/python-modules/hupper/default.nix @@ -1,4 +1,4 @@ -{ stdenv, buildPythonPackage, fetchPypi +{ lib, stdenv, buildPythonPackage, fetchPypi , pytest, pytestcov, watchdog, mock }: @@ -17,5 +17,5 @@ buildPythonPackage rec { # FIXME: watchdog dependency is disabled on Darwin because of #31865, which causes very silent # segfaults in the testsuite that end up failing the tests in a background thread (in myapp) - checkInputs = [ pytest pytestcov mock ] ++ stdenv.lib.optional (!stdenv.isDarwin) watchdog; + checkInputs = [ pytest pytestcov mock ] ++ lib.optional (!stdenv.isDarwin) watchdog; } diff --git a/pkgs/development/python-modules/imageio/default.nix b/pkgs/development/python-modules/imageio/default.nix index e63678a524ab..71f7eae9c32f 100644 --- a/pkgs/development/python-modules/imageio/default.nix +++ b/pkgs/development/python-modules/imageio/default.nix @@ -24,7 +24,7 @@ buildPythonPackage rec { inherit pname version; }; - checkInputs = [ pytest psutil ] ++ stdenv.lib.optionals isPy3k [ + checkInputs = [ pytest psutil ] ++ lib.optionals isPy3k [ imageio-ffmpeg ffmpeg_3 ]; propagatedBuildInputs = [ numpy pillow ]; diff --git a/pkgs/development/python-modules/influxgraph/default.nix b/pkgs/development/python-modules/influxgraph/default.nix index 982b3fb8db5b..32374453375d 100644 --- a/pkgs/development/python-modules/influxgraph/default.nix +++ b/pkgs/development/python-modules/influxgraph/default.nix @@ -11,7 +11,7 @@ buildPythonPackage rec { sha256 = "0l33sfwdh4bfprmzp2kx0d9098g6yxbnhyyx9qr3kzczpm0jg9vy"; }; - patchPhase = stdenv.lib.optionalString isPy3k '' + patchPhase = lib.optionalString isPy3k '' sed 's/python-memcached/python3-memcached/' \ -i ./influxgraph.egg-info/requires.txt \ -i ./setup.py diff --git a/pkgs/development/python-modules/ipython/5.nix b/pkgs/development/python-modules/ipython/5.nix index 598e890bb1c5..a75ceaa0b76d 100644 --- a/pkgs/development/python-modules/ipython/5.nix +++ b/pkgs/development/python-modules/ipython/5.nix @@ -33,7 +33,7 @@ buildPythonPackage rec { sha256 = "4bac649857611baaaf76bc82c173aa542f7486446c335fe1a6c05d0d491c8906"; }; - prePatch = stdenv.lib.optionalString stdenv.isDarwin '' + prePatch = lib.optionalString stdenv.isDarwin '' substituteInPlace setup.py --replace "'gnureadline'" " " ''; diff --git a/pkgs/development/python-modules/johnnycanencrypt/default.nix b/pkgs/development/python-modules/johnnycanencrypt/default.nix index 407bb44d8b2d..f0ee4a6bd99c 100644 --- a/pkgs/development/python-modules/johnnycanencrypt/default.nix +++ b/pkgs/development/python-modules/johnnycanencrypt/default.nix @@ -1,4 +1,5 @@ -{ stdenv +{ lib +, stdenv , rustPlatform , fetchFromGitHub , pipInstallHook @@ -49,7 +50,7 @@ rustPlatform.buildRustPackage rec { buildInputs = [ pcsclite nettle - ] ++ stdenv.lib.optionals stdenv.isDarwin [ PCSC ]; + ] ++ lib.optionals stdenv.isDarwin [ PCSC ]; # Needed b/c need to check AFTER python wheel is installed (using Rust Build, not buildPythonPackage) doCheck = false; @@ -83,7 +84,7 @@ rustPlatform.buildRustPackage rec { pythonImportsCheck = [ "johnnycanencrypt" ]; - meta = with stdenv.lib; { + meta = with lib; { homepage = "https://github.com/kushaldas/johnnycanencrypt"; description = "Python module for OpenPGP written in Rust"; license = licenses.gpl3Plus; diff --git a/pkgs/development/python-modules/json-schema-for-humans/default.nix b/pkgs/development/python-modules/json-schema-for-humans/default.nix index 2ab2b2f18748..4e762e456ceb 100644 --- a/pkgs/development/python-modules/json-schema-for-humans/default.nix +++ b/pkgs/development/python-modules/json-schema-for-humans/default.nix @@ -1,4 +1,4 @@ -{ stdenv, buildPythonPackage, fetchFromGitHub +{ lib, buildPythonPackage, fetchFromGitHub , pbr, click, dataclasses-json, htmlmin, jinja2, markdown2, pygments, pytz, pyyaml, requests, pytestCheckHook, beautifulsoup4, tox }: @@ -26,7 +26,7 @@ buildPythonPackage rec { checkInputs = [ pytestCheckHook beautifulsoup4 ]; pytestFlagsArray = [ "--ignore tests/generate_test.py" ]; - meta = with stdenv.lib; { + meta = with lib; { description = "Quickly generate HTML documentation from a JSON schema"; homepage = "https://github.com/coveooss/json-schema-for-humans"; license = licenses.asl20; diff --git a/pkgs/development/python-modules/jsonpointer/default.nix b/pkgs/development/python-modules/jsonpointer/default.nix index e2f22ec86387..e1eaaed6c178 100644 --- a/pkgs/development/python-modules/jsonpointer/default.nix +++ b/pkgs/development/python-modules/jsonpointer/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv +{ lib , buildPythonPackage , fetchPypi }: @@ -15,7 +15,7 @@ buildPythonPackage rec { meta = with lib; { description = "Resolve JSON Pointers in Python"; homepage = "https://github.com/stefankoegl/python-json-pointer"; - license = stdenv.lib.licenses.bsd2; # "Modified BSD license, says pypi" + license = licenses.bsd2; # "Modified BSD license, says pypi" }; } diff --git a/pkgs/development/python-modules/keyring/2.nix b/pkgs/development/python-modules/keyring/2.nix index 1dc7eb0a8f98..ee3b42b9bb85 100644 --- a/pkgs/development/python-modules/keyring/2.nix +++ b/pkgs/development/python-modules/keyring/2.nix @@ -15,7 +15,7 @@ buildPythonPackage rec { checkInputs = [ pytest pytest-flake8 ]; - propagatedBuildInputs = [ dbus-python entrypoints ] ++ stdenv.lib.optional stdenv.isLinux secretstorage; + propagatedBuildInputs = [ dbus-python entrypoints ] ++ lib.optional stdenv.isLinux secretstorage; doCheck = !stdenv.isDarwin; diff --git a/pkgs/development/python-modules/keyrings-alt/default.nix b/pkgs/development/python-modules/keyrings-alt/default.nix index 0b642d0d4f11..bc20ff4e3740 100644 --- a/pkgs/development/python-modules/keyrings-alt/default.nix +++ b/pkgs/development/python-modules/keyrings-alt/default.nix @@ -20,7 +20,7 @@ buildPythonPackage rec { nativeBuildInputs = [ setuptools_scm toml ]; propagatedBuildInputs = [ six ]; - checkInputs = [ pytest keyring ] ++ stdenv.lib.optional (pythonOlder "3.3") backports_unittest-mock; + checkInputs = [ pytest keyring ] ++ lib.optional (pythonOlder "3.3") backports_unittest-mock; # heavily relies on importing tests from keyring package doCheck = false; diff --git a/pkgs/development/python-modules/kiwisolver/1_1.nix b/pkgs/development/python-modules/kiwisolver/1_1.nix index f4621c9c54de..0702e3518e01 100644 --- a/pkgs/development/python-modules/kiwisolver/1_1.nix +++ b/pkgs/development/python-modules/kiwisolver/1_1.nix @@ -14,7 +14,7 @@ buildPythonPackage rec { sha256 = "53eaed412477c836e1b9522c19858a8557d6e595077830146182225613b11a75"; }; - NIX_CFLAGS_COMPILE = stdenv.lib.optionalString stdenv.isDarwin "-I${libcxx}/include/c++/v1"; + NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-I${libcxx}/include/c++/v1"; # Does not include tests doCheck = false; diff --git a/pkgs/development/python-modules/kiwisolver/default.nix b/pkgs/development/python-modules/kiwisolver/default.nix index a24e7300538a..d4d62787092b 100644 --- a/pkgs/development/python-modules/kiwisolver/default.nix +++ b/pkgs/development/python-modules/kiwisolver/default.nix @@ -15,7 +15,7 @@ buildPythonPackage rec { sha256 = "950a199911a8d94683a6b10321f9345d5a3a8433ec58b217ace979e18f16e248"; }; - NIX_CFLAGS_COMPILE = stdenv.lib.optionalString stdenv.isDarwin "-I${libcxx}/include/c++/v1"; + NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-I${libcxx}/include/c++/v1"; nativeBuildInputs = [ cppy diff --git a/pkgs/development/python-modules/koji/default.nix b/pkgs/development/python-modules/koji/default.nix index eac2ab596433..5f560be4e887 100644 --- a/pkgs/development/python-modules/koji/default.nix +++ b/pkgs/development/python-modules/koji/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, buildPythonPackage, isPy3k, pycurl, six, rpm, dateutil }: +{ lib, fetchurl, buildPythonPackage, isPy3k, pycurl, six, rpm, dateutil }: buildPythonPackage rec { pname = "koji"; @@ -23,10 +23,10 @@ buildPythonPackage rec { rm -rf $out/nix ''; - meta = { + meta = with lib; { description = "An RPM-based build system"; homepage = "https://pagure.io/koji"; - license = stdenv.lib.licenses.lgpl21; - platforms = stdenv.lib.platforms.unix; + license = licenses.lgpl21; + platforms = platforms.unix; }; } diff --git a/pkgs/development/python-modules/latexcodec/default.nix b/pkgs/development/python-modules/latexcodec/default.nix index 77b75193ca40..37ffe23b8061 100644 --- a/pkgs/development/python-modules/latexcodec/default.nix +++ b/pkgs/development/python-modules/latexcodec/default.nix @@ -1,4 +1,4 @@ -{ stdenv, buildPythonPackage, fetchPypi, six, pytest }: +{ lib, buildPythonPackage, fetchPypi, six, pytest }: buildPythonPackage rec { pname = "latexcodec"; @@ -17,10 +17,10 @@ buildPythonPackage rec { pytest ''; - meta = { + meta = with lib; { homepage = "https://github.com/mcmtroffaes/latexcodec"; description = "Lexer and codec to work with LaTeX code in Python"; - license = stdenv.lib.licenses.mit; + license = licenses.mit; }; } diff --git a/pkgs/development/python-modules/ledgerwallet/default.nix b/pkgs/development/python-modules/ledgerwallet/default.nix index a95d8140e115..42bc0c391295 100644 --- a/pkgs/development/python-modules/ledgerwallet/default.nix +++ b/pkgs/development/python-modules/ledgerwallet/default.nix @@ -25,7 +25,7 @@ buildPythonPackage rec { sha256 = "0fb93h2wxm9as9rsywlgz2ng4wrlbjphn6mgbhj6nls2i86rrdxk"; }; - buildInputs = stdenv.lib.optionals stdenv.isDarwin [ AppKit ]; + buildInputs = lib.optionals stdenv.isDarwin [ AppKit ]; propagatedBuildInputs = [ cryptography click construct ecdsa hidapi intelhex pillow protobuf requests tabulate ]; diff --git a/pkgs/development/python-modules/libevdev/default.nix b/pkgs/development/python-modules/libevdev/default.nix index 227cabe0099e..4a4ba489e0a6 100644 --- a/pkgs/development/python-modules/libevdev/default.nix +++ b/pkgs/development/python-modules/libevdev/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv +{ lib , buildPythonPackage , isPy27 , fetchPypi @@ -20,7 +20,7 @@ buildPythonPackage rec { patches = [ (substituteAll { src = ./fix-paths.patch; - libevdev = stdenv.lib.getLib pkgs.libevdev; + libevdev = lib.getLib pkgs.libevdev; }) ]; diff --git a/pkgs/development/python-modules/libgpuarray/default.nix b/pkgs/development/python-modules/libgpuarray/default.nix index 80e560e4cce6..567ad2cf4892 100644 --- a/pkgs/development/python-modules/libgpuarray/default.nix +++ b/pkgs/development/python-modules/libgpuarray/default.nix @@ -48,7 +48,7 @@ buildPythonPackage rec { postFixup = '' rm $out/lib/libgpuarray-static.a - '' + stdenv.lib.optionalString (!stdenv.isDarwin) '' + '' + lib.optionalString (!stdenv.isDarwin) '' function fixRunPath { p=$(patchelf --print-rpath $1) patchelf --set-rpath "$p:$libraryPath" $1 diff --git a/pkgs/development/python-modules/lightgbm/default.nix b/pkgs/development/python-modules/lightgbm/default.nix index d7157244b6a5..62686234b6e9 100644 --- a/pkgs/development/python-modules/lightgbm/default.nix +++ b/pkgs/development/python-modules/lightgbm/default.nix @@ -26,7 +26,7 @@ buildPythonPackage rec { # we never actually explicitly call the install command so this is the only way # to inject these options to it - however, openmp-library doesn't appear to have # any effect, so we have to inject it into NIX_LDFLAGS manually below - postPatch = stdenv.lib.optionalString stdenv.cc.isClang '' + postPatch = lib.optionalString stdenv.cc.isClang '' cat >> setup.cfg < pbcopy echo "#!${runtimeShell}" > pbpaste @@ -109,14 +106,14 @@ in buildPythonPackage rec { runHook postCheck ''; - meta = { + meta = with lib; { # https://github.com/pandas-dev/pandas/issues/14866 # pandas devs are no longer testing i686 so safer to assume it's broken broken = stdenv.isi686; homepage = "https://pandas.pydata.org/"; description = "Python Data Analysis Library"; - license = stdenv.lib.licenses.bsd3; - maintainers = with stdenv.lib.maintainers; [ raskin knedlsepp ]; - platforms = stdenv.lib.platforms.unix; + license = licenses.bsd3; + maintainers = with maintainers; [ raskin knedlsepp ]; + platforms = platforms.unix; }; } diff --git a/pkgs/development/python-modules/pandas/default.nix b/pkgs/development/python-modules/pandas/default.nix index b9865fe628b0..ab70a7782adf 100644 --- a/pkgs/development/python-modules/pandas/default.nix +++ b/pkgs/development/python-modules/pandas/default.nix @@ -27,11 +27,7 @@ , libcxx ? null }: -let - inherit (stdenv.lib) optional optionals optionalString; - inherit (stdenv) isDarwin; - -in buildPythonPackage rec { +buildPythonPackage rec { pname = "pandas"; version = "1.1.5"; @@ -41,7 +37,7 @@ in buildPythonPackage rec { }; nativeBuildInputs = [ cython ]; - buildInputs = optional isDarwin libcxx; + buildInputs = lib.optional stdenv.isDarwin libcxx; propagatedBuildInputs = [ beautifulsoup4 bottleneck @@ -62,11 +58,11 @@ in buildPythonPackage rec { # doesn't work with -Werror,-Wunused-command-line-argument # https://github.com/NixOS/nixpkgs/issues/39687 - hardeningDisable = optional stdenv.cc.isClang "strictoverflow"; + hardeningDisable = lib.optional stdenv.cc.isClang "strictoverflow"; # For OSX, we need to add a dependency on libcxx, which provides # `complex.h` and other libraries that pandas depends on to build. - postPatch = optionalString isDarwin '' + postPatch = lib.optionalString stdenv.isDarwin '' cpp_sdk="${libcxx}/include/c++/v1"; echo "Adding $cpp_sdk to the setup.py common_include variable" substituteInPlace setup.py \ @@ -76,7 +72,7 @@ in buildPythonPackage rec { # Parallel Cythonization is broken in Python 3.8 on Darwin. Fixed in the next # release. https://github.com/pandas-dev/pandas/pull/30862 - setupPyBuildFlags = optionals (!(isPy38 && isDarwin)) [ + setupPyBuildFlags = lib.optionals (!(isPy38 && stdenv.isDarwin)) [ # As suggested by # https://pandas.pydata.org/pandas-docs/stable/development/contributing.html#creating-a-python-environment "--parallel=$NIX_BUILD_CORES" @@ -114,7 +110,7 @@ in buildPythonPackage rec { "test_constructor_with_embedded_frames" # tries to import compiled C extension locally "test_missing_required_dependency" - ] ++ optionals isDarwin [ + ] ++ lib.optionals stdenv.isDarwin [ "test_locale" "test_clipboard" ]; @@ -128,7 +124,7 @@ in buildPythonPackage rec { '' # TODO: Get locale and clipboard support working on darwin. # Until then we disable the tests. - + optionalString isDarwin '' + + lib.optionalString stdenv.isDarwin '' # Fake the impure dependencies pbpaste and pbcopy echo "#!${runtimeShell}" > pbcopy echo "#!${runtimeShell}" > pbpaste diff --git a/pkgs/development/python-modules/parse-type/default.nix b/pkgs/development/python-modules/parse-type/default.nix index e787c65fc118..d338a351e54b 100644 --- a/pkgs/development/python-modules/parse-type/default.nix +++ b/pkgs/development/python-modules/parse-type/default.nix @@ -14,7 +14,7 @@ buildPythonPackage rec { }; checkInputs = [ pytest pytestrunner ]; - propagatedBuildInputs = [ parse six ] ++ stdenv.lib.optional (pythonOlder "3.4") enum34; + propagatedBuildInputs = [ parse six ] ++ lib.optional (pythonOlder "3.4") enum34; checkPhase = '' py.test tests diff --git a/pkgs/development/python-modules/pbr/default.nix b/pkgs/development/python-modules/pbr/default.nix index bc7c6399473b..6b204a946b3a 100644 --- a/pkgs/development/python-modules/pbr/default.nix +++ b/pkgs/development/python-modules/pbr/default.nix @@ -1,4 +1,4 @@ -{ stdenv, buildPythonPackage, fetchPypi }: +{ lib, buildPythonPackage, fetchPypi }: buildPythonPackage rec { pname = "pbr"; @@ -12,9 +12,9 @@ buildPythonPackage rec { # circular dependencies with fixtures doCheck = false; - meta = { + meta = with lib; { homepage = "http://docs.openstack.org/developer/pbr/"; - license = stdenv.lib.licenses.asl20; + license = licenses.asl20; description = "Python Build Reasonableness"; }; } diff --git a/pkgs/development/python-modules/pecan/default.nix b/pkgs/development/python-modules/pecan/default.nix index 7303a9b15045..ed0c89b7802b 100644 --- a/pkgs/development/python-modules/pecan/default.nix +++ b/pkgs/development/python-modules/pecan/default.nix @@ -45,7 +45,7 @@ buildPythonPackage rec { mock sqlalchemy virtualenv - ] ++ stdenv.lib.optionals isPy27 [ Kajiki ]; + ] ++ lib.optionals isPy27 [ Kajiki ]; pytestFlagsArray = [ "--pyargs pecan " diff --git a/pkgs/development/python-modules/peewee/default.nix b/pkgs/development/python-modules/peewee/default.nix index ee3d08a173c3..6f5d8e262279 100644 --- a/pkgs/development/python-modules/peewee/default.nix +++ b/pkgs/development/python-modules/peewee/default.nix @@ -1,4 +1,6 @@ -{ stdenv, lib, buildPythonPackage, fetchFromGitHub +{ lib +, buildPythonPackage +, fetchFromGitHub , sqlite , cython , apsw @@ -40,7 +42,7 @@ buildPythonPackage rec { doCheck = withPostgres; - meta = with stdenv.lib;{ + meta = with lib; { description = "a small, expressive orm"; homepage = "http://peewee-orm.com"; license = licenses.mit; diff --git a/pkgs/development/python-modules/pgsanity/default.nix b/pkgs/development/python-modules/pgsanity/default.nix index b95f461aa370..26e5eb2bd6ac 100644 --- a/pkgs/development/python-modules/pgsanity/default.nix +++ b/pkgs/development/python-modules/pgsanity/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv +{ lib , python , fetchPypi , buildPythonPackage @@ -30,7 +30,7 @@ buildPythonPackage rec { run it through ecpg and let ecpg report on the syntax errors of the SQL. ''; - license = stdenv.lib.licenses.mit; + license = licenses.mit; maintainers = with maintainers; [ nalbyuites ]; }; } diff --git a/pkgs/development/python-modules/phonenumbers/default.nix b/pkgs/development/python-modules/phonenumbers/default.nix index 62149a788665..354ca2796e19 100644 --- a/pkgs/development/python-modules/phonenumbers/default.nix +++ b/pkgs/development/python-modules/phonenumbers/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchPypi, buildPythonPackage }: +{ lib, buildPythonPackage, fetchPypi }: buildPythonPackage rec { pname = "phonenumbers"; @@ -9,10 +9,10 @@ buildPythonPackage rec { sha256 = "96d02120a3481e22d8a8eb5e4595ceec1930855749f6e4a06ef931881f59f562"; }; - meta = { + meta = with lib; { description = "Python version of Google's common library for parsing, formatting, storing and validating international phone numbers"; homepage = "https://github.com/daviddrysdale/python-phonenumbers"; - license = stdenv.lib.licenses.asl20; - maintainers = with stdenv.lib.maintainers; [ fadenb ]; + license = licenses.asl20; + maintainers = with maintainers; [ fadenb ]; }; } diff --git a/pkgs/development/python-modules/pickleshare/default.nix b/pkgs/development/python-modules/pickleshare/default.nix index 0171adc6bfcc..2151e13b960d 100644 --- a/pkgs/development/python-modules/pickleshare/default.nix +++ b/pkgs/development/python-modules/pickleshare/default.nix @@ -16,7 +16,7 @@ buildPythonPackage rec { }; propagatedBuildInputs = [ pathpy ] - ++ stdenv.lib.optional (pythonOlder "3.4") pathlib2; + ++ lib.optional (pythonOlder "3.4") pathlib2; # No proper test suite doCheck = false; diff --git a/pkgs/development/python-modules/pillow/6.nix b/pkgs/development/python-modules/pillow/6.nix index ce28b19a013e..0e3fabf1fbca 100644 --- a/pkgs/development/python-modules/pillow/6.nix +++ b/pkgs/development/python-modules/pillow/6.nix @@ -22,7 +22,7 @@ buildPythonPackage rec { checkPhase = '' runHook preCheck - python -m pytest -v -x -W always${stdenv.lib.optionalString stdenv.isDarwin " --deselect=Tests/test_file_icns.py::TestFileIcns::test_save --deselect=Tests/test_imagegrab.py::TestImageGrab::test_grab"} + python -m pytest -v -x -W always${lib.optionalString stdenv.isDarwin " --deselect=Tests/test_file_icns.py::TestFileIcns::test_save --deselect=Tests/test_imagegrab.py::TestImageGrab::test_grab"} runHook postCheck ''; @@ -32,7 +32,7 @@ buildPythonPackage rec { buildInputs = [ freetype libjpeg openjpeg libimagequant zlib libtiff libwebp tcl lcms2 ] - ++ stdenv.lib.optionals (isPyPy) [ tk libX11 ]; + ++ lib.optionals (isPyPy) [ tk libX11 ]; # NOTE: we use LCMS_ROOT as WEBP root since there is not other setting for webp. # NOTE: The Pillow install script will, by default, add paths like /usr/lib @@ -61,7 +61,7 @@ buildPythonPackage rec { export CFLAGS="-I${libwebp}/include" '' # Remove impurities - + stdenv.lib.optionalString stdenv.isDarwin '' + + lib.optionalString stdenv.isDarwin '' substituteInPlace setup.py \ --replace '"/Library/Frameworks",' "" \ --replace '"/System/Library/Frameworks"' "" diff --git a/pkgs/development/python-modules/pillow/default.nix b/pkgs/development/python-modules/pillow/default.nix index 1122d21b5340..4084df19404b 100644 --- a/pkgs/development/python-modules/pillow/default.nix +++ b/pkgs/development/python-modules/pillow/default.nix @@ -24,7 +24,7 @@ buildPythonPackage rec { ''; # Disable darwin tests which require executables: `iconutil` and `screencapture` - disabledTests = stdenv.lib.optionals stdenv.isDarwin [ "test_save" "test_grab" "test_grabclipboard" ]; + disabledTests = lib.optionals stdenv.isDarwin [ "test_save" "test_grab" "test_grabclipboard" ]; propagatedBuildInputs = [ olefile ]; @@ -32,7 +32,7 @@ buildPythonPackage rec { buildInputs = [ freetype libjpeg openjpeg libimagequant zlib libtiff libwebp tcl lcms2 ] - ++ stdenv.lib.optionals (isPyPy) [ tk libX11 ]; + ++ lib.optionals (isPyPy) [ tk libX11 ]; # NOTE: we use LCMS_ROOT as WEBP root since there is not other setting for webp. # NOTE: The Pillow install script will, by default, add paths like /usr/lib @@ -61,7 +61,7 @@ buildPythonPackage rec { export CFLAGS="-I${libwebp}/include" '' # Remove impurities - + stdenv.lib.optionalString stdenv.isDarwin '' + + lib.optionalString stdenv.isDarwin '' substituteInPlace setup.py \ --replace '"/Library/Frameworks",' "" \ --replace '"/System/Library/Frameworks"' "" diff --git a/pkgs/development/python-modules/pip-tools/default.nix b/pkgs/development/python-modules/pip-tools/default.nix index 398ab8cd29be..4ea6f75932cd 100644 --- a/pkgs/development/python-modules/pip-tools/default.nix +++ b/pkgs/development/python-modules/pip-tools/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchPypi, buildPythonPackage, pip, pytest, click, six +{ lib, fetchPypi, buildPythonPackage, pip, pytest, click, six , setuptools_scm, git, glibcLocales, mock }: buildPythonPackage rec { @@ -14,7 +14,7 @@ buildPythonPackage rec { checkInputs = [ pytest git glibcLocales mock ]; propagatedBuildInputs = [ pip click six setuptools_scm ]; - disabledTests = stdenv.lib.concatMapStringsSep " and " (s: "not " + s) [ + disabledTests = lib.concatMapStringsSep " and " (s: "not " + s) [ # Depend on network tests: "test_allow_unsafe_option" #paramaterized, but all fail "test_annotate_option" #paramaterized, but all fail diff --git a/pkgs/development/python-modules/plyvel/default.nix b/pkgs/development/python-modules/plyvel/default.nix index 0872a5347604..d8537d68158a 100644 --- a/pkgs/development/python-modules/plyvel/default.nix +++ b/pkgs/development/python-modules/plyvel/default.nix @@ -15,7 +15,7 @@ buildPythonPackage rec { sha256 = "a7a09033a0fd33ca47094e8bbe01714abfcf644f4b7a337d3970e91a2599e2c4"; }; - buildInputs = [ pkgs.leveldb ] ++ stdenv.lib.optional isPy3k pytest; + buildInputs = [ pkgs.leveldb ] ++ lib.optional isPy3k pytest; # no tests for python2 doCheck = isPy3k; diff --git a/pkgs/development/python-modules/protobuf/default.nix b/pkgs/development/python-modules/protobuf/default.nix index 4925c3dfd02f..e7bbdd6ccdf8 100644 --- a/pkgs/development/python-modules/protobuf/default.nix +++ b/pkgs/development/python-modules/protobuf/default.nix @@ -1,4 +1,5 @@ { buildPackages +, lib , stdenv , fetchpatch , python @@ -14,8 +15,6 @@ , doCheck ? true }: -with stdenv.lib; - buildPythonPackage { inherit (protobuf) pname src version; inherit disabled; @@ -23,18 +22,18 @@ buildPythonPackage { NIX_CFLAGS_COMPILE = toString ( # work around python distutils compiling C++ with $CC - optional stdenv.isDarwin "-I${libcxx}/include/c++/v1" - ++ optional (versionOlder protobuf.version "2.7.0") "-std=c++98" + lib.optional stdenv.isDarwin "-I${libcxx}/include/c++/v1" + ++ lib.optional (lib.versionOlder protobuf.version "2.7.0") "-std=c++98" ); outputs = [ "out" "dev" ]; - propagatedBuildInputs = [ six ] ++ optionals isPy27 [ google-apputils ]; + propagatedBuildInputs = [ six ] ++ lib.optionals isPy27 [ google-apputils ]; propagatedNativeBuildInputs = [ buildPackages.protobuf ]; # For protoc. - nativeBuildInputs = [ pyext ] ++ optionals isPy27 [ google-apputils ]; + nativeBuildInputs = [ pyext ] ++ lib.optionals isPy27 [ google-apputils ]; buildInputs = [ protobuf ]; - patches = optional (isPy37 && (versionOlder protobuf.version "3.6.1.2")) + patches = lib.optional (isPy37 && (lib.versionOlder protobuf.version "3.6.1.2")) # Python 3.7 compatibility (not needed for protobuf >= 3.6.1.2) (fetchpatch { url = "https://github.com/protocolbuffers/protobuf/commit/0a59054c30e4f0ba10f10acfc1d7f3814c63e1a7.patch"; @@ -50,7 +49,7 @@ buildPythonPackage { cd python ''; - preConfigure = optionalString (versionAtLeast protobuf.version "2.6.0") '' + preConfigure = lib.optionalString (lib.versionAtLeast protobuf.version "2.6.0") '' export PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=cpp export PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION_VERSION=2 ''; @@ -58,21 +57,21 @@ buildPythonPackage { preBuild = '' # Workaround for https://github.com/google/protobuf/issues/2895 ${python.pythonForBuild.interpreter} setup.py build - '' + optionalString (versionAtLeast protobuf.version "2.6.0") '' + '' + lib.optionalString (lib.versionAtLeast protobuf.version "2.6.0") '' ${python.pythonForBuild.interpreter} setup.py build_ext --cpp_implementation ''; - installFlags = optional (versionAtLeast protobuf.version "2.6.0") + installFlags = lib.optional (lib.versionAtLeast protobuf.version "2.6.0") "--install-option='--cpp_implementation'"; # the _message.so isn't installed, so we'll do that manually. # if someone can figure out a less hacky way to get the _message.so to # install, please do replace this. - postInstall = optionalString (versionAtLeast protobuf.version "2.6.0") '' + postInstall = lib.optionalString (lib.versionAtLeast protobuf.version "2.6.0") '' cp -v $(find build -name "_message*") $out/${python.sitePackages}/google/protobuf/pyext ''; - meta = { + meta = with lib; { description = "Protocol Buffers are Google's data interchange format"; homepage = "https://developers.google.com/protocol-buffers/"; license = licenses.bsd3; diff --git a/pkgs/development/python-modules/pulp/default.nix b/pkgs/development/python-modules/pulp/default.nix index 480714e9e28d..3e4c4b4b6632 100644 --- a/pkgs/development/python-modules/pulp/default.nix +++ b/pkgs/development/python-modules/pulp/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv +{ lib , fetchPypi , buildPythonPackage , pyparsing diff --git a/pkgs/development/python-modules/pwntools/default.nix b/pkgs/development/python-modules/pwntools/default.nix index 8f559edf41f2..77f7859c6d47 100644 --- a/pkgs/development/python-modules/pwntools/default.nix +++ b/pkgs/development/python-modules/pwntools/default.nix @@ -62,7 +62,7 @@ buildPythonPackage rec { postFixup = '' mkdir -p "$out/bin" - makeWrapper "${debugger}/bin/${stdenv.lib.strings.getName debugger}" "$out/bin/pwntools-gdb" + makeWrapper "${debugger}/bin/${lib.strings.getName debugger}" "$out/bin/pwntools-gdb" ''; meta = with lib; { diff --git a/pkgs/development/python-modules/py3exiv2/default.nix b/pkgs/development/python-modules/py3exiv2/default.nix index f9ed9acd0c80..0c2ae1288279 100644 --- a/pkgs/development/python-modules/py3exiv2/default.nix +++ b/pkgs/development/python-modules/py3exiv2/default.nix @@ -1,4 +1,4 @@ -{ buildPythonPackage, isPy3k, fetchPypi, stdenv, exiv2, boost, libcxx, substituteAll, python }: +{ lib, buildPythonPackage, isPy3k, fetchPypi, stdenv, exiv2, boost, libcxx, substituteAll, python }: buildPythonPackage rec { pname = "py3exiv2"; @@ -13,13 +13,13 @@ buildPythonPackage rec { buildInputs = [ exiv2 boost ]; # work around python distutils compiling C++ with $CC (see issue #26709) - NIX_CFLAGS_COMPILE = stdenv.lib.optionalString stdenv.isDarwin "-I${libcxx}/include/c++/v1"; + NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-I${libcxx}/include/c++/v1"; - meta = { + meta = with lib; { homepage = "https://launchpad.net/py3exiv2"; description = "A Python3 binding to the library exiv2"; - license = with stdenv.lib.licenses; [ gpl3 ]; - maintainers = with stdenv.lib.maintainers; [ vinymeuh ]; - platforms = with stdenv.lib.platforms; linux ++ darwin; + license = licenses.gpl3; + maintainers = with maintainers; [ vinymeuh ]; + platforms = with platforms; linux ++ darwin; }; } diff --git a/pkgs/development/python-modules/pyannotate/default.nix b/pkgs/development/python-modules/pyannotate/default.nix index 4442d90ae71a..9c9c18a886e9 100644 --- a/pkgs/development/python-modules/pyannotate/default.nix +++ b/pkgs/development/python-modules/pyannotate/default.nix @@ -19,7 +19,7 @@ buildPythonPackage rec { checkInputs = [ pytest ]; propagatedBuildInputs = [ six mypy-extensions ] - ++ stdenv.lib.optionals (pythonOlder "3.5") [ typing ]; + ++ lib.optionals (pythonOlder "3.5") [ typing ]; checkPhase = '' py.test diff --git a/pkgs/development/python-modules/pyatspi/default.nix b/pkgs/development/python-modules/pyatspi/default.nix index 5e96f642c285..5ae00417b6c0 100644 --- a/pkgs/development/python-modules/pyatspi/default.nix +++ b/pkgs/development/python-modules/pyatspi/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchurl, pkg-config, buildPythonPackage, isPy3k, at-spi2-core, pygobject3, gnome3 }: +{ lib, fetchurl, pkg-config, buildPythonPackage, isPy3k, at-spi2-core, pygobject3, gnome3 }: buildPythonPackage rec { pname = "pyatspi"; @@ -6,7 +6,7 @@ buildPythonPackage rec { format = "other"; src = fetchurl { - url = "mirror://gnome/sources/${pname}/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; + url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; sha256 = "/4CTEv0ML2HhkcGBoaY4owtXm5G2gs+1oFU1pVJltD0="; }; diff --git a/pkgs/development/python-modules/pybtex-docutils/default.nix b/pkgs/development/python-modules/pybtex-docutils/default.nix index 8f3f32b20ac4..2dbd4e8cff58 100644 --- a/pkgs/development/python-modules/pybtex-docutils/default.nix +++ b/pkgs/development/python-modules/pybtex-docutils/default.nix @@ -1,4 +1,4 @@ -{ stdenv, buildPythonPackage, fetchPypi, docutils, pybtex, six }: +{ lib, buildPythonPackage, fetchPypi, docutils, pybtex, six }: buildPythonPackage rec { version = "1.0.0"; @@ -12,9 +12,9 @@ buildPythonPackage rec { sha256 = "cead6554b4af99c287dd29f38b1fa152c9542f56a51cb6cbc3997c95b2725b2e"; }; - meta = { + meta = with lib; { description = "A docutils backend for pybtex"; homepage = "https://github.com/mcmtroffaes/pybtex-docutils"; - license = stdenv.lib.licenses.mit; + license = licenses.mit; }; } diff --git a/pkgs/development/python-modules/pybtex/default.nix b/pkgs/development/python-modules/pybtex/default.nix index a62e7e27f9cf..fb6fbf8dd381 100644 --- a/pkgs/development/python-modules/pybtex/default.nix +++ b/pkgs/development/python-modules/pybtex/default.nix @@ -1,4 +1,4 @@ -{ stdenv, buildPythonPackage, fetchPypi, latexcodec, pyyaml }: +{ lib, buildPythonPackage, fetchPypi, latexcodec, pyyaml }: buildPythonPackage rec { version = "0.23.0"; @@ -12,9 +12,9 @@ buildPythonPackage rec { sha256 = "b92be18ccd5e9a37895949dcf359a1f6890246b73646dddf1129178ee12e4bef"; }; - meta = { + meta = with lib; { homepage = "https://pybtex.org/"; description = "A BibTeX-compatible bibliography processor written in Python"; - license = stdenv.lib.licenses.mit; + license = licenses.mit; }; } diff --git a/pkgs/development/python-modules/pycassa/default.nix b/pkgs/development/python-modules/pycassa/default.nix index d366486c8f89..0e07d8d436f7 100644 --- a/pkgs/development/python-modules/pycassa/default.nix +++ b/pkgs/development/python-modules/pycassa/default.nix @@ -1,4 +1,4 @@ -{ stdenv, buildPythonPackage, fetchPypi, thrift, isPy3k }: +{ lib, buildPythonPackage, fetchPypi, thrift, isPy3k }: let @@ -30,9 +30,9 @@ buildPythonPackage rec { propagatedBuildInputs = [ thrift' ]; - meta = { + meta = with lib; { description = "A python client library for Apache Cassandra"; homepage = "https://github.com/pycassa/pycassa"; - license = stdenv.lib.licenses.mit; + license = licenses.mit; }; } diff --git a/pkgs/development/python-modules/pycdio/default.nix b/pkgs/development/python-modules/pycdio/default.nix index b290d9ea959b..712029b692ce 100644 --- a/pkgs/development/python-modules/pycdio/default.nix +++ b/pkgs/development/python-modules/pycdio/default.nix @@ -28,7 +28,7 @@ buildPythonPackage rec { nativeBuildInputs = [ nose pkgs.pkgconfig pkgs.swig ]; buildInputs = [ setuptools pkgs.libcdio ] - ++ stdenv.lib.optional stdenv.isDarwin pkgs.libiconv; + ++ lib.optional stdenv.isDarwin pkgs.libiconv; # Run tests using nosetests but first need to install the binaries # to the root source directory where they can be found. diff --git a/pkgs/development/python-modules/pycryptodome/default.nix b/pkgs/development/python-modules/pycryptodome/default.nix index 40084c2885e8..e88b8529a356 100644 --- a/pkgs/development/python-modules/pycryptodome/default.nix +++ b/pkgs/development/python-modules/pycryptodome/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchPypi, buildPythonPackage }: +{ lib, fetchPypi, buildPythonPackage }: buildPythonPackage rec { version = "3.9.9"; @@ -9,9 +9,9 @@ buildPythonPackage rec { sha256 = "910e202a557e1131b1c1b3f17a63914d57aac55cf9fb9b51644962841c3995c4"; }; - meta = { + meta = with lib; { homepage = "https://www.pycryptodome.org/"; description = "Python Cryptography Toolkit"; - platforms = stdenv.lib.platforms.unix; + platforms = platforms.unix; }; } diff --git a/pkgs/development/python-modules/pycuda/default.nix b/pkgs/development/python-modules/pycuda/default.nix index 368894228afc..1db5df28e32a 100644 --- a/pkgs/development/python-modules/pycuda/default.nix +++ b/pkgs/development/python-modules/pycuda/default.nix @@ -12,7 +12,7 @@ , cudatoolkit , python , mkDerivation -, lib, stdenv +, lib }: let compyte = import ./compyte.nix { @@ -28,7 +28,7 @@ buildPythonPackage rec { sha256 = "effa3b99b55af67f3afba9b0d1b64b4a0add4dd6a33bdd6786df1aa4cc8761a5"; }; - preConfigure = with stdenv.lib.versions; '' + preConfigure = with lib.versions; '' ${python.interpreter} configure.py --boost-inc-dir=${boost.dev}/include \ --boost-lib-dir=${boost}/lib \ --no-use-shipped-boost \ diff --git a/pkgs/development/python-modules/pydub/default.nix b/pkgs/development/python-modules/pydub/default.nix index 13b999831985..884df63ce036 100644 --- a/pkgs/development/python-modules/pydub/default.nix +++ b/pkgs/development/python-modules/pydub/default.nix @@ -13,7 +13,7 @@ buildPythonPackage rec { # disable a test that fails on aarch64 due to rounding errors - postPatch = stdenv.lib.optionalString stdenv.isAarch64 '' + postPatch = lib.optionalString stdenv.isAarch64 '' substituteInPlace test/test.py \ --replace "test_overlay_with_gain_change" "notest_overlay_with_gain_change" ''; diff --git a/pkgs/development/python-modules/pyee/default.nix b/pkgs/development/python-modules/pyee/default.nix index 3c92dee783ad..712db3e87123 100644 --- a/pkgs/development/python-modules/pyee/default.nix +++ b/pkgs/development/python-modules/pyee/default.nix @@ -21,7 +21,7 @@ buildPythonPackage rec { pytest-trio pytestrunner twisted - ] ++ stdenv.lib.optional isPy27 [ + ] ++ lib.optional isPy27 [ attrs futures pyparsing diff --git a/pkgs/development/python-modules/pyexiv2/default.nix b/pkgs/development/python-modules/pyexiv2/default.nix index cca8b552de1e..bf7afdf79e2c 100644 --- a/pkgs/development/python-modules/pyexiv2/default.nix +++ b/pkgs/development/python-modules/pyexiv2/default.nix @@ -1,4 +1,4 @@ -{ stdenv, buildPythonPackage, fetchurl, python, exiv2, scons, boost }: +{ lib, buildPythonPackage, fetchurl, python, exiv2, scons, boost }: buildPythonPackage rec { pname = "pyexiv2"; @@ -20,8 +20,8 @@ buildPythonPackage rec { buildInputs = [ python exiv2 scons boost ]; - meta = { - platforms = stdenv.lib.platforms.linux; + meta = with lib; { + platforms = platforms.linux; # Likely needs an older boost which does not have `boost_pythonXY` but `boost_python`. broken = true; # 2018-06-23 }; diff --git a/pkgs/development/python-modules/pyface/default.nix b/pkgs/development/python-modules/pyface/default.nix index db118fbbd8c2..d317ebdf21b8 100644 --- a/pkgs/development/python-modules/pyface/default.nix +++ b/pkgs/development/python-modules/pyface/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchPypi, buildPythonPackage +{ lib, fetchPypi, buildPythonPackage , setuptools, six, traits }: @@ -18,7 +18,7 @@ buildPythonPackage rec { meta = with lib; { description = "Traits-capable windowing framework"; homepage = "https://github.com/enthought/pyface"; - maintainers = with stdenv.lib.maintainers; [ knedlsepp ]; + maintainers = with maintainers; [ knedlsepp ]; license = licenses.bsdOriginal; }; } diff --git a/pkgs/development/python-modules/pyfakefs/default.nix b/pkgs/development/python-modules/pyfakefs/default.nix index 4deaa3eb2688..64ec58487c45 100644 --- a/pkgs/development/python-modules/pyfakefs/default.nix +++ b/pkgs/development/python-modules/pyfakefs/default.nix @@ -19,7 +19,7 @@ buildPythonPackage rec { --replace "test_append_mode_tell_linux_windows" "notest_append_mode_tell_linux_windows" substituteInPlace pyfakefs/tests/fake_filesystem_unittest_test.py \ --replace "test_copy_real_file" "notest_copy_real_file" - '' + (stdenv.lib.optionalString stdenv.isDarwin '' + '' + (lib.optionalString stdenv.isDarwin '' # this test fails on darwin due to case-insensitive file system substituteInPlace pyfakefs/tests/fake_os_test.py \ --replace "test_rename_dir_to_existing_dir" "notest_rename_dir_to_existing_dir" diff --git a/pkgs/development/python-modules/pyfribidi/default.nix b/pkgs/development/python-modules/pyfribidi/default.nix index 17905b2bb396..dfe5449b2826 100644 --- a/pkgs/development/python-modules/pyfribidi/default.nix +++ b/pkgs/development/python-modules/pyfribidi/default.nix @@ -1,4 +1,5 @@ -{ lib, stdenv +{ lib +, stdenv , buildPythonPackage , fetchPypi , isPyPy @@ -16,14 +17,14 @@ buildPythonPackage rec { sha256 = "64726a4a56783acdc79c6b9b3a15f16e6071077c897a0b999f3b43f744bc621c"; }; - patches = stdenv.lib.optional stdenv.cc.isClang ./pyfribidi-clang.patch; + patches = lib.optional stdenv.cc.isClang ./pyfribidi-clang.patch; propagatedBuildInputs = [ six ]; meta = with lib; { description = "A simple wrapper around fribidi"; homepage = "https://github.com/pediapress/pyfribidi"; - license = stdenv.lib.licenses.gpl2; + license = licenses.gpl2; }; } diff --git a/pkgs/development/python-modules/pygal/default.nix b/pkgs/development/python-modules/pygal/default.nix index 733bfa15a4c5..6855c9e4f02c 100644 --- a/pkgs/development/python-modules/pygal/default.nix +++ b/pkgs/development/python-modules/pygal/default.nix @@ -55,7 +55,7 @@ buildPythonPackage rec { ''; propagatedBuildInputs = [ cairosvg tinycss cssselect ] - ++ stdenv.lib.optionals (!isPyPy) [ lxml ]; + ++ lib.optionals (!isPyPy) [ lxml ]; meta = with lib; { description = "Sexy and simple python charting"; diff --git a/pkgs/development/python-modules/pygobject/3.36.nix b/pkgs/development/python-modules/pygobject/3.36.nix index 1cbf264d1e2c..ccad57eba1ed 100644 --- a/pkgs/development/python-modules/pygobject/3.36.nix +++ b/pkgs/development/python-modules/pygobject/3.36.nix @@ -8,7 +8,7 @@ buildPythonPackage rec { format = "other"; src = fetchurl { - url = "mirror://gnome/sources/${pname}/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; + url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; sha256 = "0b9CgC0c7BE7Wtqg579/N0W0RSHcIWNYjSdtXNYdcY8="; }; @@ -20,7 +20,7 @@ buildPythonPackage rec { nativeBuildInputs = [ pkg-config meson ninja gobject-introspection ]; buildInputs = [ glib gobject-introspection ] - ++ stdenv.lib.optionals stdenv.isDarwin [ which ncurses ]; + ++ lib.optionals stdenv.isDarwin [ which ncurses ]; propagatedBuildInputs = [ pycairo cairo ]; passthru = { diff --git a/pkgs/development/python-modules/pygobject/3.nix b/pkgs/development/python-modules/pygobject/3.nix index b42a772ed735..8c26ec6174b2 100644 --- a/pkgs/development/python-modules/pygobject/3.nix +++ b/pkgs/development/python-modules/pygobject/3.nix @@ -10,7 +10,7 @@ buildPythonPackage rec { format = "other"; src = fetchurl { - url = "mirror://gnome/sources/${pname}/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; + url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; sha256 = "A3LRu5Ei/Bn1AKJJsfOMK7Z0hQAPWIdJe0sgWz5whNU="; }; @@ -18,7 +18,7 @@ buildPythonPackage rec { nativeBuildInputs = [ pkg-config meson ninja gobject-introspection ]; buildInputs = [ glib gobject-introspection ] - ++ stdenv.lib.optionals stdenv.isDarwin [ which ncurses ]; + ++ lib.optionals stdenv.isDarwin [ which ncurses ]; propagatedBuildInputs = [ pycairo cairo ]; passthru = { diff --git a/pkgs/development/python-modules/pygobject/default.nix b/pkgs/development/python-modules/pygobject/default.nix index cf4f9d5cfbb4..bf42d17b4deb 100644 --- a/pkgs/development/python-modules/pygobject/default.nix +++ b/pkgs/development/python-modules/pygobject/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, python, buildPythonPackage, pkg-config, glib, isPy3k, pythonAtLeast }: +{ lib, stdenv, fetchurl, python, buildPythonPackage, pkg-config, glib, isPy3k, pythonAtLeast }: buildPythonPackage rec { pname = "pygobject"; @@ -13,7 +13,7 @@ buildPythonPackage rec { outputs = [ "out" "devdoc" ]; - patches = stdenv.lib.optionals stdenv.isDarwin [ + patches = lib.optionals stdenv.isDarwin [ ./pygobject-2.0-fix-darwin.patch ]; @@ -26,7 +26,7 @@ buildPythonPackage rec { # same site-packages: we need a pth file for both. pygtk.py would be # used to select a specific version, in our setup it should have no # effect, but we leave it in case somebody expects and calls it. - postInstall = stdenv.lib.optionalString (!isPy3k) '' + postInstall = lib.optionalString (!isPy3k) '' mv $out/lib/${python.libPrefix}/site-packages/{pygtk.pth,${pname}-${version}.pth} # Prevent wrapping of codegen files as these are meant to be @@ -34,9 +34,9 @@ buildPythonPackage rec { chmod a-x $out/share/pygobject/*/codegen/*.py ''; - meta = { + meta = with lib; { homepage = "https://pygobject.readthedocs.io/"; description = "Python bindings for GLib"; - platforms = stdenv.lib.platforms.unix; + platforms = platforms.unix; }; } diff --git a/pkgs/development/python-modules/pygtk/default.nix b/pkgs/development/python-modules/pygtk/default.nix index b3d84c213871..938b55630c06 100644 --- a/pkgs/development/python-modules/pygtk/default.nix +++ b/pkgs/development/python-modules/pygtk/default.nix @@ -8,7 +8,7 @@ buildPythonPackage rec { disabled = isPy3k; src = fetchurl { - url = "mirror://gnome/sources/${pname}/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.bz2"; + url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.bz2"; sha256 = "04k942gn8vl95kwf0qskkv6npclfm31d78ljkrkgyqxxcni1w76d"; }; @@ -27,7 +27,7 @@ buildPythonPackage rec { nativeBuildInputs = [ pkg-config ]; buildInputs = [ pango - ] ++ stdenv.lib.optional (libglade != null) libglade; + ] ++ lib.optional (libglade != null) libglade; propagatedBuildInputs = [ gtk2 pygobject2 pycairo ]; @@ -35,11 +35,11 @@ buildPythonPackage rec { buildPhase = "buildPhase"; - NIX_CFLAGS_COMPILE = stdenv.lib.optionalString stdenv.isDarwin "-ObjC"; + NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-ObjC"; installPhase = "installPhase"; - checkPhase = stdenv.lib.optionalString (libglade == null) + checkPhase = lib.optionalString (libglade == null) '' sed -i -e "s/glade = importModule('gtk.glade', buildDir)//" \ tests/common.py diff --git a/pkgs/development/python-modules/pync/default.nix b/pkgs/development/python-modules/pync/default.nix index 20811f2df9d7..9506b8bae953 100644 --- a/pkgs/development/python-modules/pync/default.nix +++ b/pkgs/development/python-modules/pync/default.nix @@ -19,7 +19,7 @@ buildPythonPackage rec { buildInputs = [ pkgs.coreutils ]; propagatedBuildInputs = [ dateutil ]; - preInstall = stdenv.lib.optionalString stdenv.isDarwin '' + preInstall = lib.optionalString stdenv.isDarwin '' sed -i 's|^\([ ]*\)self.bin_path.*$|\1self.bin_path = "${pkgs.terminal-notifier}/bin/terminal-notifier"|' build/lib/pync/TerminalNotifier.py ''; diff --git a/pkgs/development/python-modules/pynput/default.nix b/pkgs/development/python-modules/pynput/default.nix index 5f193a8ab351..49da01f8e716 100644 --- a/pkgs/development/python-modules/pynput/default.nix +++ b/pkgs/development/python-modules/pynput/default.nix @@ -12,7 +12,7 @@ buildPythonPackage rec { nativeBuildInputs = [ sphinx ]; propagatedBuildInputs = [ setuptools-lint xlib ] - ++ stdenv.lib.optionals stdenv.isLinux [ + ++ lib.optionals stdenv.isLinux [ evdev ]; diff --git a/pkgs/development/python-modules/pyobjc/default.nix b/pkgs/development/python-modules/pyobjc/default.nix index 9799cbaf0e8f..4b27bea10bc5 100644 --- a/pkgs/development/python-modules/pyobjc/default.nix +++ b/pkgs/development/python-modules/pyobjc/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchPypi, isPy3k, buildPythonPackage }: +{ lib, fetchPypi, isPy3k, buildPythonPackage }: buildPythonPackage rec { pname = "pyobjc"; @@ -13,10 +13,10 @@ buildPythonPackage rec { sha256 = "2b6c3e98f1408564ace1df36927154d7827c8e2f382386ab5d2db95c891e35a0"; }; - meta = { + meta = with lib; { description = "A bridge between the Python and Objective-C programming languages"; - license = stdenv.lib.licenses.mit; - maintainers = with stdenv.lib.maintainers; [ ]; + license = licenses.mit; + maintainers = with maintainers; [ ]; homepage = "https://pythonhosted.org/pyobjc/"; }; } diff --git a/pkgs/development/python-modules/pyopenssl/default.nix b/pkgs/development/python-modules/pyopenssl/default.nix index 023e5f12fd48..c8b3bd4158c4 100644 --- a/pkgs/development/python-modules/pyopenssl/default.nix +++ b/pkgs/development/python-modules/pyopenssl/default.nix @@ -1,4 +1,5 @@ -{ stdenv +{ lib +, stdenv , buildPythonPackage , fetchPypi , openssl @@ -13,9 +14,6 @@ , fetchpatch }: -with stdenv.lib; - - let # https://github.com/pyca/pyopenssl/issues/791 # These tests, we disable in the case that libressl is passed in as openssl. @@ -51,21 +49,20 @@ let # https://github.com/pyca/pyopenssl/issues/768 "test_wantWriteError" ] ++ ( - optionals (hasPrefix "libressl" openssl.meta.name) failingLibresslTests + lib.optionals (lib.hasPrefix "libressl" openssl.meta.name) failingLibresslTests ) ++ ( - optionals (versionAtLeast (getVersion openssl.name) "1.1") failingOpenSSL_1_1Tests + lib.optionals (lib.versionAtLeast (lib.getVersion openssl.name) "1.1") failingOpenSSL_1_1Tests ) ++ ( # https://github.com/pyca/pyopenssl/issues/974 - optionals stdenv.is32bit [ "test_verify_with_time" ] + lib.optionals stdenv.is32bit [ "test_verify_with_time" ] ); # Compose the final string expression, including the "-k" and the single quotes. - testExpression = optionalString (disabledTests != []) - "-k 'not ${concatStringsSep " and not " disabledTests}'"; + testExpression = lib.optionalString (disabledTests != []) + "-k 'not ${lib.concatStringsSep " and not " disabledTests}'"; in - buildPythonPackage rec { pname = "pyOpenSSL"; version = "20.0.0"; diff --git a/pkgs/development/python-modules/pyparted/default.nix b/pkgs/development/python-modules/pyparted/default.nix index b6768ad992d1..f46a5d2db827 100644 --- a/pkgs/development/python-modules/pyparted/default.nix +++ b/pkgs/development/python-modules/pyparted/default.nix @@ -24,7 +24,7 @@ buildPythonPackage rec { sed -i -e ' s|e\.path\.startswith("/tmp/temp-device-")|"temp-device-" in e.path| ' tests/test__ped_ped.py - '' + stdenv.lib.optionalString stdenv.isi686 '' + '' + lib.optionalString stdenv.isi686 '' # remove some integers in this test case which overflow on 32bit systems sed -i -r -e '/class *UnitGetSizeTestCase/,/^$/{/[0-9]{11}/d}' \ tests/test__ped_ped.py diff --git a/pkgs/development/python-modules/pypass/default.nix b/pkgs/development/python-modules/pypass/default.nix index 2458a29ac31d..f3e49452c89a 100644 --- a/pkgs/development/python-modules/pypass/default.nix +++ b/pkgs/development/python-modules/pypass/default.nix @@ -1,4 +1,5 @@ -{ buildPythonPackage +{ lib +, buildPythonPackage , click , colorama , enum34 @@ -11,7 +12,6 @@ , pexpect , pythonAtLeast , pythonOlder -, stdenv , substituteAll , tree , xclip @@ -43,7 +43,7 @@ buildPythonPackage rec { ]; # Remove enum34 requirement if Python >= 3.4 - postPatch = stdenv.lib.optionalString (pythonAtLeast "3.4") '' + postPatch = lib.optionalString (pythonAtLeast "3.4") '' substituteInPlace requirements.txt --replace "enum34" "" ''; @@ -53,7 +53,7 @@ buildPythonPackage rec { click colorama pexpect - ] ++ stdenv.lib.optional (pythonOlder "3.4") enum34; + ] ++ lib.optional (pythonOlder "3.4") enum34; checkInputs = [ nose ]; @@ -74,11 +74,11 @@ buildPythonPackage rec { runHook postCheck ''; - meta = { + meta = with lib; { description = "Password manager pass in Python"; homepage = "https://github.com/aviau/python-pass"; - license = stdenv.lib.licenses.gpl3Plus; - platforms = stdenv.lib.platforms.all; - maintainers = with stdenv.lib.maintainers; [ jluttine ]; + license = licenses.gpl3Plus; + platforms = platforms.all; + maintainers = with maintainers; [ jluttine ]; }; } diff --git a/pkgs/development/python-modules/pyqt/4.x.nix b/pkgs/development/python-modules/pyqt/4.x.nix index 54abcddd5d88..3427438b8a26 100644 --- a/pkgs/development/python-modules/pyqt/4.x.nix +++ b/pkgs/development/python-modules/pyqt/4.x.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, buildPythonPackage, python, dbus-python, sip, qt4, pkg-config, lndir, dbus, makeWrapper }: +{ lib, stdenv, fetchurl, buildPythonPackage, python, dbus-python, sip, qt4, pkg-config, lndir, dbus, makeWrapper }: buildPythonPackage rec { pname = "PyQt-x11-gpl"; @@ -16,13 +16,13 @@ buildPythonPackage rec { rm -rf "$out/nix-support" export PYTHONPATH=$PYTHONPATH:$out/lib/${python.libPrefix}/site-packages - ${stdenv.lib.optionalString stdenv.isDarwin '' + ${lib.optionalString stdenv.isDarwin '' export QMAKESPEC="unsupported/macx-clang-libc++" # macOS target after bootstrapping phase \ ''} substituteInPlace configure.py \ --replace 'install_dir=pydbusmoddir' "install_dir='$out/lib/${python.libPrefix}/site-packages/dbus/mainloop'" \ - ${stdenv.lib.optionalString stdenv.isDarwin '' + ${lib.optionalString stdenv.isDarwin '' --replace "qt_macx_spec = 'macx-g++'" "qt_macx_spec = 'unsupported/macx-clang-libc++'" # for bootstrapping phase \ ''} @@ -38,7 +38,7 @@ buildPythonPackage rec { "--destdir=${placeholder "out"}/${python.sitePackages}" "--plugin-destdir=${placeholder "out"}/lib/qt4/plugins" "--sipdir=${placeholder "out"}/share/sip/PyQt4" - "--dbus=${stdenv.lib.getDev dbus-python}/include/dbus-1.0" + "--dbus=${lib.getDev dbus-python}/include/dbus-1.0" "--verbose" ]; @@ -59,11 +59,11 @@ buildPythonPackage rec { qt = qt4; }; - meta = { + meta = with lib; { description = "Python bindings for Qt"; license = "GPL"; homepage = "http://www.riverbankcomputing.co.uk"; - maintainers = [ stdenv.lib.maintainers.sander ]; - platforms = stdenv.lib.platforms.mesaPlatforms; + maintainers = [ maintainers.sander ]; + platforms = platforms.mesaPlatforms; }; } diff --git a/pkgs/development/python-modules/pyscard/default.nix b/pkgs/development/python-modules/pyscard/default.nix index 9798d94900b0..28c40e5ec5fc 100644 --- a/pkgs/development/python-modules/pyscard/default.nix +++ b/pkgs/development/python-modules/pyscard/default.nix @@ -1,11 +1,8 @@ -{ stdenv, fetchPypi, buildPythonPackage, swig, pcsclite, PCSC }: +{ lib, stdenv, fetchPypi, buildPythonPackage, swig, pcsclite, PCSC }: let # Package does not support configuring the pcsc library. withApplePCSC = stdenv.isDarwin; - - inherit (stdenv.lib) getLib getDev optionalString optionals; - inherit (stdenv.hostPlatform.extensions) sharedLibrary; in buildPythonPackage rec { @@ -24,19 +21,19 @@ buildPythonPackage rec { '' else '' substituteInPlace smartcard/scard/winscarddll.c \ --replace "libpcsclite.so.1" \ - "${getLib pcsclite}/lib/libpcsclite${sharedLibrary}" + "${lib.getLib pcsclite}/lib/libpcsclite${stdenv.hostPlatform.extensions.sharedLibrary}" ''; - NIX_CFLAGS_COMPILE = optionalString (! withApplePCSC) - "-I ${getDev pcsclite}/include/PCSC"; + NIX_CFLAGS_COMPILE = lib.optionalString (! withApplePCSC) + "-I ${lib.getDev pcsclite}/include/PCSC"; propagatedBuildInputs = if withApplePCSC then [ PCSC ] else [ pcsclite ]; nativeBuildInputs = [ swig ]; - meta = { + meta = with lib; { homepage = "https://pyscard.sourceforge.io/"; description = "Smartcard library for python"; - license = stdenv.lib.licenses.lgpl21; - maintainers = with stdenv.lib.maintainers; [ layus ]; + license = licenses.lgpl21; + maintainers = with maintainers; [ layus ]; }; } diff --git a/pkgs/development/python-modules/pyscss/default.nix b/pkgs/development/python-modules/pyscss/default.nix index 87f23b8edf7c..6da19bc48ab8 100644 --- a/pkgs/development/python-modules/pyscss/default.nix +++ b/pkgs/development/python-modules/pyscss/default.nix @@ -23,8 +23,8 @@ buildPythonPackage rec { checkInputs = [ pytest ]; propagatedBuildInputs = [ six ] - ++ (stdenv.lib.optionals (pythonOlder "3.4") [ enum34 pathlib ]) - ++ (stdenv.lib.optionals (pythonOlder "2.7") [ ordereddict ]); + ++ (lib.optionals (pythonOlder "3.4") [ enum34 pathlib ]) + ++ (lib.optionals (pythonOlder "2.7") [ ordereddict ]); checkPhase = '' py.test diff --git a/pkgs/development/python-modules/pyside/apiextractor.nix b/pkgs/development/python-modules/pyside/apiextractor.nix index 10f030b13f62..9398a62997b2 100644 --- a/pkgs/development/python-modules/pyside/apiextractor.nix +++ b/pkgs/development/python-modules/pyside/apiextractor.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, cmake, libxml2, libxslt, python3, qt4 }: +{ lib, stdenv, fetchurl, cmake, libxml2, libxslt, python3, qt4 }: # This derivation does not provide any Python module and should therefore be called via `all-packages.nix`. let @@ -20,11 +20,11 @@ in stdenv.mkDerivation { nativeBuildInputs = [ cmake pythonEnv ]; buildInputs = [ qt4 libxml2 libxslt ]; - meta = { + meta = with lib; { description = "Eases the development of bindings of Qt-based libraries for high level languages by automating most of the process"; - license = stdenv.lib.licenses.gpl2; + license = licenses.gpl2; homepage = "http://www.pyside.org/docs/apiextractor/"; maintainers = [ ]; - platforms = stdenv.lib.platforms.all; + platforms = platforms.all; }; } diff --git a/pkgs/development/python-modules/pyside/generatorrunner.nix b/pkgs/development/python-modules/pyside/generatorrunner.nix index cbc586f47348..532ee6b2b24e 100644 --- a/pkgs/development/python-modules/pyside/generatorrunner.nix +++ b/pkgs/development/python-modules/pyside/generatorrunner.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, cmake, pysideApiextractor, python3, qt4 }: +{ lib, stdenv, fetchurl, cmake, pysideApiextractor, python3, qt4 }: # This derivation does not provide any Python module and should therefore be called via `all-packages.nix`. let @@ -22,11 +22,11 @@ in stdenv.mkDerivation { nativeBuildInputs = [ cmake pythonEnv ]; buildInputs = [ pysideApiextractor qt4 ]; - meta = { + meta = with lib; { description = "Eases the development of binding generators for C++ and Qt-based libraries by providing a framework to help automating most of the process"; - license = stdenv.lib.licenses.gpl2; + license = licenses.gpl2; homepage = "http://www.pyside.org/docs/generatorrunner/"; maintainers = [ ]; - platforms = stdenv.lib.platforms.all; + platforms = platforms.all; }; } diff --git a/pkgs/development/python-modules/pyspotify/default.nix b/pkgs/development/python-modules/pyspotify/default.nix index a6bf14cdca08..302eb12de5a1 100644 --- a/pkgs/development/python-modules/pyspotify/default.nix +++ b/pkgs/development/python-modules/pyspotify/default.nix @@ -22,7 +22,7 @@ buildPythonPackage rec { find -print0 | xargs -0 touch ''; - postInstall = stdenv.lib.optionalString stdenv.isDarwin '' + postInstall = lib.optionalString stdenv.isDarwin '' find "$out" -name _spotify.so -exec \ install_name_tool -change \ @loader_path/../Frameworks/libspotify.framework/libspotify \ diff --git a/pkgs/development/python-modules/pysqlite/default.nix b/pkgs/development/python-modules/pysqlite/default.nix index fec1bbd0beda..09cc312223ad 100644 --- a/pkgs/development/python-modules/pysqlite/default.nix +++ b/pkgs/development/python-modules/pysqlite/default.nix @@ -26,7 +26,7 @@ buildPythonPackage rec { substituteInPlace "setup.cfg" \ --replace "/usr/local/include" "${pkgs.sqlite.dev}/include" \ --replace "/usr/local/lib" "${pkgs.sqlite.out}/lib" - ${stdenv.lib.optionalString (!stdenv.isDarwin) ''export LDSHARED="$CC -pthread -shared"''} + ${lib.optionalString (!stdenv.isDarwin) ''export LDSHARED="$CC -pthread -shared"''} ''; meta = with lib; { diff --git a/pkgs/development/python-modules/pytest-asyncio/default.nix b/pkgs/development/python-modules/pytest-asyncio/default.nix index 961845a28e15..c621d9a47854 100644 --- a/pkgs/development/python-modules/pytest-asyncio/default.nix +++ b/pkgs/development/python-modules/pytest-asyncio/default.nix @@ -11,7 +11,7 @@ buildPythonPackage rec { }; buildInputs = [ pytest ] - ++ stdenv.lib.optionals isPy35 [ async_generator ]; + ++ lib.optionals isPy35 [ async_generator ]; # No tests in archive doCheck = false; diff --git a/pkgs/development/python-modules/pytest/4.nix b/pkgs/development/python-modules/pytest/4.nix index 88963537c9d5..63e57a7f769b 100644 --- a/pkgs/development/python-modules/pytest/4.nix +++ b/pkgs/development/python-modules/pytest/4.nix @@ -14,8 +14,8 @@ buildPythonPackage rec { checkInputs = [ hypothesis mock ]; buildInputs = [ setuptools_scm ]; propagatedBuildInputs = [ attrs py setuptools six pluggy more-itertools atomicwrites wcwidth packaging ] - ++ stdenv.lib.optionals (!isPy3k) [ funcsigs ] - ++ stdenv.lib.optionals (pythonOlder "3.6") [ pathlib2 ]; + ++ lib.optionals (!isPy3k) [ funcsigs ] + ++ lib.optionals (pythonOlder "3.6") [ pathlib2 ]; doCheck = !isPyPy; # https://github.com/pytest-dev/pytest/issues/3460 checkPhase = '' diff --git a/pkgs/development/python-modules/pytest/5.nix b/pkgs/development/python-modules/pytest/5.nix index ade36f4aa0b2..1293cc94b0f1 100644 --- a/pkgs/development/python-modules/pytest/5.nix +++ b/pkgs/development/python-modules/pytest/5.nix @@ -43,7 +43,7 @@ buildPythonPackage rec { six toml wcwidth - ] ++ stdenv.lib.optionals (pythonOlder "3.6") [ pathlib2 ]; + ] ++ lib.optionals (pythonOlder "3.6") [ pathlib2 ]; doCheck = !isPyPy; # https://github.com/pytest-dev/pytest/issues/3460 diff --git a/pkgs/development/python-modules/pytest/default.nix b/pkgs/development/python-modules/pytest/default.nix index 3c8e00f1af8d..6f5c99a99b19 100644 --- a/pkgs/development/python-modules/pytest/default.nix +++ b/pkgs/development/python-modules/pytest/default.nix @@ -45,7 +45,7 @@ buildPythonPackage rec { six toml wcwidth - ] ++ stdenv.lib.optionals (pythonOlder "3.6") [ pathlib2 ]; + ] ++ lib.optionals (pythonOlder "3.6") [ pathlib2 ]; doCheck = !isPyPy; # https://github.com/pytest-dev/pytest/issues/3460 diff --git a/pkgs/development/python-modules/python-engineio/default.nix b/pkgs/development/python-modules/python-engineio/default.nix index 19c8941d2fcb..ed03d9663076 100644 --- a/pkgs/development/python-modules/python-engineio/default.nix +++ b/pkgs/development/python-modules/python-engineio/default.nix @@ -38,7 +38,7 @@ buildPythonPackage rec { doCheck = !stdenv.isDarwin; - preCheck = stdenv.lib.optionalString stdenv.isLinux '' + preCheck = lib.optionalString stdenv.isLinux '' echo "nameserver 127.0.0.1" > resolv.conf export NIX_REDIRECTS=/etc/protocols=${iana-etc}/etc/protocols:/etc/resolv.conf=$(realpath resolv.conf) \ LD_PRELOAD=${libredirect}/lib/libredirect.so diff --git a/pkgs/development/python-modules/python-jsonrpc-server/default.nix b/pkgs/development/python-modules/python-jsonrpc-server/default.nix index 9879a441b3e2..3a0ab33363ec 100644 --- a/pkgs/development/python-modules/python-jsonrpc-server/default.nix +++ b/pkgs/development/python-modules/python-jsonrpc-server/default.nix @@ -23,7 +23,7 @@ buildPythonPackage rec { ]; propagatedBuildInputs = [ future ujson ] - ++ stdenv.lib.optional (pythonOlder "3.2") futures; + ++ lib.optional (pythonOlder "3.2") futures; meta = with lib; { homepage = "https://github.com/palantir/python-jsonrpc-server"; diff --git a/pkgs/development/python-modules/python-language-server/default.nix b/pkgs/development/python-modules/python-language-server/default.nix index dc3b33a6f539..f22652d0f73c 100644 --- a/pkgs/development/python-modules/python-language-server/default.nix +++ b/pkgs/development/python-modules/python-language-server/default.nix @@ -31,16 +31,16 @@ buildPythonPackage rec { }; propagatedBuildInputs = [ setuptools jedi pluggy future python-jsonrpc-server flake8 ujson ] - ++ stdenv.lib.optional (withProvider "autopep8") autopep8 - ++ stdenv.lib.optional (withProvider "mccabe") mccabe - ++ stdenv.lib.optional (withProvider "pycodestyle") pycodestyle - ++ stdenv.lib.optional (withProvider "pydocstyle") pydocstyle - ++ stdenv.lib.optional (withProvider "pyflakes") pyflakes - ++ stdenv.lib.optional (withProvider "pylint") pylint - ++ stdenv.lib.optional (withProvider "rope") rope - ++ stdenv.lib.optional (withProvider "yapf") yapf - ++ stdenv.lib.optional isPy27 configparser - ++ stdenv.lib.optionals (pythonOlder "3.2") [ backports_functools_lru_cache futures ]; + ++ lib.optional (withProvider "autopep8") autopep8 + ++ lib.optional (withProvider "mccabe") mccabe + ++ lib.optional (withProvider "pycodestyle") pycodestyle + ++ lib.optional (withProvider "pydocstyle") pydocstyle + ++ lib.optional (withProvider "pyflakes") pyflakes + ++ lib.optional (withProvider "pylint") pylint + ++ lib.optional (withProvider "rope") rope + ++ lib.optional (withProvider "yapf") yapf + ++ lib.optional isPy27 configparser + ++ lib.optionals (pythonOlder "3.2") [ backports_functools_lru_cache futures ]; # The tests require all the providers, disable otherwise. @@ -68,7 +68,7 @@ buildPythonPackage rec { "test_snippet_parsing" "test_numpy_hover" "test_symbols" - ] ++ stdenv.lib.optional isPy27 "test_flake8_lint"; + ] ++ lib.optional isPy27 "test_flake8_lint"; meta = with lib; { homepage = "https://github.com/palantir/python-language-server"; diff --git a/pkgs/development/python-modules/python-mapnik/default.nix b/pkgs/development/python-modules/python-mapnik/default.nix index e129bf452195..fe68ed60e372 100644 --- a/pkgs/development/python-modules/python-mapnik/default.nix +++ b/pkgs/development/python-modules/python-mapnik/default.nix @@ -30,7 +30,7 @@ in buildPythonPackage rec { disabled = isPyPy; doCheck = false; # doesn't find needed test data files preBuild = let - pythonVersion = with stdenv.lib.versions; "${major python.version}${minor python.version}"; + pythonVersion = with lib.versions; "${major python.version}${minor python.version}"; in '' export BOOST_PYTHON_LIB="boost_python${pythonVersion}" export BOOST_THREAD_LIB="boost_thread" diff --git a/pkgs/development/python-modules/python-redis-lock/default.nix b/pkgs/development/python-modules/python-redis-lock/default.nix index 7cf2affc4174..235d085fffdb 100644 --- a/pkgs/development/python-modules/python-redis-lock/default.nix +++ b/pkgs/development/python-modules/python-redis-lock/default.nix @@ -24,7 +24,7 @@ buildPythonPackage rec { ''; propagatedBuildInputs = [ redis ] - ++ stdenv.lib.optional withDjango django_redis; + ++ lib.optional withDjango django_redis; meta = with lib; { diff --git a/pkgs/development/python-modules/python-xmp-toolkit/default.nix b/pkgs/development/python-modules/python-xmp-toolkit/default.nix index ff4942abef55..3e6d72845687 100644 --- a/pkgs/development/python-modules/python-xmp-toolkit/default.nix +++ b/pkgs/development/python-modules/python-xmp-toolkit/default.nix @@ -26,7 +26,7 @@ buildPythonPackage { buildInputs = [ exempi ]; - checkInputs = stdenv.lib.optionals (pythonOlder "3.3") [ mock ]; + checkInputs = lib.optionals (pythonOlder "3.3") [ mock ]; propagatedBuildInputs = [ pytz ]; diff --git a/pkgs/development/python-modules/pythonocc-core/default.nix b/pkgs/development/python-modules/pythonocc-core/default.nix index cbcf4ab9d02d..d1d06d22c641 100644 --- a/pkgs/development/python-modules/pythonocc-core/default.nix +++ b/pkgs/development/python-modules/pythonocc-core/default.nix @@ -23,7 +23,7 @@ stdenv.mkDerivation rec { buildInputs = [ python opencascade smesh freetype libGL libGLU libX11 - ] ++ stdenv.lib.optionals stdenv.isDarwin [ Cocoa ]; + ] ++ lib.optionals stdenv.isDarwin [ Cocoa ]; cmakeFlags = [ "-Wno-dev" diff --git a/pkgs/development/python-modules/pytorch/bin.nix b/pkgs/development/python-modules/pytorch/bin.nix index a25f2013adf7..1ffda5c86b0e 100644 --- a/pkgs/development/python-modules/pytorch/bin.nix +++ b/pkgs/development/python-modules/pytorch/bin.nix @@ -52,7 +52,7 @@ in buildPythonPackage { ''; postFixup = let - rpath = stdenv.lib.makeLibraryPath [ stdenv.cc.cc.lib nvidia_x11 ]; + rpath = lib.makeLibraryPath [ stdenv.cc.cc.lib nvidia_x11 ]; in '' find $out/${python.sitePackages}/torch/lib -type f \( -name '*.so' -or -name '*.so.*' \) | while read lib; do echo "setting rpath for $lib..." diff --git a/pkgs/development/python-modules/pytorch/default.nix b/pkgs/development/python-modules/pytorch/default.nix index 822586bf190c..db1914f4ee7b 100644 --- a/pkgs/development/python-modules/pytorch/default.nix +++ b/pkgs/development/python-modules/pytorch/default.nix @@ -265,7 +265,7 @@ in buildPythonPackage rec { cp -r $out/${python.sitePackages}/torch/lib $lib/lib ''; - postFixup = stdenv.lib.optionalString stdenv.isDarwin '' + postFixup = lib.optionalString stdenv.isDarwin '' for f in $(ls $lib/lib/*.dylib); do install_name_tool -id $lib/lib/$(basename $f) $f || true done diff --git a/pkgs/development/python-modules/pyutil/default.nix b/pkgs/development/python-modules/pyutil/default.nix index effb9f7b7e67..f1c0d3be8ccf 100644 --- a/pkgs/development/python-modules/pyutil/default.nix +++ b/pkgs/development/python-modules/pyutil/default.nix @@ -24,7 +24,7 @@ buildPythonPackage rec { # package, apparently some kind of plugin. doCheck = false; - prePatch = stdenv.lib.optionalString isPyPy '' + prePatch = lib.optionalString isPyPy '' grep -rl 'utf-8-with-signature-unix' ./ | xargs sed -i -e "s|utf-8-with-signature-unix|utf-8|g" ''; diff --git a/pkgs/development/python-modules/rbtools/default.nix b/pkgs/development/python-modules/rbtools/default.nix index f1c9685d5cca..1c99ee0fc8df 100644 --- a/pkgs/development/python-modules/rbtools/default.nix +++ b/pkgs/development/python-modules/rbtools/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv +{ lib , buildPythonPackage , fetchurl , isPy3k @@ -16,7 +16,7 @@ buildPythonPackage rec { disabled = !isPy3k; src = fetchurl { - url = "https://downloads.reviewboard.org/releases/RBTools/${stdenv.lib.versions.majorMinor version}/RBTools-${version}.tar.gz"; + url = "https://downloads.reviewboard.org/releases/RBTools/${lib.versions.majorMinor version}/RBTools-${version}.tar.gz"; sha256 = "577c2f8bbf88f77bda84ee95af0310b59111c156f48a5aab56ca481e2f77eaf4"; }; diff --git a/pkgs/development/python-modules/reikna/default.nix b/pkgs/development/python-modules/reikna/default.nix index ebe3dc772d72..896bc8e02f09 100644 --- a/pkgs/development/python-modules/reikna/default.nix +++ b/pkgs/development/python-modules/reikna/default.nix @@ -1,4 +1,4 @@ -{ stdenv +{ lib , fetchPypi , buildPythonPackage , sphinx @@ -23,8 +23,8 @@ buildPythonPackage rec { checkInputs = [ sphinx pytestcov pytest ]; propagatedBuildInputs = [ Mako numpy funcsigs ] - ++ stdenv.lib.optional withCuda pycuda - ++ stdenv.lib.optional withOpenCL pyopencl; + ++ lib.optional withCuda pycuda + ++ lib.optional withOpenCL pyopencl; checkPhase = '' py.test @@ -33,11 +33,11 @@ buildPythonPackage rec { # Requires device doCheck = false; - meta = { + meta = with lib; { description = "GPGPU algorithms for PyCUDA and PyOpenCL"; homepage = "https://github.com/fjarri/reikna"; - license = stdenv.lib.licenses.mit; - maintainers = [ stdenv.lib.maintainers.fridh ]; + license = licenses.mit; + maintainers = [ maintainers.fridh ]; }; diff --git a/pkgs/development/python-modules/rfc6555/default.nix b/pkgs/development/python-modules/rfc6555/default.nix index 0bd7b0ca686c..4e47915bdf76 100644 --- a/pkgs/development/python-modules/rfc6555/default.nix +++ b/pkgs/development/python-modules/rfc6555/default.nix @@ -1,4 +1,4 @@ -{ stdenv, buildPythonPackage, fetchPypi, pythonPackages }: +{ lib, buildPythonPackage, fetchPypi, pythonPackages }: buildPythonPackage rec { pname = "rfc6555"; @@ -19,10 +19,10 @@ buildPythonPackage rec { py.test tests/ ''; - meta = { + meta = with lib; { description = "Python implementation of the Happy Eyeballs Algorithm"; homepage = "https://pypi.org/project/rfc6555"; - license = stdenv.lib.licenses.asl20; - maintainers = with stdenv.lib.maintainers; [ endocrimes ]; + license = licenses.asl20; + maintainers = with maintainers; [ endocrimes ]; }; } diff --git a/pkgs/development/python-modules/rich/default.nix b/pkgs/development/python-modules/rich/default.nix index 1e667f1f3de6..d19f47281cdc 100644 --- a/pkgs/development/python-modules/rich/default.nix +++ b/pkgs/development/python-modules/rich/default.nix @@ -32,7 +32,7 @@ buildPythonPackage rec { ipywidgets pygments typing-extensions - ] ++ stdenv.lib.optional (pythonOlder "3.7") dataclasses; + ] ++ lib.optional (pythonOlder "3.7") dataclasses; checkInputs = [ pytestCheckHook ]; pythonImportsCheck = [ "rich" ]; diff --git a/pkgs/development/python-modules/rsa/4_0.nix b/pkgs/development/python-modules/rsa/4_0.nix index a6aa89b2ea1e..8400647aaad6 100644 --- a/pkgs/development/python-modules/rsa/4_0.nix +++ b/pkgs/development/python-modules/rsa/4_0.nix @@ -20,7 +20,7 @@ buildPythonPackage rec { checkInputs = [ unittest2 mock ]; propagatedBuildInputs = [ pyasn1 ]; - preConfigure = stdenv.lib.optionalString (isPy3k && pythonOlder "3.7") '' + preConfigure = lib.optionalString (isPy3k && pythonOlder "3.7") '' substituteInPlace setup.py --replace "open('README.md')" "open('README.md',encoding='utf-8')" ''; diff --git a/pkgs/development/python-modules/rsa/default.nix b/pkgs/development/python-modules/rsa/default.nix index 1f26350fc36e..b688369beb56 100644 --- a/pkgs/development/python-modules/rsa/default.nix +++ b/pkgs/development/python-modules/rsa/default.nix @@ -21,7 +21,7 @@ buildPythonPackage rec { checkInputs = [ unittest2 mock ]; propagatedBuildInputs = [ pyasn1 ]; - preConfigure = stdenv.lib.optionalString (isPy3k && pythonOlder "3.7") '' + preConfigure = lib.optionalString (isPy3k && pythonOlder "3.7") '' substituteInPlace setup.py --replace "open('README.md')" "open('README.md',encoding='utf-8')" ''; diff --git a/pkgs/development/python-modules/s3transfer/default.nix b/pkgs/development/python-modules/s3transfer/default.nix index 27551a798d7b..6f816fc9bb89 100644 --- a/pkgs/development/python-modules/s3transfer/default.nix +++ b/pkgs/development/python-modules/s3transfer/default.nix @@ -1,4 +1,4 @@ -{ stdenv +{ lib , fetchPypi , pythonOlder , buildPythonPackage @@ -23,7 +23,7 @@ buildPythonPackage rec { propagatedBuildInputs = [ botocore - ] ++ stdenv.lib.optional (pythonOlder "3") futures; + ] ++ lib.optional (pythonOlder "3") futures; buildInputs = [ docutils @@ -43,9 +43,9 @@ buildPythonPackage rec { # version on pypi has no tests/ dir doCheck = false; - meta = { + meta = with lib; { homepage = "https://github.com/boto/s3transfer"; - license = stdenv.lib.licenses.asl20; + license = licenses.asl20; description = "A library for managing Amazon S3 transfers"; }; } diff --git a/pkgs/development/python-modules/scrapy/default.nix b/pkgs/development/python-modules/scrapy/default.nix index 48bafa41dff7..6887eded3bfd 100644 --- a/pkgs/development/python-modules/scrapy/default.nix +++ b/pkgs/development/python-modules/scrapy/default.nix @@ -80,7 +80,7 @@ buildPythonPackage rec { "test_retry_dns_error" "test_custom_asyncio_loop_enabled_true" "test_custom_loop_asyncio" - ] ++ stdenv.lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.isDarwin [ "test_xmliter_encoding" "test_download" ]; diff --git a/pkgs/development/python-modules/screeninfo/default.nix b/pkgs/development/python-modules/screeninfo/default.nix index f53a7053ff58..f71f8d0c263a 100644 --- a/pkgs/development/python-modules/screeninfo/default.nix +++ b/pkgs/development/python-modules/screeninfo/default.nix @@ -23,7 +23,7 @@ buildPythonApplication rec { --replace "load_library(\"Xrandr\")" "ctypes.cdll.LoadLibrary(\"${libXrandr}/lib/libXrandr.so\")" ''; - propagatedBuildInputs = stdenv.lib.optional isPy36 dataclasses; + propagatedBuildInputs = lib.optional isPy36 dataclasses; buildInputs = [ libX11 libXinerama libXrandr]; diff --git a/pkgs/development/python-modules/selenium/default.nix b/pkgs/development/python-modules/selenium/default.nix index b32dfe2653e4..664f84933ed7 100644 --- a/pkgs/development/python-modules/selenium/default.nix +++ b/pkgs/development/python-modules/selenium/default.nix @@ -36,7 +36,7 @@ buildPythonPackage rec { geckodriver urllib3 ]; - patchPhase = stdenv.lib.optionalString stdenv.isLinux '' + patchPhase = lib.optionalString stdenv.isLinux '' cp "${x_ignore_nofocus}/cpp/linux-specific/"* . substituteInPlace x_ignore_nofocus.c --replace "/usr/lib/libX11.so.6" "${xorg.libX11.out}/lib/libX11.so.6" cc -c -fPIC x_ignore_nofocus.c -o x_ignore_nofocus.o diff --git a/pkgs/development/python-modules/sentry-sdk/default.nix b/pkgs/development/python-modules/sentry-sdk/default.nix index b846c0bc743b..ea9bbc1f0c3f 100644 --- a/pkgs/development/python-modules/sentry-sdk/default.nix +++ b/pkgs/development/python-modules/sentry-sdk/default.nix @@ -38,7 +38,7 @@ buildPythonPackage rec { checkInputs = [ blinker botocore chalice django flask tornado bottle rq falcon sqlalchemy werkzeug trytond executing pure-eval asttokens ] - ++ stdenv.lib.optionals isPy3k [ celery pyramid sanic aiohttp ]; + ++ lib.optionals isPy3k [ celery pyramid sanic aiohttp ]; propagatedBuildInputs = [ urllib3 certifi ]; diff --git a/pkgs/development/python-modules/shapely/default.nix b/pkgs/development/python-modules/shapely/default.nix index f852f77bcfda..b5dd0be5445c 100644 --- a/pkgs/development/python-modules/shapely/default.nix +++ b/pkgs/development/python-modules/shapely/default.nix @@ -29,7 +29,7 @@ buildPythonPackage rec { (substituteAll { src = ./library-paths.patch; libgeos_c = GEOS_LIBRARY_PATH; - libc = stdenv.lib.optionalString (!stdenv.isDarwin) "${stdenv.cc.libc}/lib/libc${stdenv.hostPlatform.extensions.sharedLibrary}.6"; + libc = lib.optionalString (!stdenv.isDarwin) "${stdenv.cc.libc}/lib/libc${stdenv.hostPlatform.extensions.sharedLibrary}.6"; }) ]; diff --git a/pkgs/development/python-modules/simplebayes/default.nix b/pkgs/development/python-modules/simplebayes/default.nix index b7dd0310a087..ed86b48fc072 100644 --- a/pkgs/development/python-modules/simplebayes/default.nix +++ b/pkgs/development/python-modules/simplebayes/default.nix @@ -21,7 +21,7 @@ buildPythonPackage { checkInputs = [ nose mock ]; - postPatch = stdenv.lib.optionalString isPy3k '' + postPatch = lib.optionalString isPy3k '' sed -i -e 's/open *(\([^)]*\))/open(\1, encoding="utf-8")/' setup.py ''; diff --git a/pkgs/development/python-modules/spacy/models.nix b/pkgs/development/python-modules/spacy/models.nix index 4279383ae6b1..8c57d2e0d262 100644 --- a/pkgs/development/python-modules/spacy/models.nix +++ b/pkgs/development/python-modules/spacy/models.nix @@ -1,4 +1,4 @@ -{ stdenv, lib, buildPythonPackage, fetchurl, jieba, pkuseg, spacy }: +{ lib, buildPythonPackage, fetchurl, jieba, pkuseg, spacy }: let buildModelPackage = { pname, version, sha256, license }: let @@ -24,8 +24,8 @@ let }; }; - makeModelSet = models: with stdenv.lib; listToAttrs (map (m: nameValuePair m.pname (buildModelPackage m)) models); + makeModelSet = models: with lib; listToAttrs (map (m: nameValuePair m.pname (buildModelPackage m)) models); -in makeModelSet (stdenv.lib.importJSON ./models.json) +in makeModelSet (lib.importJSON ./models.json) # cat models.json | jq -r '.[] | @uri "https://github.com/explosion/spacy-models/releases/download/\(.pname)-\(.version)/\(.pname)-\(.version).tar.gz"' | xargs -n1 nix-prefetch-url diff --git a/pkgs/development/python-modules/stringtemplate/default.nix b/pkgs/development/python-modules/stringtemplate/default.nix index c70cac59920e..8bdb69a3074e 100644 --- a/pkgs/development/python-modules/stringtemplate/default.nix +++ b/pkgs/development/python-modules/stringtemplate/default.nix @@ -1,4 +1,4 @@ -{stdenv, fetchurl, buildPythonPackage, antlr, isPy3k}: +{ lib, fetchurl, buildPythonPackage, antlr, isPy3k }: buildPythonPackage rec { pname = "PyStringTemplate"; @@ -16,9 +16,9 @@ buildPythonPackage rec { # No tests included in archive doCheck = false; - meta = { + meta = with lib; { homepage = "https://www.stringtemplate.org/"; description = "Text Templating Library"; - platforms = stdenv.lib.platforms.linux; + platforms = platforms.linux; }; } diff --git a/pkgs/development/python-modules/tables/3.5.nix b/pkgs/development/python-modules/tables/3.5.nix index bf0eb51c851c..efc47a1ad3f4 100644 --- a/pkgs/development/python-modules/tables/3.5.nix +++ b/pkgs/development/python-modules/tables/3.5.nix @@ -1,8 +1,6 @@ -{ stdenv, lib, fetchPypi, python, buildPythonPackage +{ lib, fetchPypi, python, buildPythonPackage , cython, bzip2, lzo, numpy, numexpr, hdf5, six, c-blosc, mock }: -with stdenv.lib; - buildPythonPackage rec { version = "3.5.2"; pname = "tables"; @@ -18,10 +16,10 @@ buildPythonPackage rec { # The setup script complains about missing run-paths, but they are # actually set. setupPyBuildFlags = [ - "--hdf5=${getDev hdf5}" - "--lzo=${getDev lzo}" - "--bzip2=${getDev bzip2}" - "--blosc=${getDev c-blosc}" + "--hdf5=${lib.getDev hdf5}" + "--lzo=${lib.getDev lzo}" + "--bzip2=${lib.getDev bzip2}" + "--blosc=${lib.getDev c-blosc}" ]; # Run the test suite. # It requires the build path to be in the python search path. @@ -50,9 +48,9 @@ buildPythonPackage rec { # Disable tests until the failure described above is fixed. doCheck = false; - meta = { + meta = with lib; { description = "Hierarchical datasets for Python"; homepage = "http://www.pytables.org/"; - license = stdenv.lib.licenses.bsd2; + license = licenses.bsd2; }; } diff --git a/pkgs/development/python-modules/tables/default.nix b/pkgs/development/python-modules/tables/default.nix index cd2af0dc28d6..fe49ab4d9ed6 100644 --- a/pkgs/development/python-modules/tables/default.nix +++ b/pkgs/development/python-modules/tables/default.nix @@ -1,8 +1,6 @@ -{ stdenv, lib, fetchPypi, python, buildPythonPackage, isPy38 +{ lib, fetchPypi, python, buildPythonPackage, isPy38 , cython, bzip2, lzo, numpy, numexpr, hdf5, six, c-blosc, mock }: -with stdenv.lib; - buildPythonPackage rec { version = "3.6.1"; pname = "tables"; @@ -30,10 +28,10 @@ buildPythonPackage rec { # The setup script complains about missing run-paths, but they are # actually set. setupPyBuildFlags = [ - "--hdf5=${getDev hdf5}" - "--lzo=${getDev lzo}" - "--bzip2=${getDev bzip2}" - "--blosc=${getDev c-blosc}" + "--hdf5=${lib.getDev hdf5}" + "--lzo=${lib.getDev lzo}" + "--bzip2=${lib.getDev bzip2}" + "--blosc=${lib.getDev c-blosc}" ]; # Run the test suite. # It requires the build path to be in the python search path. @@ -62,9 +60,9 @@ buildPythonPackage rec { # Disable tests until the failure described above is fixed. doCheck = false; - meta = { + meta = with lib; { description = "Hierarchical datasets for Python"; homepage = "http://www.pytables.org/"; - license = stdenv.lib.licenses.bsd2; + license = licenses.bsd2; }; } diff --git a/pkgs/development/python-modules/tatsu/default.nix b/pkgs/development/python-modules/tatsu/default.nix index 0469fc30e750..cba34a95a7bd 100644 --- a/pkgs/development/python-modules/tatsu/default.nix +++ b/pkgs/development/python-modules/tatsu/default.nix @@ -25,8 +25,8 @@ buildPythonPackage rec { nativeBuildInputs = [ pytestrunner ]; propagatedBuildInputs = [ colorama mypy pyyaml regex ] - ++ stdenv.lib.optionals (pythonOlder "3.7") [ dataclasses ] - ++ stdenv.lib.optionals (pythonOlder "3.5") [ typing ]; + ++ lib.optionals (pythonOlder "3.7") [ dataclasses ] + ++ lib.optionals (pythonOlder "3.5") [ typing ]; checkInputs = [ pytest-mypy ]; checkPhase = '' diff --git a/pkgs/development/python-modules/tensorflow/bin.nix b/pkgs/development/python-modules/tensorflow/bin.nix index c0a9d5eadaff..ef6d4f45ef9b 100644 --- a/pkgs/development/python-modules/tensorflow/bin.nix +++ b/pkgs/development/python-modules/tensorflow/bin.nix @@ -125,7 +125,7 @@ in buildPythonPackage { zlib ]; - rpath = stdenv.lib.makeLibraryPath (libpaths ++ cudapaths); + rpath = lib.makeLibraryPath (libpaths ++ cudapaths); in lib.optionalString stdenv.isLinux '' # This is an array containing all the directories in the tensorflow2 diff --git a/pkgs/development/python-modules/tkinter/default.nix b/pkgs/development/python-modules/tkinter/default.nix index 1efebed98721..9f82dee45ef0 100644 --- a/pkgs/development/python-modules/tkinter/default.nix +++ b/pkgs/development/python-modules/tkinter/default.nix @@ -1,4 +1,5 @@ -{ stdenv +{ lib +, stdenv , buildPythonPackage , python , py @@ -17,7 +18,7 @@ buildPythonPackage { # Move the tkinter module mkdir -p $out/${py.sitePackages} mv lib/${py.libPrefix}/lib-dynload/_tkinter* $out/${py.sitePackages}/ - '' + stdenv.lib.optionalString (!stdenv.isDarwin) '' + '' + lib.optionalString (!stdenv.isDarwin) '' # Update the rpath to point to python without x11Support old_rpath=$(patchelf --print-rpath $out/${py.sitePackages}/_tkinter*) new_rpath=$(sed "s#${py}#${python}#g" <<< "$old_rpath" ) diff --git a/pkgs/development/python-modules/todoist/default.nix b/pkgs/development/python-modules/todoist/default.nix index ac7817962300..62749d3b02f6 100644 --- a/pkgs/development/python-modules/todoist/default.nix +++ b/pkgs/development/python-modules/todoist/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchPypi, buildPythonPackage +{ lib, fetchPypi, buildPythonPackage , requests, fetchpatch, pythonOlder, typing }: @@ -23,12 +23,12 @@ buildPythonPackage rec { }) ]; - propagatedBuildInputs = [ requests ] ++ stdenv.lib.optional (pythonOlder "3.5") typing; + propagatedBuildInputs = [ requests ] ++ lib.optional (pythonOlder "3.5") typing; - meta = { + meta = with lib; { description = "The official Todoist Python API library"; homepage = "https://todoist-python.readthedocs.io/en/latest/"; - license = stdenv.lib.licenses.mit; - maintainers = with stdenv.lib.maintainers; [ ma27 ]; + license = licenses.mit; + maintainers = with maintainers; [ ma27 ]; }; } diff --git a/pkgs/development/python-modules/trackpy/default.nix b/pkgs/development/python-modules/trackpy/default.nix index 6132a30c4141..ff4c4a767583 100644 --- a/pkgs/development/python-modules/trackpy/default.nix +++ b/pkgs/development/python-modules/trackpy/default.nix @@ -35,7 +35,7 @@ buildPythonPackage rec { ]; checkPhase = '' - ${stdenv.lib.optionalString (stdenv.isDarwin) '' + ${lib.optionalString (stdenv.isDarwin) '' # specifically needed for darwin export HOME=$(mktemp -d) mkdir -p $HOME/.matplotlib diff --git a/pkgs/development/python-modules/transformers/default.nix b/pkgs/development/python-modules/transformers/default.nix index ee288f7626b8..594204754408 100644 --- a/pkgs/development/python-modules/transformers/default.nix +++ b/pkgs/development/python-modules/transformers/default.nix @@ -35,7 +35,7 @@ buildPythonPackage rec { sacremoses tokenizers tqdm - ] ++ stdenv.lib.optionals (pythonOlder "3.8") [ importlib-metadata ]; + ] ++ lib.optionals (pythonOlder "3.8") [ importlib-metadata ]; # Many tests require internet access. doCheck = false; diff --git a/pkgs/development/python-modules/trytond/default.nix b/pkgs/development/python-modules/trytond/default.nix index 7db53969402b..68254d8601ec 100644 --- a/pkgs/development/python-modules/trytond/default.nix +++ b/pkgs/development/python-modules/trytond/default.nix @@ -1,4 +1,4 @@ -{ stdenv +{ lib , buildPythonApplication , fetchPypi , pythonOlder @@ -21,8 +21,6 @@ , withPostgresql ? true }: -with stdenv.lib; - buildPythonApplication rec { pname = "trytond"; version = "5.8.2"; @@ -56,14 +54,14 @@ buildPythonApplication rec { python-Levenshtein simplejson html2text - ] ++ stdenv.lib.optional withPostgresql psycopg2; + ] ++ lib.optional withPostgresql psycopg2; # If unset, trytond will try to mkdir /homeless-shelter preCheck = '' export HOME=$(mktemp -d) ''; - meta = { + meta = with lib; { description = "The server of the Tryton application platform"; longDescription = '' The server for Tryton, a three-tier high-level general purpose diff --git a/pkgs/development/python-modules/tumpa/default.nix b/pkgs/development/python-modules/tumpa/default.nix index 28560feb04fb..6d953740eb80 100644 --- a/pkgs/development/python-modules/tumpa/default.nix +++ b/pkgs/development/python-modules/tumpa/default.nix @@ -1,4 +1,4 @@ -{ stdenv +{ lib , buildPythonPackage , fetchFromGitHub , setuptools @@ -27,7 +27,7 @@ buildPythonPackage rec { doCheck = false; - meta = with stdenv.lib; { + meta = with lib; { description = "OpenPGP key creation and smartcard access"; homepage = "https://github.com/kushaldas/tumpa"; license = licenses.gpl3Plus; diff --git a/pkgs/development/python-modules/twisted/default.nix b/pkgs/development/python-modules/twisted/default.nix index efec0b737bce..421565725b14 100644 --- a/pkgs/development/python-modules/twisted/default.nix +++ b/pkgs/development/python-modules/twisted/default.nix @@ -30,7 +30,7 @@ buildPythonPackage rec { # Patch t.p._inotify to point to libc. Without this, # twisted.python.runtime.platform.supportsINotify() == False - patchPhase = stdenv.lib.optionalString stdenv.isLinux '' + patchPhase = lib.optionalString stdenv.isLinux '' substituteInPlace src/twisted/python/_inotify.py --replace \ "ctypes.util.find_library('c')" "'${stdenv.glibc.out}/lib/libc.so.6'" ''; diff --git a/pkgs/development/python-modules/unicorn/default.nix b/pkgs/development/python-modules/unicorn/default.nix index 215a32e3b60f..484f422adf3e 100644 --- a/pkgs/development/python-modules/unicorn/default.nix +++ b/pkgs/development/python-modules/unicorn/default.nix @@ -2,7 +2,7 @@ buildPythonPackage rec { pname = "unicorn"; - version = stdenv.lib.getVersion unicorn-emu; + version = lib.getVersion unicorn-emu; src = unicorn-emu.src; sourceRoot = "source/bindings/python"; diff --git a/pkgs/development/python-modules/urllib3/default.nix b/pkgs/development/python-modules/urllib3/default.nix index 4bf364391744..6cf7ce34d388 100644 --- a/pkgs/development/python-modules/urllib3/default.nix +++ b/pkgs/development/python-modules/urllib3/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, buildPythonPackage, fetchPypi +{ lib, buildPythonPackage, fetchPypi , pytest, mock, tornado, pyopenssl, cryptography , idna, certifi, ipaddress, pysocks }: @@ -11,7 +11,7 @@ buildPythonPackage rec { sha256 = "19188f96923873c92ccb987120ec4acaa12f0461fa9ce5d3d0772bc965a39e08"; }; - NOSE_EXCLUDE = stdenv.lib.concatStringsSep "," [ + NOSE_EXCLUDE = lib.concatStringsSep "," [ "test_headers" "test_headerdict" "test_can_validate_ip_san" "test_delayed_body_read_timeout" "test_timeout_errors_cause_retries" "test_select_multiple_interrupts_with_event" ]; diff --git a/pkgs/development/python-modules/watchdog/default.nix b/pkgs/development/python-modules/watchdog/default.nix index 893cdd7e99b4..5cb8929b9dbe 100644 --- a/pkgs/development/python-modules/watchdog/default.nix +++ b/pkgs/development/python-modules/watchdog/default.nix @@ -16,7 +16,7 @@ buildPythonPackage rec { sha256 = "e38bffc89b15bafe2a131f0e1c74924cf07dcec020c2e0a26cccd208831fcd43"; }; - buildInputs = stdenv.lib.optionals stdenv.isDarwin + buildInputs = lib.optionals stdenv.isDarwin [ pkgs.darwin.apple_sdk.frameworks.CoreServices ]; propagatedBuildInputs = [ argh pathtools pyyaml ]; diff --git a/pkgs/development/python-modules/werkzeug/default.nix b/pkgs/development/python-modules/werkzeug/default.nix index 858130b805f1..7f35dd124d86 100644 --- a/pkgs/development/python-modules/werkzeug/default.nix +++ b/pkgs/development/python-modules/werkzeug/default.nix @@ -17,7 +17,7 @@ buildPythonPackage rec { propagatedBuildInputs = [ itsdangerous ]; checkInputs = [ pytestCheckHook requests hypothesis pytest-timeout ]; - disabledTests = stdenv.lib.optionals stdenv.isDarwin [ + disabledTests = lib.optionals stdenv.isDarwin [ "test_get_machine_id" ]; diff --git a/pkgs/development/python-modules/xcffib/default.nix b/pkgs/development/python-modules/xcffib/default.nix index 33431684708b..8f51ec1e77f8 100644 --- a/pkgs/development/python-modules/xcffib/default.nix +++ b/pkgs/development/python-modules/xcffib/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv +{ lib , buildPythonPackage , fetchPypi , xorg diff --git a/pkgs/development/python-modules/xnd/default.nix b/pkgs/development/python-modules/xnd/default.nix index 3178e171f844..3657997f5a74 100644 --- a/pkgs/development/python-modules/xnd/default.nix +++ b/pkgs/development/python-modules/xnd/default.nix @@ -1,4 +1,5 @@ -{ stdenv +{ lib +, stdenv , buildPythonPackage , python , ndtypes @@ -27,7 +28,7 @@ buildPythonPackage { postInstall = '' mkdir $out/include cp python/xnd/*.h $out/include - '' + stdenv.lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.isDarwin '' install_name_tool -add_rpath ${libxnd}/lib $out/${python.sitePackages}/xnd/_xnd.*.so ''; diff --git a/pkgs/development/python-modules/zconfig/default.nix b/pkgs/development/python-modules/zconfig/default.nix index 4882f92b0475..a6a00ad821b8 100644 --- a/pkgs/development/python-modules/zconfig/default.nix +++ b/pkgs/development/python-modules/zconfig/default.nix @@ -23,7 +23,7 @@ buildPythonPackage rec { url = "https://github.com/zopefoundation/ZConfig/commit/f0c2990d35ac3c924ecc8be4a5c71c8e4abbd0e5.patch"; sha256 = "1bjg3wrvii0rwzf3s0vlpzgg2ckj0h2zxkyxwjcr64s4k2vaq9ij"; }) - ] ++ stdenv.lib.optional stdenv.hostPlatform.isMusl ./remove-setlocale-test.patch; + ] ++ lib.optional stdenv.hostPlatform.isMusl ./remove-setlocale-test.patch; buildInputs = [ manuel docutils ]; propagatedBuildInputs = [ zope_testrunner ]; diff --git a/pkgs/development/python-modules/zope_lifecycleevent/default.nix b/pkgs/development/python-modules/zope_lifecycleevent/default.nix index 28070ea67e70..390624b50de7 100644 --- a/pkgs/development/python-modules/zope_lifecycleevent/default.nix +++ b/pkgs/development/python-modules/zope_lifecycleevent/default.nix @@ -22,7 +22,7 @@ buildPythonPackage rec { doCheck = false; # zope uses pep 420 namespaces for python3, doesn't work with nix + python2 - pythonImportsCheck = stdenv.lib.optionals isPy3k [ + pythonImportsCheck = lib.optionals isPy3k [ "zope.lifecycleevent" "zope.interface" ]; From 5105bf4b2eb842a07856a5230f21fb635cf7bc00 Mon Sep 17 00:00:00 2001 From: Gabor Greif Date: Sun, 24 Jan 2021 01:31:45 +0100 Subject: [PATCH 15/15] llvm_{5,6,8..11}: fix missing lib from stdenv.lib -> lib (#110643) Co-authored-by: Sandro --- pkgs/development/compilers/llvm/10/openmp.nix | 3 ++- pkgs/development/compilers/llvm/11/openmp.nix | 3 ++- pkgs/development/compilers/llvm/5/openmp.nix | 3 ++- pkgs/development/compilers/llvm/6/openmp.nix | 3 ++- pkgs/development/compilers/llvm/7/openmp.nix | 3 ++- pkgs/development/compilers/llvm/8/openmp.nix | 3 ++- pkgs/development/compilers/llvm/9/openmp.nix | 3 ++- 7 files changed, 14 insertions(+), 7 deletions(-) diff --git a/pkgs/development/compilers/llvm/10/openmp.nix b/pkgs/development/compilers/llvm/10/openmp.nix index 2fa695d2d512..2946c51fafe2 100644 --- a/pkgs/development/compilers/llvm/10/openmp.nix +++ b/pkgs/development/compilers/llvm/10/openmp.nix @@ -1,4 +1,5 @@ -{ stdenv +{ lib +, stdenv , fetch , cmake , llvm diff --git a/pkgs/development/compilers/llvm/11/openmp.nix b/pkgs/development/compilers/llvm/11/openmp.nix index b19d369a42e0..5503a98ae5f6 100644 --- a/pkgs/development/compilers/llvm/11/openmp.nix +++ b/pkgs/development/compilers/llvm/11/openmp.nix @@ -1,4 +1,5 @@ -{ stdenv +{ lib +, stdenv , fetch , cmake , llvm diff --git a/pkgs/development/compilers/llvm/5/openmp.nix b/pkgs/development/compilers/llvm/5/openmp.nix index 1af409229963..169c9c50324e 100644 --- a/pkgs/development/compilers/llvm/5/openmp.nix +++ b/pkgs/development/compilers/llvm/5/openmp.nix @@ -1,4 +1,5 @@ -{ stdenv +{ lib +, stdenv , fetch , cmake , llvm diff --git a/pkgs/development/compilers/llvm/6/openmp.nix b/pkgs/development/compilers/llvm/6/openmp.nix index 420bfe8c3bb6..9de18065918c 100644 --- a/pkgs/development/compilers/llvm/6/openmp.nix +++ b/pkgs/development/compilers/llvm/6/openmp.nix @@ -1,4 +1,5 @@ -{ stdenv +{ lib +, stdenv , fetch , cmake , llvm diff --git a/pkgs/development/compilers/llvm/7/openmp.nix b/pkgs/development/compilers/llvm/7/openmp.nix index 9977ed3dd415..53f52c326c55 100644 --- a/pkgs/development/compilers/llvm/7/openmp.nix +++ b/pkgs/development/compilers/llvm/7/openmp.nix @@ -1,4 +1,5 @@ -{ lib, stdenv +{ lib +, stdenv , fetch , cmake , llvm diff --git a/pkgs/development/compilers/llvm/8/openmp.nix b/pkgs/development/compilers/llvm/8/openmp.nix index ad2cd93fdb67..b5d75d9c8724 100644 --- a/pkgs/development/compilers/llvm/8/openmp.nix +++ b/pkgs/development/compilers/llvm/8/openmp.nix @@ -1,4 +1,5 @@ -{ stdenv +{ lib +, stdenv , fetch , cmake , llvm diff --git a/pkgs/development/compilers/llvm/9/openmp.nix b/pkgs/development/compilers/llvm/9/openmp.nix index 35997c9dda49..416916f57ff2 100644 --- a/pkgs/development/compilers/llvm/9/openmp.nix +++ b/pkgs/development/compilers/llvm/9/openmp.nix @@ -1,4 +1,5 @@ -{ stdenv +{ lib +, stdenv , fetch , cmake , llvm