treewide: Remove usages of stdenv.lib by @doronbehar

Per: https://github.com/NixOS/nixpkgs/issues/108938
This commit is contained in:
Doron Behar 2021-01-23 10:47:37 +02:00
parent 4affc40a50
commit f9c6e07c67
13 changed files with 67 additions and 45 deletions

View file

@ -1,5 +1,4 @@
{ mkDerivation { mkDerivation
, stdenv
, lib , lib
, fetchFromGitHub , fetchFromGitHub
, qtbase , qtbase

View file

@ -1,4 +1,4 @@
{ lib, stdenv { lib
, buildGoModule , buildGoModule
, fetchFromGitHub , fetchFromGitHub
}: }:

View file

@ -1,4 +1,4 @@
{ lib, stdenv { lib
, fetchFromGitHub , fetchFromGitHub
, python3Packages , python3Packages
, gobject-introspection , gobject-introspection

View file

@ -1,4 +1,5 @@
{ stdenv { stdenv
, lib
# Note: either stdenv.mkDerivation or, for octaveFull, the qt-5 mkDerivation # Note: either stdenv.mkDerivation or, for octaveFull, the qt-5 mkDerivation
# with wrapQtAppsHook (comes from libsForQt5.callPackage) # with wrapQtAppsHook (comes from libsForQt5.callPackage)
, mkDerivation , mkDerivation
@ -124,21 +125,21 @@ in mkDerivation rec {
libwebp libwebp
gl2ps gl2ps
] ]
++ stdenv.lib.optionals enableQt [ ++ lib.optionals enableQt [
qtbase qtbase
qtsvg qtsvg
qscintilla qscintilla
] ]
++ stdenv.lib.optionals (ghostscript != null) [ ghostscript ] ++ lib.optionals (ghostscript != null) [ ghostscript ]
++ stdenv.lib.optionals (hdf5 != null) [ hdf5 ] ++ lib.optionals (hdf5 != null) [ hdf5 ]
++ stdenv.lib.optionals (glpk != null) [ glpk ] ++ lib.optionals (glpk != null) [ glpk ]
++ stdenv.lib.optionals (suitesparse != null) [ suitesparse' ] ++ lib.optionals (suitesparse != null) [ suitesparse' ]
++ stdenv.lib.optionals (enableJava) [ jdk ] ++ lib.optionals (enableJava) [ jdk ]
++ stdenv.lib.optionals (sundials != null) [ sundials ] ++ lib.optionals (sundials != null) [ sundials ]
++ stdenv.lib.optionals (gnuplot != null) [ gnuplot ] ++ lib.optionals (gnuplot != null) [ gnuplot ]
++ stdenv.lib.optionals (python != null) [ python ] ++ lib.optionals (python != null) [ python ]
++ stdenv.lib.optionals (!stdenv.isDarwin) [ libGL libGLU libX11 ] ++ lib.optionals (!stdenv.isDarwin) [ libGL libGLU libX11 ]
++ stdenv.lib.optionals stdenv.isDarwin [ ++ lib.optionals stdenv.isDarwin [
libiconv libiconv
darwin.apple_sdk.frameworks.Accelerate darwin.apple_sdk.frameworks.Accelerate
darwin.apple_sdk.frameworks.Cocoa darwin.apple_sdk.frameworks.Cocoa
@ -152,9 +153,9 @@ in mkDerivation rec {
fftwSinglePrec fftwSinglePrec
texinfo texinfo
] ]
++ stdenv.lib.optionals (sundials != null) [ sundials ] ++ lib.optionals (sundials != null) [ sundials ]
++ stdenv.lib.optionals enableJIT [ llvm ] ++ lib.optionals enableJIT [ llvm ]
++ stdenv.lib.optionals enableQt [ ++ lib.optionals enableQt [
qtscript qtscript
qttools qttools
] ]
@ -172,11 +173,11 @@ in mkDerivation rec {
"--with-lapack=lapack" "--with-lapack=lapack"
(if use64BitIdx then "--enable-64" else "--disable-64") (if use64BitIdx then "--enable-64" else "--disable-64")
] ]
++ stdenv.lib.optionals stdenv.isDarwin [ "--enable-link-all-dependencies" ] ++ lib.optionals stdenv.isDarwin [ "--enable-link-all-dependencies" ]
++ stdenv.lib.optionals enableReadline [ "--enable-readline" ] ++ lib.optionals enableReadline [ "--enable-readline" ]
++ stdenv.lib.optionals stdenv.isDarwin [ "--with-x=no" ] ++ lib.optionals stdenv.isDarwin [ "--with-x=no" ]
++ stdenv.lib.optionals enableQt [ "--with-qt=5" ] ++ lib.optionals enableQt [ "--with-qt=5" ]
++ stdenv.lib.optionals enableJIT [ "--enable-jit" ] ++ lib.optionals enableJIT [ "--enable-jit" ]
; ;
# Keep a copy of the octave tests detailed results in the output # Keep a copy of the octave tests detailed results in the output
@ -198,13 +199,13 @@ in mkDerivation rec {
meta = { meta = {
homepage = "https://www.gnu.org/software/octave/"; homepage = "https://www.gnu.org/software/octave/";
license = stdenv.lib.licenses.gpl3Plus; license = lib.licenses.gpl3Plus;
maintainers = with stdenv.lib.maintainers; [ raskin doronbehar ]; maintainers = with lib.maintainers; [ raskin doronbehar ];
description = "Scientific Pragramming Language"; description = "Scientific Pragramming Language";
# https://savannah.gnu.org/bugs/?func=detailitem&item_id=56425 is the best attempt to fix JIT # https://savannah.gnu.org/bugs/?func=detailitem&item_id=56425 is the best attempt to fix JIT
broken = enableJIT; broken = enableJIT;
platforms = if overridePlatforms == null then platforms = if overridePlatforms == null then
(with stdenv.lib; platforms.linux ++ platforms.darwin) (lib.platforms.linux ++ lib.platforms.darwin)
else overridePlatforms; else overridePlatforms;
}; };
} }

View file

@ -1,4 +1,5 @@
{ lib, stdenv { stdenv
, lib
, fetchFromGitHub , fetchFromGitHub
, autoreconfHook , autoreconfHook
, flex , flex

View file

@ -1,4 +1,5 @@
{ lib, stdenv { stdenv
, lib
, fetchFromGitHub , fetchFromGitHub
, fetchpatch , fetchpatch
, cmake , cmake

View file

@ -1,4 +1,5 @@
{ lib, stdenv { stdenv
, lib
, fetchFromGitHub , fetchFromGitHub
, autoreconfHook , autoreconfHook
, systemd , systemd

View file

@ -1,4 +1,5 @@
{ lib, stdenv { stdenv
, lib
, fetchurl , fetchurl
, gfortran , gfortran
, blas , blas

View file

@ -1,4 +1,12 @@
{ lib, stdenv, fetchFromGitHub, cpp-utilities, qttools, qtbase, cmake, pkg-config }: { stdenv
, lib
, fetchFromGitHub
, cpp-utilities
, qttools
, qtbase
, cmake
, pkg-config
}:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "qtutilities"; pname = "qtutilities";

View file

@ -1,4 +1,5 @@
{ lib, stdenv { stdenv
, lib
, fetchFromGitHub , fetchFromGitHub
, cmake , cmake
}: }:

View file

@ -1,4 +1,14 @@
{ stdenv, fetchFromGitHub, cargo, rustc, rustPlatform, pkg-config, glib, openssl, darwin }: { stdenv
, lib
, fetchFromGitHub
, cargo
, rustc
, rustPlatform
, pkg-config
, glib
, openssl
, darwin
}:
rustPlatform.buildRustPackage rec { rustPlatform.buildRustPackage rec {
version = "0.2.14"; version = "0.2.14";
@ -18,12 +28,12 @@ rustPlatform.buildRustPackage rec {
]; ];
buildInputs = [ buildInputs = [
openssl openssl
] ++ stdenv.lib.optional stdenv.isDarwin darwin.apple_sdk.frameworks.Security; ] ++ lib.optional stdenv.isDarwin darwin.apple_sdk.frameworks.Security;
# Tests fail because of client server setup which is not possible inside the pure environment, # Tests fail because of client server setup which is not possible inside the pure environment,
# see https://github.com/mozilla/sccache/issues/460 # see https://github.com/mozilla/sccache/issues/460
checkPhase = null; checkPhase = null;
meta = with stdenv.lib; { meta = with lib; {
description = "Ccache with Cloud Storage"; description = "Ccache with Cloud Storage";
homepage = "https://github.com/mozilla/sccache"; homepage = "https://github.com/mozilla/sccache";
maintainers = with maintainers; [ doronbehar ]; maintainers = with maintainers; [ doronbehar ];

View file

@ -1,6 +1,5 @@
{ stdenv { lib
, buildGoPackage , buildGoPackage
, lib
, fetchFromGitHub , fetchFromGitHub
, buildGoModule , buildGoModule
, sqlite , sqlite

View file

@ -1,12 +1,12 @@
{ { stdenv
lib, stdenv, , lib
fetchurl, , fetchurl
gnuplot, , gnuplot
sox, , sox
flac, , flac
id3v2, , id3v2
vorbis-tools, , vorbis-tools
makeWrapper , makeWrapper
}: }:
let let