treewide: stdenv.lib -> lib

This commit is contained in:
Ben Siraphob
2021-01-16 17:58:11 +07:00
parent a9bb54359e
commit badf51221d
977 changed files with 2613 additions and 2613 deletions
@@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, autoreconfHook, flex, bison, gperf,
{ lib, stdenv, fetchFromGitHub, autoreconfHook, flex, bison, gperf,
libxml2, perl, perlPackages, gd }:
stdenv.mkDerivation rec {
@@ -19,8 +19,8 @@ stdenv.mkDerivation rec {
meta = {
description = "automatic device model synthesizer";
homepage = "https://github.com/Qucs/adms";
license = stdenv.lib.licenses.gpl3;
maintainers = with stdenv.lib.maintainers; [disassembler];
platforms = with stdenv.lib.platforms; linux;
license = lib.licenses.gpl3;
maintainers = with lib.maintainers; [disassembler];
platforms = with lib.platforms; linux;
};
}
@@ -1,4 +1,4 @@
{stdenv, fetchurl}:
{lib, stdenv, fetchurl}:
stdenv.mkDerivation rec {
name = "archimedes-2.0.1";
@@ -11,7 +11,7 @@ stdenv.mkDerivation rec {
meta = {
description = "GNU package for semiconductor device simulations";
homepage = "https://www.gnu.org/software/archimedes";
license = stdenv.lib.licenses.gpl2Plus;
platforms = with stdenv.lib.platforms; linux;
license = lib.licenses.gpl2Plus;
platforms = with lib.platforms; linux;
};
}
@@ -15,7 +15,7 @@
let
wrapBinary = libPaths: binaryName: ''
wrapProgram "$out/bin/${binaryName}" \
--prefix LD_LIBRARY_PATH : "${stdenv.lib.makeLibraryPath libPaths}"
--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath libPaths}"
'';
pkg = stdenv.mkDerivation (rec {
inherit (attrs) version src;
@@ -1,4 +1,4 @@
{ mkDerivation, stdenv, fetchFromGitHub, cmake, qtbase, qttools, qtsvg, qwt }:
{ mkDerivation, lib, stdenv, fetchFromGitHub, cmake, qtbase, qttools, qtsvg, qwt }:
mkDerivation rec {
pname = "caneda";
@@ -17,8 +17,8 @@ mkDerivation rec {
meta = {
description = "Open source EDA software focused on easy of use and portability";
homepage = "http://caneda.org";
license = stdenv.lib.licenses.gpl2Plus;
maintainers = with stdenv.lib.maintainers; [viric];
platforms = with stdenv.lib.platforms; linux;
license = lib.licenses.gpl2Plus;
maintainers = with lib.maintainers; [viric];
platforms = with lib.platforms; linux;
};
}
@@ -5,7 +5,7 @@
}:
let
libPath = stdenv.lib.makeLibraryPath
libPath = lib.makeLibraryPath
[ libXrender libXrandr libXcursor libX11 libXext libXi libxcb
libGL glib nss nspr expat alsaLib
qtbase qtdeclarative qtsvg qtlocation qtwebchannel qtwebengine
@@ -5,7 +5,7 @@
let
libPath = stdenv.lib.makeLibraryPath
libPath = lib.makeLibraryPath
[ zlib freetype fontconfig openssl libXrender libXrandr libXcursor libX11
libXext libXi libxcb cups
];
@@ -1,4 +1,4 @@
{ mkDerivation, stdenv, fetchpatch, fetchFromGitHub, qmake, pkgconfig
{ mkDerivation, lib, stdenv, fetchpatch, fetchFromGitHub, qmake, pkgconfig
, qtbase, qtsvg, qttools, qtserialport, boost, libgit2
}:
@@ -79,8 +79,8 @@ mkDerivation rec {
meta = {
description = "An open source prototyping tool for Arduino-based projects";
homepage = "https://fritzing.org/";
license = stdenv.lib.licenses.gpl3;
maintainers = [ stdenv.lib.maintainers.robberer ];
platforms = stdenv.lib.platforms.linux;
license = lib.licenses.gpl3;
maintainers = [ lib.maintainers.robberer ];
platforms = lib.platforms.linux;
};
}
@@ -1,4 +1,4 @@
{ stdenv, fetchurl, glib, gtk3, gperf, pkgconfig, bzip2, tcl, tk, wrapGAppsHook, judy, xz }:
{ lib, stdenv, fetchurl, glib, gtk3, gperf, pkgconfig, bzip2, tcl, tk, wrapGAppsHook, judy, xz }:
stdenv.mkDerivation rec {
pname = "gtkwave";
@@ -22,8 +22,8 @@ stdenv.mkDerivation rec {
meta = {
description = "VCD/Waveform viewer for Unix and Win32";
homepage = "http://gtkwave.sourceforge.net";
license = stdenv.lib.licenses.gpl2Plus;
maintainers = with stdenv.lib.maintainers; [ thoughtpolice ];
platforms = stdenv.lib.platforms.linux;
license = lib.licenses.gpl2Plus;
maintainers = with lib.maintainers; [ thoughtpolice ];
platforms = lib.platforms.linux;
};
}
@@ -24,9 +24,9 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ cmake ninja pkgconfig ];
buildInputs = [ qtbase qtsvg boost rapidjson igraph spdlog fmt graphviz wrapQtAppsHook ]
++ (with python3Packages; [ python pybind11 ])
++ stdenv.lib.optional stdenv.cc.isClang llvmPackages.openmp;
++ lib.optional stdenv.cc.isClang llvmPackages.openmp;
cmakeFlags = with stdenv.lib.versions; [
cmakeFlags = with lib.versions; [
"-DHAL_VERSION_RETURN=${version}"
"-DHAL_VERSION_MAJOR=${major version}"
"-DHAL_VERSION_MINOR=${minor version}"
@@ -1,4 +1,4 @@
{ stdenv
{ lib, stdenv
, fetchFromGitLab
, cmake
, libGLU
@@ -43,11 +43,11 @@
, gtk3
}:
assert stdenv.lib.asserts.assertMsg (!(withOCE && stdenv.isAarch64)) "OCE fails a test on Aarch64";
assert stdenv.lib.asserts.assertMsg (!(withOCC && withOCE))
assert lib.asserts.assertMsg (!(withOCE && stdenv.isAarch64)) "OCE fails a test on Aarch64";
assert lib.asserts.assertMsg (!(withOCC && withOCE))
"Only one of OCC and OCE may be enabled";
let
inherit (stdenv.lib) optional optionals;
inherit (lib) optional optionals;
in
stdenv.mkDerivation rec {
pname = "kicad-base";
@@ -140,7 +140,7 @@ stdenv.mkDerivation rec {
the libraries are passed via an env var in the wrapper, default.nix
'';
homepage = "https://www.kicad-pcb.org/";
license = stdenv.lib.licenses.agpl3;
platforms = stdenv.lib.platforms.all;
license = lib.licenses.agpl3;
platforms = lib.platforms.all;
};
}
@@ -1,4 +1,4 @@
{ stdenv
{ lib, stdenv
, fetchFromGitLab
, gnome3
, wxGTK30
@@ -70,13 +70,13 @@
# }
assert withNgspice -> libngspice != null;
assert stdenv.lib.assertMsg (!ngspiceSupport)
assert lib.assertMsg (!ngspiceSupport)
"`nspiceSupport` was renamed to `withNgspice` for the sake of consistency with other kicad nix arguments.";
assert stdenv.lib.assertMsg (!oceSupport)
assert lib.assertMsg (!oceSupport)
"`oceSupport` was renamed to `withOCE` for the sake of consistency with other kicad nix arguments.";
assert stdenv.lib.assertMsg (!scriptingSupport)
assert lib.assertMsg (!scriptingSupport)
"`scriptingSupport` was renamed to `withScripting` for the sake of consistency with other kicad nix arguments.";
assert stdenv.lib.assertMsg (!withOCCT)
assert lib.assertMsg (!withOCCT)
"`withOCCT` was renamed to `withOCC` for the sake of consistency with upstream cmake options.";
let
baseName = if (stable) then "kicad" else "kicad-unstable";
@@ -151,7 +151,7 @@ let
python = python3;
wxPython = python.pkgs.wxPython_4_0;
inherit (stdenv.lib) concatStringsSep flatten optionalString optionals;
inherit (lib) concatStringsSep flatten optionalString optionals;
in
stdenv.mkDerivation rec {
@@ -251,11 +251,11 @@ stdenv.mkDerivation rec {
KiCad is an open source software suite for Electronic Design Automation.
The Programs handle Schematic Capture, and PCB Layout with Gerber output.
'';
license = stdenv.lib.licenses.agpl3;
license = lib.licenses.agpl3;
# berce seems inactive...
maintainers = with stdenv.lib.maintainers; [ evils kiwi berce ];
maintainers = with lib.maintainers; [ evils kiwi berce ];
# kicad is cross platform
platforms = stdenv.lib.platforms.all;
platforms = lib.platforms.all;
# despite that, nipkgs' wxGTK for darwin is "wxmac"
# and wxPython_4_0 does not account for this
# adjusting this package to downgrade to python2Packages.wxPython (wxPython 3),
@@ -1,4 +1,4 @@
{ stdenv
{ lib, stdenv
, cmake
, gettext
, libSrc
@@ -15,8 +15,8 @@ let
nativeBuildInputs = [ cmake ];
meta = rec {
license = stdenv.lib.licenses.cc-by-sa-40;
platforms = stdenv.lib.platforms.all;
license = lib.licenses.cc-by-sa-40;
platforms = lib.platforms.all;
# the 3d models are a ~1 GiB download and occupy ~5 GiB in store.
# this would exceed the hydra output limit
hydraPlatforms = if (name == "packages3d") then [ ] else platforms;
@@ -1,4 +1,4 @@
{ stdenv, fetchurl, qt4, cmake, graphviz, pkg-config }:
{ lib, stdenv, fetchurl, qt4, cmake, graphviz, pkg-config }:
stdenv.mkDerivation rec {
name = "qfsm-0.54.0";
@@ -21,7 +21,7 @@ stdenv.mkDerivation rec {
meta = {
description = "Graphical editor for finite state machines";
homepage = "http://qfsm.sourceforge.net/";
license = stdenv.lib.licenses.gpl3Plus;
platforms = stdenv.lib.platforms.unix;
license = lib.licenses.gpl3Plus;
platforms = lib.platforms.unix;
};
}
@@ -1,4 +1,4 @@
{stdenv, fetchFromGitHub, flex, bison, qt4, libX11, cmake, gperf, adms }:
{lib, stdenv, fetchFromGitHub, flex, bison, qt4, libX11, cmake, gperf, adms }:
stdenv.mkDerivation rec {
version = "0.0.19";
@@ -23,8 +23,8 @@ stdenv.mkDerivation rec {
meta = {
description = "Integrated circuit simulator";
homepage = "http://qucs.sourceforge.net";
license = stdenv.lib.licenses.gpl2Plus;
maintainers = with stdenv.lib.maintainers; [viric];
platforms = with stdenv.lib.platforms; linux;
license = lib.licenses.gpl2Plus;
maintainers = with lib.maintainers; [viric];
platforms = with lib.platforms; linux;
};
}
@@ -1,8 +1,8 @@
{ stdenv, fetchurl, tcl, tk, libX11, glibc, which, yacc, flex, imake, xorgproto, gccmakedep }:
{ lib, stdenv, fetchurl, tcl, tk, libX11, glibc, which, yacc, flex, imake, xorgproto, gccmakedep }:
let
libiconvInc = stdenv.lib.optionalString stdenv.isLinux "${glibc.dev}/include";
libiconvLib = stdenv.lib.optionalString stdenv.isLinux "${glibc.out}/lib";
libiconvInc = lib.optionalString stdenv.isLinux "${glibc.dev}/include";
libiconvLib = lib.optionalString stdenv.isLinux "${glibc.out}/lib";
in
stdenv.mkDerivation rec {
name = "tkgate-1.8.7";
@@ -35,8 +35,8 @@ stdenv.mkDerivation rec {
meta = {
description = "Event driven digital circuit simulator with a TCL/TK-based graphical editor";
homepage = "http://www.tkgate.org/";
license = stdenv.lib.licenses.gpl2Plus;
maintainers = [ stdenv.lib.maintainers.peti ];
hydraPlatforms = stdenv.lib.platforms.linux;
license = lib.licenses.gpl2Plus;
maintainers = [ lib.maintainers.peti ];
hydraPlatforms = lib.platforms.linux;
};
}
@@ -26,7 +26,7 @@ stdenv.mkDerivation rec {
src = fetchFromGitHub {
owner = "steveicarus";
repo = pname;
rev = "v${stdenv.lib.replaceStrings ["."] ["_"] version}";
rev = "v${lib.replaceStrings ["."] ["_"] version}";
sha256 = "0nzcyi6l2zv9wxzsv9i963p3igyjds0n55x0ph561mc3pfbc7aqp";
};
@@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
sha256 = "17va2pil4938j8c93anhy45zzgnvq3k71a7glj02synfrsv6fs8n";
};
patches = stdenv.lib.optionals (!stdenv.isAarch64) [
patches = lib.optionals (!stdenv.isAarch64) [
# fix build with verilog 11.0 - https://github.com/ldoolitt/vhd2vl/pull/15
# for some strange reason, this is not needed for aarch64
(fetchpatch {
@@ -4,7 +4,7 @@
let
version = "3.10.12";
name = "xcircuit-${version}";
inherit (stdenv.lib) getBin;
inherit (lib) getBin;
in stdenv.mkDerivation {
inherit name version;
@@ -1,4 +1,4 @@
{stdenv, fetchurl, gtk2, pkgconfig}:
{lib, stdenv, fetchurl, gtk2, pkgconfig}:
stdenv.mkDerivation rec {
name = "xoscope-2.0";
@@ -17,8 +17,8 @@ stdenv.mkDerivation rec {
meta = {
description = "Oscilloscope through the sound card";
homepage = "http://xoscope.sourceforge.net";
license = stdenv.lib.licenses.gpl2Plus;
maintainers = with stdenv.lib.maintainers; [viric];
platforms = with stdenv.lib.platforms; linux;
license = lib.licenses.gpl2Plus;
maintainers = with lib.maintainers; [viric];
platforms = with lib.platforms; linux;
};
}