From 4a7f99d55d299453a9c2397f90b33d1120669775 Mon Sep 17 00:00:00 2001 From: Profpatsch Date: Mon, 11 Jan 2021 08:54:33 +0100 Subject: treewide: with stdenv.lib; in meta -> with lib; MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Part of: https://github.com/NixOS/nixpkgs/issues/108938 meta = with stdenv.lib; is a widely used pattern. We want to slowly remove the `stdenv.lib` indirection and encourage people to use `lib` directly. Thus let’s start with the meta field. This used a rewriting script to mostly automatically replace all occurances of this pattern, and add the `lib` argument to the package header if it doesn’t exist yet. The script in its current form is available at https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix --- pkgs/applications/science/misc/convertall/default.nix | 4 ++-- pkgs/applications/science/misc/gephi/default.nix | 4 ++-- pkgs/applications/science/misc/gplates/default.nix | 4 ++-- pkgs/applications/science/misc/netlogo/default.nix | 4 ++-- pkgs/applications/science/misc/openmodelica/default.nix | 4 ++-- pkgs/applications/science/misc/openmvs/default.nix | 4 ++-- pkgs/applications/science/misc/rink/default.nix | 4 ++-- pkgs/applications/science/misc/root/5.nix | 4 ++-- pkgs/applications/science/misc/root/default.nix | 2 +- pkgs/applications/science/misc/snakemake/default.nix | 4 ++-- 10 files changed, 19 insertions(+), 19 deletions(-) (limited to 'pkgs/applications/science/misc') diff --git a/pkgs/applications/science/misc/convertall/default.nix b/pkgs/applications/science/misc/convertall/default.nix index 63ed18c89b2..9a7ac2a8b13 100644 --- a/pkgs/applications/science/misc/convertall/default.nix +++ b/pkgs/applications/science/misc/convertall/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, python3, wrapQtAppsHook }: +{ lib, stdenv, fetchFromGitHub, python3, wrapQtAppsHook }: let inherit (python3.pkgs) wrapPython pyqt5; @@ -27,7 +27,7 @@ in stdenv.mkDerivation rec { makeQtWrapper $out/share/convertall/convertall.py $out/bin/convertall ''; - meta = with stdenv.lib; { + meta = with lib; { homepage = "https://convertall.bellz.org/"; description = "Graphical unit converter"; license = licenses.gpl2Plus; diff --git a/pkgs/applications/science/misc/gephi/default.nix b/pkgs/applications/science/misc/gephi/default.nix index b6b53013cb4..95112fa9098 100644 --- a/pkgs/applications/science/misc/gephi/default.nix +++ b/pkgs/applications/science/misc/gephi/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, jdk, maven, javaPackages }: +{ lib, stdenv, fetchFromGitHub, jdk, maven, javaPackages }: let version = "0.9.2"; @@ -55,7 +55,7 @@ stdenv.mkDerivation { echo "jdkhome=${jdk}" >> $out/etc/gephi.conf ''; - meta = with stdenv.lib; { + meta = with lib; { description = "A platform for visualizing and manipulating large graphs"; homepage = "https://gephi.org"; license = licenses.gpl3; diff --git a/pkgs/applications/science/misc/gplates/default.nix b/pkgs/applications/science/misc/gplates/default.nix index ade58b28ab6..d0315d15967 100644 --- a/pkgs/applications/science/misc/gplates/default.nix +++ b/pkgs/applications/science/misc/gplates/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, qt4, qwt6_qt4, libGLU, libGL, glew, gdal, cgal +{ lib, stdenv, fetchurl, qt4, qwt6_qt4, libGLU, libGL, glew, gdal, cgal , proj, boost, cmake, python2, doxygen, graphviz, gmp, mpfr }: stdenv.mkDerivation rec { @@ -22,7 +22,7 @@ stdenv.mkDerivation rec { NIX_CFLAGS_LINK="-ldl -lpthread -lutil"; - meta = with stdenv.lib; { + meta = with lib; { description = "Desktop software for the interactive visualisation of plate-tectonics"; homepage = "https://www.gplates.org"; license = licenses.gpl2; diff --git a/pkgs/applications/science/misc/netlogo/default.nix b/pkgs/applications/science/misc/netlogo/default.nix index af892441a47..b22c6294fba 100644 --- a/pkgs/applications/science/misc/netlogo/default.nix +++ b/pkgs/applications/science/misc/netlogo/default.nix @@ -1,4 +1,4 @@ -{ jre, stdenv, fetchurl, makeWrapper, makeDesktopItem }: +{ jre, lib, stdenv, fetchurl, makeWrapper, makeDesktopItem }: let @@ -44,7 +44,7 @@ stdenv.mkDerivation rec { cp ${desktopItem}/share/applications/* $out/share/applications ''; - meta = with stdenv.lib; { + meta = with lib; { description = "A multi-agent programmable modeling environment"; longDescription = '' NetLogo is a multi-agent programmable modeling environment. It is used by diff --git a/pkgs/applications/science/misc/openmodelica/default.nix b/pkgs/applications/science/misc/openmodelica/default.nix index 589b1370023..8b027b52687 100644 --- a/pkgs/applications/science/misc/openmodelica/default.nix +++ b/pkgs/applications/science/misc/openmodelica/default.nix @@ -1,4 +1,4 @@ -{stdenv, fetchgit, fetchsvn, autoconf, automake, libtool, gfortran, clang, cmake, gnumake, +{lib, stdenv, fetchgit, fetchsvn, autoconf, automake, libtool, gfortran, clang, cmake, gnumake, hwloc, jre, lapack, blas, hdf5, expat, ncurses, readline, qt4, webkitgtk, which, lp_solve, omniorb, sqlite, libatomic_ops, pkgconfig, file, gettext, flex, bison, doxygen, boost, openscenegraph, gnome2, xorg, git, bash, gtk2, makeWrapper }: @@ -42,7 +42,7 @@ stdenv.mkDerivation { done ''; - meta = with stdenv.lib; { + meta = with lib; { description = "An open-source Modelica-based modeling and simulation environment"; homepage = "https://openmodelica.org"; license = licenses.gpl3; diff --git a/pkgs/applications/science/misc/openmvs/default.nix b/pkgs/applications/science/misc/openmvs/default.nix index f8533677b7a..ec22aaa599b 100644 --- a/pkgs/applications/science/misc/openmvs/default.nix +++ b/pkgs/applications/science/misc/openmvs/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, pkgconfig, cmake +{ lib, stdenv, fetchFromGitHub, pkgconfig, cmake , eigen, opencv, ceres-solver, cgal, boost, vcg , gmp, mpfr, glog, gflags, libjpeg_turbo }: @@ -50,7 +50,7 @@ stdenv.mkDerivation { dontUseCmakeBuildDir = true; - meta = with stdenv.lib; { + meta = with lib; { description = "A library for computer-vision scientists and especially targeted to the Multi-View Stereo reconstruction community"; homepage = "http://cdcseacave.github.io/openMVS/"; license = licenses.agpl3; diff --git a/pkgs/applications/science/misc/rink/default.nix b/pkgs/applications/science/misc/rink/default.nix index 0b1ef2b16ea..5670969e7a2 100644 --- a/pkgs/applications/science/misc/rink/default.nix +++ b/pkgs/applications/science/misc/rink/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, rustPlatform, openssl, pkg-config, ncurses }: +{ lib, stdenv, fetchFromGitHub, rustPlatform, openssl, pkg-config, ncurses }: rustPlatform.buildRustPackage rec { version = "0.5.1"; @@ -19,7 +19,7 @@ rustPlatform.buildRustPackage rec { # Some tests fail and/or attempt to use internet servers. doCheck = false; - meta = with stdenv.lib; { + meta = with lib; { description = "Unit-aware calculator"; homepage = "https://rinkcalc.app"; license = with licenses; [ mpl20 gpl3 ]; diff --git a/pkgs/applications/science/misc/root/5.nix b/pkgs/applications/science/misc/root/5.nix index c42f80da352..d8e6ae06a24 100644 --- a/pkgs/applications/science/misc/root/5.nix +++ b/pkgs/applications/science/misc/root/5.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, fetchpatch, cmake, pcre, pkg-config, python2 +{ lib, stdenv, fetchurl, fetchpatch, cmake, pcre, pkg-config, python2 , libX11, libXpm, libXft, libXext, libGLU, libGL, zlib, libxml2, lz4, lzma, gsl_1, xxHash , Cocoa, OpenGL, noSplash ? false }: @@ -79,7 +79,7 @@ stdenv.mkDerivation rec { setupHook = ./setup-hook.sh; - meta = with stdenv.lib; { + meta = with lib; { homepage = "https://root.cern.ch/"; description = "A data analysis framework"; platforms = platforms.unix; diff --git a/pkgs/applications/science/misc/root/default.nix b/pkgs/applications/science/misc/root/default.nix index 2e9fcdb35a2..8bfde114beb 100644 --- a/pkgs/applications/science/misc/root/default.nix +++ b/pkgs/applications/science/misc/root/default.nix @@ -89,7 +89,7 @@ stdenv.mkDerivation rec { setupHook = ./setup-hook.sh; - meta = with stdenv.lib; { + meta = with lib; { homepage = "https://root.cern.ch/"; description = "A data analysis framework"; platforms = platforms.unix; diff --git a/pkgs/applications/science/misc/snakemake/default.nix b/pkgs/applications/science/misc/snakemake/default.nix index a03f7682a51..6b3c405a9ac 100644 --- a/pkgs/applications/science/misc/snakemake/default.nix +++ b/pkgs/applications/science/misc/snakemake/default.nix @@ -1,4 +1,4 @@ -{ stdenv, python3Packages }: +{ lib, stdenv, python3Packages }: python3Packages.buildPythonApplication rec { pname = "snakemake"; @@ -28,7 +28,7 @@ python3Packages.buildPythonApplication rec { doCheck = false; # Tests depend on Google Cloud credentials at ${HOME}/gcloud-service-key.json - meta = with stdenv.lib; { + meta = with lib; { homepage = "https://snakemake.readthedocs.io"; license = licenses.mit; description = "Python-based execution environment for make-like workflows"; -- cgit 1.4.1