From 84fc1375d1b49aadd80e65c7ab968260754617c4 Mon Sep 17 00:00:00 2001 From: Stephan Maka Date: Tue, 9 Mar 2021 22:48:37 +0100 Subject: [PATCH] s/stdenv.lib/lib/ --- artiq-board-generated/artiq-board.nix | 2 +- artiq-fast/artiq-board.nix | 2 +- artiq-fast/default.nix | 4 ++-- artiq-fast/fetchcargo.nix | 4 ++-- artiq-fast/pkgs/artiq.nix | 2 +- artiq-fast/pkgs/binutils.nix | 4 ++-- artiq-fast/pkgs/llvm-or1k.nix | 10 +++++----- artiq-fast/pkgs/llvmlite-artiq.nix | 4 ++-- artiq-fast/pkgs/openocd.nix | 4 ++-- artiq-fast/pkgs/python-deps.nix | 20 ++++++++++---------- artiq-fast/pkgs/rust/binaryBuild.nix | 16 ++++++++-------- artiq-fast/pkgs/rust/cargo.nix | 4 ++-- artiq-fast/pkgs/rust/rustc.nix | 6 +++--- artiq-full/python-deps.nix | 4 ++-- 14 files changed, 43 insertions(+), 43 deletions(-) diff --git a/artiq-board-generated/artiq-board.nix b/artiq-board-generated/artiq-board.nix index 710c84e..9eac751 100644 --- a/artiq-board-generated/artiq-board.nix +++ b/artiq-board-generated/artiq-board.nix @@ -12,7 +12,7 @@ let jinja2 jsonschema numpy artiqpkgs.migen artiqpkgs.microscope artiqpkgs.misoc artiqpkgs.jesd204b artiqpkgs.artiq ]); fetchcargo = import (artiq-fast + "/fetchcargo.nix") { - inherit (pkgs) stdenv cacert git; + inherit (pkgs) stdenv lib cacert git; inherit (artiqpkgs) cargo cargo-vendor; }; cargoDeps = fetchcargo rec { diff --git a/artiq-fast/artiq-board.nix b/artiq-fast/artiq-board.nix index 788df7f..a7f312a 100644 --- a/artiq-fast/artiq-board.nix +++ b/artiq-fast/artiq-board.nix @@ -9,7 +9,7 @@ let artiqSrc = import ./pkgs/artiq-src.nix { fetchgit = pkgs.fetchgit; }; artiqpkgs = import ./default.nix { inherit pkgs; }; fetchcargo = import ./fetchcargo.nix { - inherit (pkgs) stdenv cacert git; + inherit (pkgs) stdenv lib cacert git; inherit (artiqpkgs) cargo cargo-vendor; }; cargoDeps = fetchcargo rec { diff --git a/artiq-fast/default.nix b/artiq-fast/default.nix index 5dce39c..bd1cbb5 100644 --- a/artiq-fast/default.nix +++ b/artiq-fast/default.nix @@ -2,7 +2,7 @@ with pkgs; let artiq6 = pkgs.lib.strings.versionAtLeast mainPackages.artiq.version "6.0"; - pythonDeps = import ./pkgs/python-deps.nix { inherit (pkgs) stdenv fetchgit fetchFromGitHub python3Packages; misoc-new = artiq6; }; + pythonDeps = import ./pkgs/python-deps.nix { inherit (pkgs) lib fetchgit fetchFromGitHub python3Packages; misoc-new = artiq6; }; boards = [ { target = "kasli"; variant = "tester"; } @@ -25,7 +25,7 @@ let binutils-arm = callPackage ./pkgs/binutils.nix { platform = "arm"; target = "armv7-unknown-linux-gnueabihf"; }; llvm-or1k = callPackage ./pkgs/llvm-or1k.nix {}; rustc = callPackage ./pkgs/rust/rustc-with-crates.nix - ((stdenv.lib.optionalAttrs (stdenv.cc.isGNU && stdenv.hostPlatform.isi686) { + ((lib.optionalAttrs (stdenv.cc.isGNU && stdenv.hostPlatform.isi686) { stdenv = overrideCC stdenv gcc6; # with gcc-7: undefined reference to `__divmoddi4' }) // { inherit llvm-or1k; }); diff --git a/artiq-fast/fetchcargo.nix b/artiq-fast/fetchcargo.nix index 498821d..5eacf77 100644 --- a/artiq-fast/fetchcargo.nix +++ b/artiq-fast/fetchcargo.nix @@ -1,4 +1,4 @@ -{ stdenv, cacert, git, cargo, cargo-vendor }: +{ stdenv, lib, cacert, git, cargo, cargo-vendor }: { name, src, sha256 }: stdenv.mkDerivation { name = "${name}-vendor"; @@ -31,6 +31,6 @@ stdenv.mkDerivation { outputHashMode = "recursive"; outputHash = sha256; - impureEnvVars = stdenv.lib.fetchers.proxyImpureEnvVars; + impureEnvVars = lib.fetchers.proxyImpureEnvVars; preferLocalBuild = true; } diff --git a/artiq-fast/pkgs/artiq.nix b/artiq-fast/pkgs/artiq.nix index 78be5a0..d60cbd8 100644 --- a/artiq-fast/pkgs/artiq.nix +++ b/artiq-fast/pkgs/artiq.nix @@ -36,7 +36,7 @@ python3Packages.buildPythonPackage rec { ''; - meta = with stdenv.lib; { + meta = with lib; { description = "A leading-edge control system for quantum information experiments"; homepage = https://m-labs/artiq; license = licenses.lgpl3; diff --git a/artiq-fast/pkgs/binutils.nix b/artiq-fast/pkgs/binutils.nix index 50e326a..5f06028 100644 --- a/artiq-fast/pkgs/binutils.nix +++ b/artiq-fast/pkgs/binutils.nix @@ -1,4 +1,4 @@ -{ stdenv, buildPackages +{ stdenv, lib, buildPackages , fetchurl, zlib , platform, target }: @@ -27,7 +27,7 @@ stdenv.mkDerivation rec { `gprof', `nm', `strip', etc. ''; homepage = http://www.gnu.org/software/binutils/; - license = stdenv.lib.licenses.gpl3Plus; + license = lib.licenses.gpl3Plus; /* Give binutils a lower priority than gcc-wrapper to prevent a collision due to the ld/as wrappers/symlinks in the latter. */ priority = "10"; diff --git a/artiq-fast/pkgs/llvm-or1k.nix b/artiq-fast/pkgs/llvm-or1k.nix index b305485..5b7820d 100644 --- a/artiq-fast/pkgs/llvm-or1k.nix +++ b/artiq-fast/pkgs/llvm-or1k.nix @@ -1,4 +1,4 @@ -{ stdenv +{ stdenv, lib , fetchFromGitHub, runCommand , perl, groff, cmake, libxml2, python, libffi, valgrind }: @@ -30,7 +30,7 @@ in passthru.llvm-src = llvm-src; src = llvm-clang-src; - buildInputs = [ perl groff cmake libxml2 python libffi ] ++ stdenv.lib.optional stdenv.isLinux valgrind; + buildInputs = [ perl groff cmake libxml2 python libffi ] ++ lib.optional stdenv.isLinux valgrind; preBuild = '' NIX_BUILD_CORES=4 @@ -59,8 +59,8 @@ in meta = { description = "Collection of modular and reusable compiler and toolchain technologies"; homepage = http://llvm.org/; - license = stdenv.lib.licenses.bsd3; - maintainers = with stdenv.lib.maintainers; [ sb0 ]; - platforms = stdenv.lib.platforms.all; + license = lib.licenses.bsd3; + maintainers = with lib.maintainers; [ sb0 ]; + platforms = lib.platforms.all; }; } diff --git a/artiq-fast/pkgs/llvmlite-artiq.nix b/artiq-fast/pkgs/llvmlite-artiq.nix index 525eca6..81308e2 100644 --- a/artiq-fast/pkgs/llvmlite-artiq.nix +++ b/artiq-fast/pkgs/llvmlite-artiq.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, llvm-or1k, makeWrapper, python3, ncurses, zlib, python3Packages }: +{ stdenv, lib, fetchFromGitHub, llvm-or1k, makeWrapper, python3, ncurses, zlib, python3Packages }: python3Packages.buildPythonPackage rec { pname = "llvmlite-artiq"; version = "0.23.0.dev"; @@ -13,7 +13,7 @@ python3Packages.buildPythonPackage rec { preBuild = "export LLVM_CONFIG=${llvm-or1k}/bin/llvm-config"; - meta = with stdenv.lib; { + meta = with lib; { description = "A lightweight LLVM python binding for writing JIT compilers"; homepage = "http://llvmlite.pydata.org/"; maintainers = with maintainers; [ sb0 ]; diff --git a/artiq-fast/pkgs/openocd.nix b/artiq-fast/pkgs/openocd.nix index 1864e1d..9d32c24 100644 --- a/artiq-fast/pkgs/openocd.nix +++ b/artiq-fast/pkgs/openocd.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, autoreconfHook, libftdi, libusb1, pkgconfig, hidapi }: +{ stdenv, lib, fetchFromGitHub, autoreconfHook, libftdi, libusb1, pkgconfig, hidapi }: stdenv.mkDerivation rec { pname = "openocd-mlabs"; @@ -55,7 +55,7 @@ stdenv.mkDerivation rec { cp ${bscan_spi_bitstreams}/*.bit "$out/share/bscan-spi-bitstreams" ''; - meta = with stdenv.lib; { + meta = with lib; { description = "Free and Open On-Chip Debugging, In-System Programming and Boundary-Scan Testing"; longDescription = '' OpenOCD provides on-chip programming and debugging support with a layered diff --git a/artiq-fast/pkgs/python-deps.nix b/artiq-fast/pkgs/python-deps.nix index bf4de84..e6f3c36 100644 --- a/artiq-fast/pkgs/python-deps.nix +++ b/artiq-fast/pkgs/python-deps.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchgit, fetchFromGitHub, python3Packages, misoc-new }: +{ lib, fetchgit, fetchFromGitHub, python3Packages, misoc-new }: rec { # User dependencies @@ -109,7 +109,7 @@ rec { propagatedBuildInputs = with python3Packages; [ pyserial jinja2 numpy asyncserial migen ]; - meta = with stdenv.lib; { + meta = with lib; { description = "A high performance and small footprint system-on-chip based on Migen"; homepage = "https://m-labs.hk/migen"; license = licenses.bsd2; @@ -130,7 +130,7 @@ rec { propagatedBuildInputs = with python3Packages; [ colorama ]; - meta = with stdenv.lib; { + meta = with lib; { description = "A Python toolbox for building complex digital hardware"; homepage = "https://m-labs.hk/migen"; license = licenses.bsd2; @@ -151,7 +151,7 @@ rec { propagatedBuildInputs = with python3Packages; [ pyserial prettytable msgpack migen ]; - meta = with stdenv.lib; { + meta = with lib; { description = "Finding the bacteria in rotting FPGA designs"; homepage = "https://m-labs.hk/migen"; license = licenses.bsd2; @@ -172,7 +172,7 @@ rec { propagatedBuildInputs = with python3Packages; [ migen misoc ]; - meta = with stdenv.lib; { + meta = with lib; { description = "JESD204B core for Migen/MiSoC"; homepage = "https://m-labs.hk/migen"; license = licenses.bsd2; @@ -189,7 +189,7 @@ rec { sha256 = "0j15i54p7nri6hkzn1wal9pxri4pgql01wgjccig6ar0v5jjbvsy"; }; - meta = with stdenv.lib; { + meta = with lib; { description = "Super-fast and clean conversions to numbers"; homepage = "https://github.com/SethMMorton/fastnumbers"; license = licenses.mit; @@ -218,7 +218,7 @@ rec { export PBR_VERSION=0.0.1 ''; - meta = with stdenv.lib; { + meta = with lib; { description = "Ramda, ported to Python"; homepage = "https://github.com/peteut/ramda.py"; license = licenses.mit; @@ -259,7 +259,7 @@ rec { export PBR_VERSION=0.0.1 ''; - meta = with stdenv.lib; { + meta = with lib; { description = "AXI support for Migen/MiSoC"; homepage = "https://github.com/peteut/migen-axi"; license = licenses.mit; @@ -280,7 +280,7 @@ rec { # Non-standard test suite. Needs custom checkPhase. doCheck = false; - meta = with stdenv.lib; { + meta = with lib; { description = "Portable tool for executing LLVM and Clang style test suites"; homepage = http://llvm.org/docs/CommandGuide/lit.html; license = licenses.ncsa; @@ -299,7 +299,7 @@ rec { }; prePatch = "echo ${version} > RELEASE-VERSION"; - meta = with stdenv.lib; { + meta = with lib; { description = "A tool for checking tool output inspired by LLVM's FileCheck"; homepage = "https://github.com/stp/OutputCheck"; license = licenses.bsd3; diff --git a/artiq-fast/pkgs/rust/binaryBuild.nix b/artiq-fast/pkgs/rust/binaryBuild.nix index a40383d..c64a62f 100644 --- a/artiq-fast/pkgs/rust/binaryBuild.nix +++ b/artiq-fast/pkgs/rust/binaryBuild.nix @@ -1,4 +1,4 @@ -{ stdenv, makeWrapper, bash, buildRustPackage, curl, darwin +{ stdenv, lib, makeWrapper, bash, buildRustPackage, curl, darwin , version , src , platform @@ -6,7 +6,7 @@ }: let - inherit (stdenv.lib) optionalString; + inherit (lib) optionalString; inherit (darwin.apple_sdk.frameworks) Security; bootstrapping = versionType == "bootstrap"; @@ -26,14 +26,14 @@ rec { inherit version; inherit src; - meta = with stdenv.lib; { + meta = with lib; { homepage = http://www.rust-lang.org/; description = "A safe, concurrent, practical language"; maintainers = with maintainers; [ sb0 ]; license = [ licenses.mit licenses.asl20 ]; }; - buildInputs = [ bash ] ++ stdenv.lib.optional stdenv.isDarwin Security; + buildInputs = [ bash ] ++ lib.optional stdenv.isDarwin Security; postPatch = '' patchShebangs . @@ -60,7 +60,7 @@ rec { install_name_tool -change /usr/lib/libresolv.9.dylib '${darwin.libresolv}/lib/libresolv.9.dylib' "$out/bin/rustdoc" install_name_tool -change /usr/lib/libiconv.2.dylib '${darwin.libiconv}/lib/libiconv.2.dylib' "$out/bin/cargo" install_name_tool -change /usr/lib/libresolv.9.dylib '${darwin.libresolv}/lib/libresolv.9.dylib' "$out/bin/cargo" - install_name_tool -change /usr/lib/libcurl.4.dylib '${stdenv.lib.getLib curl}/lib/libcurl.4.dylib' "$out/bin/cargo" + install_name_tool -change /usr/lib/libcurl.4.dylib '${lib.getLib curl}/lib/libcurl.4.dylib' "$out/bin/cargo" for f in $out/lib/lib*.dylib; do install_name_tool -change /usr/lib/libresolv.9.dylib '${darwin.libresolv}/lib/libresolv.9.dylib' "$f" done @@ -80,14 +80,14 @@ rec { inherit version; inherit src; - meta = with stdenv.lib; { + meta = with lib; { homepage = http://www.rust-lang.org/; description = "A safe, concurrent, practical language"; maintainers = with maintainers; [ sb0 ]; license = [ licenses.mit licenses.asl20 ]; }; - buildInputs = [ makeWrapper bash ] ++ stdenv.lib.optional stdenv.isDarwin Security; + buildInputs = [ makeWrapper bash ] ++ lib.optional stdenv.isDarwin Security; postPatch = '' patchShebangs . @@ -107,7 +107,7 @@ rec { ${optionalString (stdenv.isDarwin && bootstrapping) '' install_name_tool -change /usr/lib/libiconv.2.dylib '${darwin.libiconv}/lib/libiconv.2.dylib' "$out/bin/cargo" install_name_tool -change /usr/lib/libresolv.9.dylib '${darwin.libresolv}/lib/libresolv.9.dylib' "$out/bin/cargo" - install_name_tool -change /usr/lib/libcurl.4.dylib '${stdenv.lib.getLib curl}/lib/libcurl.4.dylib' "$out/bin/cargo" + install_name_tool -change /usr/lib/libcurl.4.dylib '${lib.getLib curl}/lib/libcurl.4.dylib' "$out/bin/cargo" ''} wrapProgram "$out/bin/cargo" \ diff --git a/artiq-fast/pkgs/rust/cargo.nix b/artiq-fast/pkgs/rust/cargo.nix index ae7d880..04f5fea 100644 --- a/artiq-fast/pkgs/rust/cargo.nix +++ b/artiq-fast/pkgs/rust/cargo.nix @@ -1,4 +1,4 @@ -{ stdenv, file, curl, pkgconfig, python, openssl, cmake, zlib +{ stdenv, lib, file, curl, pkgconfig, python, openssl, cmake, zlib , makeWrapper, libiconv, cacert, rustPlatform, rustc, libgit2 , fetchurl }: @@ -52,7 +52,7 @@ rustPlatform.buildRustPackage rec { # Disable check phase as there are failures (4 tests fail) doCheck = false; - meta = with stdenv.lib; { + meta = with lib; { homepage = https://crates.io; description = "Downloads your Rust project's dependencies and builds your project"; maintainers = with maintainers; [ wizeman retrry ]; diff --git a/artiq-fast/pkgs/rust/rustc.nix b/artiq-fast/pkgs/rust/rustc.nix index 12e9df0..23e9bf4 100644 --- a/artiq-fast/pkgs/rust/rustc.nix +++ b/artiq-fast/pkgs/rust/rustc.nix @@ -1,4 +1,4 @@ -{ stdenv, targetPackages +{ stdenv, lib, targetPackages , fetchurl, file, python2, tzdata, ps , llvm-or1k, ncurses, zlib, darwin, rustPlatform, git, cmake, curl , which, libffi, gdb @@ -14,7 +14,7 @@ }: let - inherit (stdenv.lib) optional optionalString; + inherit (lib) optional optionalString; inherit (darwin.apple_sdk.frameworks) Security; target = builtins.replaceStrings [" "] [","] (builtins.toString targets); @@ -171,7 +171,7 @@ stdenv.mkDerivation { # https://github.com/rust-lang/rust/issues/30181 # enableParallelBuilding = false; - meta = with stdenv.lib; { + meta = with lib; { homepage = https://www.rust-lang.org/; description = "A safe, concurrent, practical language"; maintainers = with maintainers; [ sb0 ]; diff --git a/artiq-full/python-deps.nix b/artiq-full/python-deps.nix index 0d2c77b..ab5bd86 100644 --- a/artiq-full/python-deps.nix +++ b/artiq-full/python-deps.nix @@ -14,7 +14,7 @@ rec { propagatedBuildInputs = with pkgs.python3Packages; [ svgwrite attrdict ]; doCheck = false; - meta = with pkgs.stdenv.lib; { + meta = with pkgs.lib; { description = "WaveDrom compatible Python module and command line"; homepage = "https://pypi.org/project/wavedrom/"; license = licenses.mit; @@ -34,7 +34,7 @@ rec { propagatedBuildInputs = [ wavedrom ] ++ (with pkgs.python3Packages; [ sphinx xcffib cairosvg ]); doCheck = false; - meta = with pkgs.stdenv.lib; { + meta = with pkgs.lib; { description = "A Sphinx extension that allows including WaveDrom diagrams"; homepage = "https://pypi.org/project/sphinxcontrib-wavedrom/"; license = licenses.mit;