pkgs/development: stdenv.lib -> lib

this takes care of the following folders in pkgs/development:
* arduino
* chez-modules
* go-packages
* guile-modules
* idris-modules
* perl-modules
* r-modules
* ruby-modules
This commit is contained in:
Pavol Rusnak 2021-01-17 19:11:59 +01:00
parent 979e6e67d3
commit cf2a67fef3
No known key found for this signature in database
GPG key ID: 91F3B339B9A02A3D
18 changed files with 57 additions and 59 deletions

View file

@ -2,7 +2,7 @@
let let
runtimePath = stdenv.lib.makeBinPath [ runtimePath = lib.makeBinPath [
arduino-cli arduino-cli
python3 # required by the esp8266 core python3 # required by the esp8266 core
]; ];

View file

@ -21,7 +21,7 @@ let
buildFlagsArray = [ buildFlagsArray = [
"-ldflags=-s -w -X github.com/arduino/arduino-cli/version.versionString=${version} -X github.com/arduino/arduino-cli/version.commit=unknown" "-ldflags=-s -w -X github.com/arduino/arduino-cli/version.versionString=${version} -X github.com/arduino/arduino-cli/version.commit=unknown"
] ++ stdenv.lib.optionals stdenv.isLinux [ "-extldflags '-static'" ]; ] ++ lib.optionals stdenv.isLinux [ "-extldflags '-static'" ];
meta = with lib; { meta = with lib; {
inherit (src.meta) homepage; inherit (src.meta) homepage;

View file

@ -47,7 +47,7 @@ let
; ;
# abiVersion 6 is default, but we need 5 for `avrdude_bin` executable # abiVersion 6 is default, but we need 5 for `avrdude_bin` executable
ncurses5 = ncurses.override { abiVersion = "5"; }; ncurses5 = ncurses.override { abiVersion = "5"; };
teensy_libpath = stdenv.lib.makeLibraryPath [ teensy_libpath = lib.makeLibraryPath [
atk atk
cairo cairo
expat expat
@ -76,7 +76,7 @@ let
else throw "${stdenv.hostPlatform.system} is not supported in teensy"; else throw "${stdenv.hostPlatform.system} is not supported in teensy";
flavor = (if withTeensyduino then "teensyduino" else "arduino") flavor = (if withTeensyduino then "teensyduino" else "arduino")
+ stdenv.lib.optionalString (!withGui) "-core"; + lib.optionalString (!withGui) "-core";
in in
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
version = "1.8.13"; version = "1.8.13";
@ -125,7 +125,7 @@ stdenv.mkDerivation rec {
zlib zlib
ncurses5 ncurses5
readline readline
] ++ stdenv.lib.optionals withTeensyduino [ upx ]; ] ++ lib.optionals withTeensyduino [ upx ];
downloadSrcList = builtins.attrValues externalDownloads; downloadSrcList = builtins.attrValues externalDownloads;
downloadDstList = builtins.attrNames externalDownloads; downloadDstList = builtins.attrNames externalDownloads;
@ -165,7 +165,7 @@ stdenv.mkDerivation rec {
cp -r ./build/linux/work/* "$out/share/arduino/" cp -r ./build/linux/work/* "$out/share/arduino/"
echo -n ${version} > $out/share/arduino/lib/version.txt echo -n ${version} > $out/share/arduino/lib/version.txt
${stdenv.lib.optionalString withGui '' ${lib.optionalString withGui ''
mkdir -p $out/bin mkdir -p $out/bin
substituteInPlace $out/share/arduino/arduino \ substituteInPlace $out/share/arduino/arduino \
--replace "JAVA=java" "JAVA=$javaPath/java" \ --replace "JAVA=java" "JAVA=$javaPath/java" \
@ -180,7 +180,7 @@ stdenv.mkDerivation rec {
--replace '<ICON_NAME>' "$out/share/arduino/icons/128x128/apps/arduino.png" --replace '<ICON_NAME>' "$out/share/arduino/icons/128x128/apps/arduino.png"
''} ''}
${stdenv.lib.optionalString withTeensyduino '' ${lib.optionalString withTeensyduino ''
# Back up the original jars # Back up the original jars
mv $out/share/arduino/lib/arduino-core.jar $out/share/arduino/lib/arduino-core.jar.bak mv $out/share/arduino/lib/arduino-core.jar $out/share/arduino/lib/arduino-core.jar.bak
mv $out/share/arduino/lib/pde.jar $out/share/arduino/lib/pde.jar.bak mv $out/share/arduino/lib/pde.jar $out/share/arduino/lib/pde.jar.bak
@ -235,7 +235,7 @@ stdenv.mkDerivation rec {
mkdir $out/lib/ mkdir $out/lib/
ln -s ${lib.makeLibraryPath [ ncurses5 ]}/libtinfo.so.5 $out/lib/libtinfo.so.5 ln -s ${lib.makeLibraryPath [ ncurses5 ]}/libtinfo.so.5 $out/lib/libtinfo.so.5
${stdenv.lib.optionalString withTeensyduino '' ${lib.optionalString withTeensyduino ''
# Patch the Teensy loader binary # Patch the Teensy loader binary
patchelf --debug \ patchelf --debug \
--set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \ --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \

View file

@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, python3Packages, installShellFiles }: { stdenv, lib, fetchFromGitHub, python3Packages, installShellFiles }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
version = "1.6.0"; version = "1.6.0";
@ -22,12 +22,11 @@ stdenv.mkDerivation rec {
wrapPythonPrograms wrapPythonPrograms
''; '';
meta = { meta = with lib; {
description = "Makefile for Arduino sketches"; description = "Makefile for Arduino sketches";
homepage = "https://github.com/sudar/Arduino-Makefile"; homepage = "https://github.com/sudar/Arduino-Makefile";
license = stdenv.lib.licenses.lgpl21; license = licenses.lgpl21;
maintainers = [ stdenv.lib.maintainers.eyjhb ]; maintainers = [ maintainers.eyjhb ];
platforms = stdenv.lib.platforms.unix; platforms = platforms.unix;
}; };
} }

View file

@ -1,4 +1,4 @@
{ stdenv, fetchurl, python2Packages, picocom { stdenv, lib, fetchurl, python2Packages, picocom
, avrdude, arduino-core }: , avrdude, arduino-core }:
python2Packages.buildPythonApplication rec { python2Packages.buildPythonApplication rec {
@ -36,11 +36,11 @@ python2Packages.buildPythonApplication rec {
--replace "'-C', self.e['avrdude.conf']," "" --replace "'-C', self.e['avrdude.conf']," ""
''; '';
meta = { meta = with lib; {
description = "Command line toolkit for working with Arduino hardware"; description = "Command line toolkit for working with Arduino hardware";
homepage = "http://inotool.org/"; homepage = "http://inotool.org/";
license = stdenv.lib.licenses.mit; license = licenses.mit;
maintainers = with stdenv.lib.maintainers; [ antono ]; maintainers = with maintainers; [ antono ];
platforms = stdenv.lib.platforms.linux; platforms = platforms.linux;
}; };
} }

View file

@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, chez }: { stdenv, lib, fetchFromGitHub, chez }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "chez-matchable"; pname = "chez-matchable";
@ -23,11 +23,11 @@ stdenv.mkDerivation rec {
doCheck = false; doCheck = false;
meta = { meta = with lib; {
description = "This is a Library for ChezScheme providing the protable hygenic pattern matcher by Alex Shinn"; description = "This is a Library for ChezScheme providing the protable hygenic pattern matcher by Alex Shinn";
homepage = "https://github.com/fedeinthemix/chez-matchable/"; homepage = "https://github.com/fedeinthemix/chez-matchable/";
maintainers = [ stdenv.lib.maintainers.jitwit ]; maintainers = [ maintainers.jitwit ];
license = stdenv.lib.licenses.publicDomain; license = licenses.publicDomain;
}; };
} }

View file

@ -1,4 +1,4 @@
{ stdenv, fetchgit, chez, chez-srfi }: { stdenv, lib, fetchgit, chez, chez-srfi }:
stdenv.mkDerivation { stdenv.mkDerivation {
pname = "chez-mit"; pname = "chez-mit";
@ -22,11 +22,11 @@ stdenv.mkDerivation {
doCheck = false; doCheck = false;
meta = { meta = with lib; {
description = "This is a MIT/GNU Scheme compatibility library for Chez Scheme"; description = "This is a MIT/GNU Scheme compatibility library for Chez Scheme";
homepage = "https://github.com/fedeinthemix/chez-mit/"; homepage = "https://github.com/fedeinthemix/chez-mit/";
maintainers = [ stdenv.lib.maintainers.jitwit ]; maintainers = [ maintainers.jitwit ];
license = stdenv.lib.licenses.free; license = licenses.free;
}; };
} }

View file

@ -1,4 +1,4 @@
{ stdenv, fetchgit, chez, chez-srfi, chez-mit }: { stdenv, lib, fetchgit, chez, chez-srfi, chez-mit }:
stdenv.mkDerivation { stdenv.mkDerivation {
pname = "chez-scmutils"; pname = "chez-scmutils";
@ -22,11 +22,11 @@ stdenv.mkDerivation {
doCheck = false; doCheck = false;
meta = { meta = with lib; {
description = "This is a port of the MIT Scmutils library to Chez Scheme"; description = "This is a port of the MIT Scmutils library to Chez Scheme";
homepage = "https://github.com/fedeinthemix/chez-scmutils/"; homepage = "https://github.com/fedeinthemix/chez-scmutils/";
maintainers = [ stdenv.lib.maintainers.jitwit ]; maintainers = [ maintainers.jitwit ];
license = stdenv.lib.licenses.gpl3; license = licenses.gpl3;
}; };
} }

View file

@ -1,4 +1,4 @@
{ stdenv, fetchgit, chez }: { stdenv, lib, fetchgit, chez }:
stdenv.mkDerivation { stdenv.mkDerivation {
pname = "chez-srfi"; pname = "chez-srfi";
@ -22,11 +22,11 @@ stdenv.mkDerivation {
doCheck = false; doCheck = false;
meta = { meta = with lib; {
description = "This package provides a collection of SRFI libraries for Chez Scheme"; description = "This package provides a collection of SRFI libraries for Chez Scheme";
homepage = "https://github.com/fedeinthemix/chez-srfi/"; homepage = "https://github.com/fedeinthemix/chez-srfi/";
maintainers = [ stdenv.lib.maintainers.jitwit ]; maintainers = [ maintainers.jitwit ];
license = stdenv.lib.licenses.free; license = licenses.free;
}; };
} }

View file

@ -83,7 +83,7 @@ let
GO111MODULE = "off"; GO111MODULE = "off";
GOFLAGS = lib.optionals (!allowGoReference) [ "-trimpath" ]; GOFLAGS = lib.optionals (!allowGoReference) [ "-trimpath" ];
GOARM = toString (stdenv.lib.intersectLists [(stdenv.hostPlatform.parsed.cpu.version or "")] ["5" "6" "7"]); GOARM = toString (lib.intersectLists [(stdenv.hostPlatform.parsed.cpu.version or "")] ["5" "6" "7"]);
configurePhase = args.configurePhase or '' configurePhase = args.configurePhase or ''
runHook preConfigure runHook preConfigure

View file

@ -16,7 +16,7 @@ stdenv.mkDerivation rec {
buildInputs = [ buildInputs = [
texinfo guile gwrap pkgconfig gconf glib gnome_vfs gtk2 texinfo guile gwrap pkgconfig gconf glib gnome_vfs gtk2
libglade libgnome libgnomecanvas libgnomeui pango guile-cairo libglade libgnome libgnomecanvas libgnomeui pango guile-cairo
] ++ stdenv.lib.optional doCheck guile-lib; ] ++ lib.optional doCheck guile-lib;
# The test suite tries to open an X display, which fails. # The test suite tries to open an X display, which fails.
doCheck = false; doCheck = false;

View file

@ -1,7 +1,6 @@
{ lib, stdenv, fetchurl, fetchpatch, pkgconfig { lib, stdenv, fetchurl, fetchpatch, pkgconfig
, gperf, guile, guile-lib, libffi }: , gperf, guile, guile-lib, libffi }:
with stdenv.lib;
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "guile-reader"; pname = "guile-reader";

View file

@ -1,10 +1,10 @@
# Build a version of idris with a set of packages visible # Build a version of idris with a set of packages visible
# packages: The packages visible to idris # packages: The packages visible to idris
{ stdenv, idris, symlinkJoin, makeWrapper }: packages: { stdenv, lib, idris, symlinkJoin, makeWrapper }: packages:
let paths = stdenv.lib.closePropagation packages; let paths = lib.closePropagation packages;
in in
stdenv.lib.appendToName "with-packages" (symlinkJoin { lib.appendToName "with-packages" (symlinkJoin {
inherit (idris) name; inherit (idris) name;

View file

@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, buildPerlPackage, shortenPerlShebang, LWP, LWPProtocolHttps, DataDump, JSON }: { stdenv, lib, fetchFromGitHub, buildPerlPackage, shortenPerlShebang, LWP, LWPProtocolHttps, DataDump, JSON }:
buildPerlPackage rec { buildPerlPackage rec {
pname = "WWW-YoutubeViewer"; pname = "WWW-YoutubeViewer";
@ -11,21 +11,21 @@ buildPerlPackage rec {
sha256 = "16p0sa91h0zpqdpqmy348g6b9qj5f6qrbzrljn157vk00cg6mx18"; sha256 = "16p0sa91h0zpqdpqmy348g6b9qj5f6qrbzrljn157vk00cg6mx18";
}; };
nativeBuildInputs = stdenv.lib.optional stdenv.isDarwin shortenPerlShebang; nativeBuildInputs = lib.optional stdenv.isDarwin shortenPerlShebang;
propagatedBuildInputs = [ propagatedBuildInputs = [
LWP LWP
LWPProtocolHttps LWPProtocolHttps
DataDump DataDump
JSON JSON
]; ];
postInstall = stdenv.lib.optionalString stdenv.isDarwin '' postInstall = lib.optionalString stdenv.isDarwin ''
shortenPerlShebang $out/bin/youtube-viewer shortenPerlShebang $out/bin/youtube-viewer
''; '';
meta = { meta = with lib; {
description = "A lightweight application for searching and streaming videos from YouTube"; description = "A lightweight application for searching and streaming videos from YouTube";
homepage = "https://github.com/trizen/youtube-viewer"; homepage = "https://github.com/trizen/youtube-viewer";
maintainers = with stdenv.lib.maintainers; [ woffs ]; maintainers = with maintainers; [ woffs ];
license = with stdenv.lib.licenses; [ artistic2 ]; license = with licenses; [ artistic2 ];
}; };
} }

View file

@ -1,4 +1,4 @@
{buildPerlPackage, stdenv, fetchurl, DBDmysql}: {buildPerlPackage, lib, stdenv, fetchurl, DBDmysql}:
buildPerlPackage { buildPerlPackage {
pname = "maatkit"; pname = "maatkit";
@ -27,7 +27,7 @@ buildPerlPackage {
done done
'' ; '' ;
meta = { meta = with lib; {
description = "Database toolkit"; description = "Database toolkit";
longDescription = '' longDescription = ''
You can use Maatkit to prove replication is working correctly, fix You can use Maatkit to prove replication is working correctly, fix
@ -37,7 +37,7 @@ buildPerlPackage {
In addition to MySQL, there is support for PostgreSQL, Memcached, and a In addition to MySQL, there is support for PostgreSQL, Memcached, and a
growing variety of other databases and technologies. growing variety of other databases and technologies.
''; '';
license = stdenv.lib.licenses.gpl2Plus; license = licenses.gpl2Plus;
homepage = "http://www.maatkit.org/"; homepage = "http://www.maatkit.org/";
}; };
} }

View file

@ -17,7 +17,7 @@ buildPerlPackage rec {
# stray test failure # stray test failure
doCheck = false; doCheck = false;
nativeBuildInputs = stdenv.lib.optionals stdenv.isDarwin [ shortenPerlShebang ]; nativeBuildInputs = lib.optionals stdenv.isDarwin [ shortenPerlShebang ];
buildInputs = [ ArchiveZip ArchiveCpio file ]; buildInputs = [ ArchiveZip ArchiveCpio file ];
perlPostHook = '' perlPostHook = ''
@ -26,7 +26,7 @@ buildPerlPackage rec {
rm $out/share/man/man1/dh_strip_nondeterminism.1.gz rm $out/share/man/man1/dh_strip_nondeterminism.1.gz
''; '';
postInstall = stdenv.lib.optionalString stdenv.isDarwin '' postInstall = lib.optionalString stdenv.isDarwin ''
shortenPerlShebang $out/bin/strip-nondeterminism shortenPerlShebang $out/bin/strip-nondeterminism
''; '';

View file

@ -1,14 +1,14 @@
{ stdenv, R, libcxx, xvfb_run, util-linux, Cocoa, Foundation, gettext, gfortran }: { stdenv, lib, R, libcxx, xvfb_run, util-linux, Cocoa, Foundation, gettext, gfortran }:
{ name, buildInputs ? [], requireX ? false, ... } @ attrs: { name, buildInputs ? [], requireX ? false, ... } @ attrs:
stdenv.mkDerivation ({ stdenv.mkDerivation ({
buildInputs = buildInputs ++ [R gettext] ++ buildInputs = buildInputs ++ [R gettext] ++
stdenv.lib.optionals requireX [util-linux xvfb_run] ++ lib.optionals requireX [util-linux xvfb_run] ++
stdenv.lib.optionals stdenv.isDarwin [Cocoa Foundation gfortran]; lib.optionals stdenv.isDarwin [Cocoa Foundation gfortran];
NIX_CFLAGS_COMPILE = NIX_CFLAGS_COMPILE =
stdenv.lib.optionalString stdenv.isDarwin "-I${libcxx}/include/c++/v1"; lib.optionalString stdenv.isDarwin "-I${libcxx}/include/c++/v1";
configurePhase = '' configurePhase = ''
runHook preConfigure runHook preConfigure

View file

@ -265,7 +265,7 @@ in
hitimes = attrs: { hitimes = attrs: {
buildInputs = buildInputs =
stdenv.lib.optionals stdenv.isDarwin lib.optionals stdenv.isDarwin
[ darwin.apple_sdk.frameworks.CoreServices ]; [ darwin.apple_sdk.frameworks.CoreServices ];
}; };
@ -514,7 +514,7 @@ in
--replace "gobject-2.0" "${glib.out}/lib/libgobject-2.0${stdenv.hostPlatform.extensions.sharedLibrary}" --replace "gobject-2.0" "${glib.out}/lib/libgobject-2.0${stdenv.hostPlatform.extensions.sharedLibrary}"
substituteInPlace lib/vips.rb \ substituteInPlace lib/vips.rb \
--replace "vips_libname = 'vips'" "vips_libname = '${stdenv.lib.getLib vips}/lib/libvips${stdenv.hostPlatform.extensions.sharedLibrary}'" --replace "vips_libname = 'vips'" "vips_libname = '${lib.getLib vips}/lib/libvips${stdenv.hostPlatform.extensions.sharedLibrary}'"
''; '';
}; };
@ -631,7 +631,7 @@ in
}; };
zookeeper = attrs: { zookeeper = attrs: {
buildInputs = stdenv.lib.optionals stdenv.isDarwin [ darwin.cctools ]; buildInputs = lib.optionals stdenv.isDarwin [ darwin.cctools ];
dontBuild = false; dontBuild = false;
postPatch = '' postPatch = ''
sed -i ext/extconf.rb -e "4a \ sed -i ext/extconf.rb -e "4a \