pkgs/development/compilers: stdenv.lib -> lib
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
{ stdenv, makeWrapper, bash, curl, darwin, zlib
|
||||
{ lib, stdenv, makeWrapper, bash, curl, darwin, zlib
|
||||
, version
|
||||
, src
|
||||
, platform
|
||||
@@ -6,7 +6,7 @@
|
||||
}:
|
||||
|
||||
let
|
||||
inherit (stdenv.lib) optionalString;
|
||||
inherit (lib) optionalString;
|
||||
inherit (darwin.apple_sdk.frameworks) Security;
|
||||
|
||||
bootstrapping = versionType == "bootstrap";
|
||||
@@ -24,7 +24,7 @@ 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; [ qknight ];
|
||||
@@ -32,7 +32,7 @@ rec {
|
||||
};
|
||||
|
||||
buildInputs = [ bash ]
|
||||
++ stdenv.lib.optional stdenv.isDarwin Security;
|
||||
++ lib.optional stdenv.isDarwin Security;
|
||||
|
||||
postPatch = ''
|
||||
patchShebangs .
|
||||
@@ -46,7 +46,7 @@ rec {
|
||||
patchelf \
|
||||
--set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
|
||||
"$out/bin/rustc"
|
||||
'' + optionalString (stdenv.lib.versionAtLeast version "1.46")
|
||||
'' + optionalString (lib.versionAtLeast version "1.46")
|
||||
# rustc bootstrap needs libz starting from 1.46
|
||||
''
|
||||
ln -s ${zlib}/lib/libz.so.1 $out/lib/libz.so.1
|
||||
@@ -76,7 +76,7 @@ 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; [ qknight ];
|
||||
@@ -84,7 +84,7 @@ rec {
|
||||
};
|
||||
|
||||
buildInputs = [ makeWrapper bash ]
|
||||
++ stdenv.lib.optional stdenv.isDarwin Security;
|
||||
++ lib.optional stdenv.isDarwin Security;
|
||||
|
||||
postPatch = ''
|
||||
patchShebangs .
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv, file, curl, pkg-config, python3, openssl, cmake, zlib
|
||||
{ lib, stdenv, file, curl, pkg-config, python3, openssl, cmake, zlib
|
||||
, installShellFiles, makeWrapper, libiconv, cacert, rustPlatform, rustc
|
||||
, CoreFoundation, Security
|
||||
}:
|
||||
@@ -18,7 +18,7 @@ rustPlatform.buildRustPackage {
|
||||
|
||||
nativeBuildInputs = [ pkg-config cmake installShellFiles makeWrapper ];
|
||||
buildInputs = [ cacert file curl python3 openssl zlib ]
|
||||
++ stdenv.lib.optionals stdenv.isDarwin [ CoreFoundation Security libiconv ];
|
||||
++ lib.optionals stdenv.isDarwin [ CoreFoundation Security libiconv ];
|
||||
|
||||
# cargo uses git-rs which is made for a version of libgit2 from recent master that
|
||||
# is not compatible with the current version in nixpkgs.
|
||||
@@ -54,7 +54,7 @@ rustPlatform.buildRustPackage {
|
||||
# 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; [ retrry ];
|
||||
|
||||
@@ -10,7 +10,7 @@ rustPlatform.buildRustPackage {
|
||||
# changes hash of vendor directory otherwise
|
||||
dontUpdateAutotoolsGnuConfigScripts = true;
|
||||
|
||||
buildInputs = [ rustc rustc.llvm ] ++ stdenv.lib.optionals stdenv.isDarwin [ Security ];
|
||||
buildInputs = [ rustc rustc.llvm ] ++ lib.optionals stdenv.isDarwin [ Security ];
|
||||
|
||||
# fixes: error: the option `Z` is only accepted on the nightly compiler
|
||||
RUSTC_BOOTSTRAP = 1;
|
||||
@@ -20,11 +20,11 @@ rustPlatform.buildRustPackage {
|
||||
# (/private/tmp/nix-build-clippy-1.36.0.drv-0/rustc-1.36.0-src/src/librustc_llvm)
|
||||
doCheck = false;
|
||||
|
||||
preFixup = stdenv.lib.optionalString stdenv.isDarwin ''
|
||||
preFixup = lib.optionalString stdenv.isDarwin ''
|
||||
install_name_tool -add_rpath "${rustc}/lib" $out/bin/clippy-driver
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
homepage = "https://rust-lang.github.io/rust-clippy/";
|
||||
description = "A bunch of lints to catch common mistakes and improve your Rust code";
|
||||
maintainers = with maintainers; [ basvandijk ];
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv, makeWrapper, fetchFromGitHub, rustPlatform
|
||||
{ lib, stdenv, makeWrapper, fetchFromGitHub, rustPlatform
|
||||
, openssh, openssl, pkg-config, cmake, zlib, curl, libiconv
|
||||
, CoreFoundation, Security }:
|
||||
|
||||
@@ -30,7 +30,7 @@ rustPlatform.buildRustPackage {
|
||||
|
||||
nativeBuildInputs = [ pkg-config cmake ];
|
||||
buildInputs = [ openssh openssl curl zlib libiconv makeWrapper rustPlatform.rust.rustc.llvm ]
|
||||
++ (stdenv.lib.optionals stdenv.isDarwin [ CoreFoundation Security ]);
|
||||
++ (lib.optionals stdenv.isDarwin [ CoreFoundation Security ]);
|
||||
|
||||
doCheck = true;
|
||||
|
||||
@@ -44,7 +44,7 @@ rustPlatform.buildRustPackage {
|
||||
wrapProgram $out/bin/rls --set-default RUST_SRC_PATH ${rustPlatform.rustLibSrc}
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "Rust Language Server - provides information about Rust programs to IDEs and other tools";
|
||||
homepage = "https://github.com/rust-lang/rls/";
|
||||
license = with licenses; [ asl20 /* or */ mit ];
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv, removeReferencesTo, pkgsBuildBuild, pkgsBuildHost, pkgsBuildTarget
|
||||
{ lib, stdenv, removeReferencesTo, pkgsBuildBuild, pkgsBuildHost, pkgsBuildTarget
|
||||
, llvmShared, llvmSharedForBuild, llvmSharedForHost, llvmSharedForTarget
|
||||
, fetchurl, file, python3
|
||||
, darwin, cmake, rust, rustPlatform
|
||||
@@ -12,7 +12,7 @@
|
||||
}:
|
||||
|
||||
let
|
||||
inherit (stdenv.lib) optionals optional optionalString concatStringsSep;
|
||||
inherit (lib) optionals optional optionalString concatStringsSep;
|
||||
inherit (darwin.apple_sdk.frameworks) Security;
|
||||
in stdenv.mkDerivation rec {
|
||||
pname = "rustc";
|
||||
@@ -143,7 +143,7 @@ in stdenv.mkDerivation rec {
|
||||
outputs = [ "out" "man" "doc" ];
|
||||
setOutputFlags = false;
|
||||
|
||||
postInstall = stdenv.lib.optionalString enableRustcDev ''
|
||||
postInstall = lib.optionalString enableRustcDev ''
|
||||
# install rustc-dev components. Necessary to build rls, clippy...
|
||||
python x.py dist rustc-dev
|
||||
tar xf build/dist/rustc-dev*tar.gz
|
||||
@@ -172,7 +172,7 @@ in stdenv.mkDerivation rec {
|
||||
|
||||
passthru.llvm = llvmShared;
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
homepage = "https://www.rust-lang.org/";
|
||||
description = "A safe, concurrent, practical language";
|
||||
maintainers = with maintainers; [ madjar cstrahan globin havvy ];
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv, rustPlatform, Security }:
|
||||
{ lib, stdenv, rustPlatform, Security }:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "rustfmt";
|
||||
@@ -11,7 +11,7 @@ rustPlatform.buildRustPackage rec {
|
||||
# changes hash of vendor directory otherwise
|
||||
dontUpdateAutotoolsGnuConfigScripts = true;
|
||||
|
||||
buildInputs = stdenv.lib.optional stdenv.isDarwin Security;
|
||||
buildInputs = lib.optional stdenv.isDarwin Security;
|
||||
|
||||
# As of 1.0.0 and rustc 1.30 rustfmt requires a nightly compiler
|
||||
RUSTC_BOOTSTRAP = 1;
|
||||
@@ -21,7 +21,7 @@ rustPlatform.buildRustPackage rec {
|
||||
CFG_RELEASE = "${rustPlatform.rust.rustc.version}-nightly";
|
||||
CFG_RELEASE_CHANNEL = "nightly";
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "A tool for formatting Rust code according to style guidelines";
|
||||
homepage = "https://github.com/rust-lang-nursery/rustfmt";
|
||||
license = with licenses; [ mit asl20 ];
|
||||
|
||||
Reference in New Issue
Block a user