pkgs/development: stdenv.lib -> lib

This commit is contained in:
Ben Siraphob
2021-01-24 00:15:07 +07:00
parent ec334a1b01
commit 2f78ee7e81
121 changed files with 324 additions and 322 deletions

View File

@@ -32,7 +32,7 @@ rustPlatform.buildRustPackage rec {
# Install completions post-install
nativeBuildInputs = [ installShellFiles ];
buildInputs = stdenv.lib.optionals stdenv.isDarwin [ Security CoreServices ];
buildInputs = lib.optionals stdenv.isDarwin [ Security CoreServices ];
# The rusty_v8 package will try to download a `librusty_v8.a` release at build time to our read-only filesystem
# To avoid this we pre-download the file and place it in the locations it will require it in advance

View File

@@ -6,8 +6,8 @@
}:
let
binpath = stdenv.lib.makeBinPath
([ coreutils ncurses gnused gnugrep ] ++ stdenv.lib.optional (jdk != null) jdk);
binpath = lib.makeBinPath
([ coreutils ncurses gnused gnugrep ] ++ lib.optional (jdk != null) jdk);
in
stdenv.mkDerivation rec {
pname = "grails";
@@ -29,7 +29,7 @@ stdenv.mkDerivation rec {
rm -f "$out"/bin/*.bat
# Improve purity
sed -i -e '2iPATH=${binpath}:\$PATH' "$out"/bin/grails
'' + stdenv.lib.optionalString (jdk != null) ''
'' + lib.optionalString (jdk != null) ''
# Inject JDK path into grails
sed -i -e '2iJAVA_HOME=${jdk.home}' "$out"/bin/grails
'';

View File

@@ -6,7 +6,7 @@
, libudev0-shim, glibc, curl, openssl, autoPatchelfHook }:
let
runtimeLibs = stdenv.lib.makeLibraryPath [
runtimeLibs = lib.makeLibraryPath [
curl
glibc
libudev0-shim

View File

@@ -3,7 +3,7 @@
stdenv.mkDerivation rec {
pname = "kcgi";
version = "0.10.8";
underscoreVersion = stdenv.lib.replaceChars ["."] ["_"] version;
underscoreVersion = lib.replaceChars ["."] ["_"] version;
src = fetchFromGitHub {
owner = "kristapsdz";
@@ -16,7 +16,7 @@ stdenv.mkDerivation rec {
'';
nativeBuildInputs = [ pkg-config ];
buildInputs = [ ] ++ stdenv.lib.optionals stdenv.isLinux [ libbsd ] ;
buildInputs = [ ] ++ lib.optionals stdenv.isLinux [ libbsd ] ;
dontAddPrefix = true;

View File

@@ -28,8 +28,8 @@ stdenv.mkDerivation rec {
'';
# added to fix build w/gcc7 and clang5
NIX_CFLAGS_COMPILE = stdenv.lib.optionalString stdenv.cc.isGNU "-Wno-error=pointer-compare"
+ stdenv.lib.optionalString stdenv.cc.isClang " -Wno-error=unknown-warning-option";
NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isGNU "-Wno-error=pointer-compare"
+ lib.optionalString stdenv.cc.isClang " -Wno-error=unknown-warning-option";
enableParallelBuilding = true;

View File

@@ -1,4 +1,4 @@
{ stdenv, fetchurl, openssl, python, zlib, libuv, util-linux, http-parser
{ lib, stdenv, fetchurl, openssl, python, zlib, libuv, util-linux, http-parser
, pkg-config, which
# Updater dependencies
, writeScript, coreutils, gnugrep, jq, curl, common-updater-scripts, nix, runtimeShell
@@ -7,7 +7,7 @@
, procps, icu
}:
with stdenv.lib;
with lib;
{ enableNpm ? true, version, sha256, patches ? [] } @args:

View File

@@ -1,4 +1,4 @@
{ callPackage, openssl, icu, python2, stdenv, enableNpm ? true }:
{ callPackage, openssl, icu, python2, lib, stdenv, enableNpm ? true }:
let
buildNodejs = callPackage ./nodejs.nix {
@@ -10,5 +10,5 @@ in
inherit enableNpm;
version = "10.23.1";
sha256 = "1ypddif8jc8qrw9n1f8zbpknjcbnjc9xhpm57hc5nqbrmzsidal8";
patches = stdenv.lib.optional stdenv.isDarwin ./bypass-xcodebuild.diff;
patches = lib.optional stdenv.isDarwin ./bypass-xcodebuild.diff;
}

View File

@@ -1,4 +1,4 @@
{ callPackage, openssl, icu, python2, stdenv, enableNpm ? true }:
{ callPackage, openssl, icu, python2, lib, stdenv, enableNpm ? true }:
let
buildNodejs = callPackage ./nodejs.nix {
@@ -10,5 +10,5 @@ in
inherit enableNpm;
version = "12.20.1";
sha256 = "0lqq6a2byw4qmig98j45gqnl0593xdhx1dr9k7x2nnvhblrfw3p0";
patches = stdenv.lib.optional stdenv.isDarwin ./bypass-xcodebuild.diff;
patches = lib.optional stdenv.isDarwin ./bypass-xcodebuild.diff;
}

View File

@@ -1,4 +1,4 @@
{ callPackage, openssl, python3, stdenv, enableNpm ? true }:
{ callPackage, openssl, python3, lib, stdenv, enableNpm ? true }:
let
buildNodejs = callPackage ./nodejs.nix {
@@ -10,5 +10,5 @@ in
inherit enableNpm;
version = "14.15.4";
sha256 = "177cxp4fhmglyx035j8smiy1bp5fz6q2phlcl0a2mdbldkvfrdxd";
patches = stdenv.lib.optional stdenv.isDarwin ./bypass-xcodebuild.diff;
patches = lib.optional stdenv.isDarwin ./bypass-xcodebuild.diff;
}

View File

@@ -88,7 +88,7 @@ stdenv.mkDerivation rec {
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" _Postman
for file in $(find . -type f \( -name \*.node -o -name _Postman -o -name \*.so\* \) ); do
ORIGIN=$(patchelf --print-rpath $file); \
patchelf --set-rpath "${stdenv.lib.makeLibraryPath buildInputs}:$ORIGIN" $file
patchelf --set-rpath "${lib.makeLibraryPath buildInputs}:$ORIGIN" $file
done
popd
'';

View File

@@ -63,8 +63,8 @@ in stdenv.mkDerivation rec {
homepage = "https://remarkjs.com";
description = "A simple, in-browser, markdown-driven slideshow tool";
maintainers = [];
platforms = stdenv.lib.platforms.linux;
license = stdenv.lib.licenses.mit;
platforms = lib.platforms.linux;
license = lib.licenses.mit;
broken = true;
};
}

View File

@@ -1,4 +1,4 @@
{ stdenv, fetchurl, unzip }:
{ lib, stdenv, fetchurl, unzip }:
stdenv.mkDerivation rec {
pname = "bootstrap";
@@ -20,7 +20,7 @@ stdenv.mkDerivation rec {
meta = {
description = "Front-end framework for faster and easier web development";
homepage = "https://getbootstrap.com/";
license = stdenv.lib.licenses.mit;
license = lib.licenses.mit;
};
}

View File

@@ -16,14 +16,14 @@ stdenv.mkDerivation rec {
outputs = [ "out" "dev" "lib" ];
# Need to explicitly link to brotlicommon
patches = stdenv.lib.optional static ./brotli-static.patch;
patches = lib.optional static ./brotli-static.patch;
nativeBuildInputs = [ cmake pkg-config ];
cmakeFlags = [
"-DCANONICAL_PREFIXES=ON"
"-DBUILD_SHARED_LIBS=${if static then "OFF" else "ON"}"
] ++ stdenv.lib.optional static "-DCMAKE_SKIP_RPATH:BOOL=TRUE";
] ++ lib.optional static "-DCMAKE_SKIP_RPATH:BOOL=TRUE";
propagatedBuildInputs = [ brotli ];

View File

@@ -1,4 +1,4 @@
{ stdenv, fetchurl, flex }:
{ lib, stdenv, fetchurl, flex }:
stdenv.mkDerivation rec {
pname = "xmlindent";
@@ -18,8 +18,8 @@ stdenv.mkDerivation rec {
meta = {
description = "XML stream reformatter";
homepage = "http://xmlindent.sourceforge.net/";
license = stdenv.lib.licenses.gpl3;
platforms = stdenv.lib.platforms.linux;
license = lib.licenses.gpl3;
platforms = lib.platforms.linux;
maintainers = [ ];
};
}