pkgs/os-specific: stdenv.lib -> lib

This commit is contained in:
Ben Siraphob
2021-01-17 23:26:08 +07:00
parent 979e6e67d3
commit 16d91ee628
212 changed files with 597 additions and 599 deletions
@@ -1,4 +1,4 @@
{ stdenv, fetchurl }:
{ lib, stdenv, fetchurl }:
stdenv.mkDerivation rec {
name = "b43-fwcutter-019";
@@ -15,7 +15,7 @@ stdenv.mkDerivation rec {
meta = {
description = "Firmware extractor for cards supported by the b43 kernel module";
homepage = "http://wireless.kernel.org/en/users/Drivers/b43";
license = stdenv.lib.licenses.free;
platforms = stdenv.lib.platforms.linux;
license = lib.licenses.free;
platforms = lib.platforms.linux;
};
}
@@ -1,4 +1,4 @@
{ stdenv, fetchurl, b43FirmwareCutter }:
{ lib, stdenv, fetchurl, b43FirmwareCutter }:
let version = "5.100.138"; in
@@ -23,7 +23,7 @@ stdenv.mkDerivation {
meta = {
description = "Firmware for cards supported by the b43 kernel module";
homepage = "http://wireless.kernel.org/en/users/Drivers/b43";
license = stdenv.lib.licenses.unfree;
license = lib.licenses.unfree;
};
}
@@ -19,7 +19,7 @@ stdenvNoCC.mkDerivation rec {
outputHashAlgo = "sha256";
outputHash = "1p7vn2hfwca6w69jhw5zq70w44ji8mdnibm1z959aalax6ndy146";
meta = with stdenvNoCC.lib; {
meta = with lib; {
description = "Binary firmware collection packaged by kernel.org";
homepage = "https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git";
license = licenses.unfreeRedistributableFirmware;
@@ -160,7 +160,7 @@ let
pango
tpm2-tss
efivar
] ++ stdenv.lib.optionals haveDell [
] ++ lib.optionals haveDell [
libsmbios
];
@@ -187,12 +187,12 @@ let
# Our builder only adds $lib/lib to rpath but some things link
# against libfwupdplugin which is in $out/lib.
"-Dc_link_args=-Wl,-rpath,${placeholder "out"}/lib"
] ++ stdenv.lib.optionals (!haveDell) [
] ++ lib.optionals (!haveDell) [
"-Dplugin_dell=false"
"-Dplugin_synaptics=false"
] ++ stdenv.lib.optionals (!haveRedfish) [
] ++ lib.optionals (!haveRedfish) [
"-Dplugin_redfish=false"
] ++ stdenv.lib.optionals haveFlashrom [
] ++ lib.optionals haveFlashrom [
"-Dplugin_flashrom=true"
];
@@ -250,12 +250,12 @@ let
efibootmgr
bubblewrap
tpm2-tools
] ++ stdenv.lib.optional haveFlashrom flashrom;
] ++ lib.optional haveFlashrom flashrom;
in ''
gappsWrapperArgs+=(
--prefix XDG_DATA_DIRS : "${shared-mime-info}/share"
# See programs reached with fu_common_find_program_in_path in source
--prefix PATH : "${stdenv.lib.makeBinPath binPath}"
--prefix PATH : "${lib.makeBinPath binPath}"
)
'';
@@ -291,7 +291,7 @@ let
"pki/fwupd-metadata/GPG-KEY-Linux-Foundation-Metadata"
"pki/fwupd-metadata/GPG-KEY-Linux-Vendor-Firmware-Service"
"pki/fwupd-metadata/LVFS-CA.pem"
] ++ stdenv.lib.optionals haveDell [
] ++ lib.optionals haveDell [
"fwupd/remotes.d/dell-esrt.conf"
];
@@ -302,7 +302,7 @@ let
];
tests = let
listToPy = list: "[${stdenv.lib.concatMapStringsSep ", " (f: "'${f}'") list}]";
listToPy = list: "[${lib.concatMapStringsSep ", " (f: "'${f}'") list}]";
in {
installedTests = nixosTests.installed-tests.fwupd;
@@ -1,7 +1,7 @@
{ lib, stdenv, fetchFromGitHub, cmake, pkgconfig }:
let
inherit (stdenv.lib) optionals;
inherit (lib) optionals;
in
stdenv.mkDerivation {
pname = "raspberrypi-armstubs";
@@ -1,4 +1,4 @@
{ stdenvNoCC, fetchFromGitHub }:
{ lib, stdenvNoCC, fetchFromGitHub }:
stdenvNoCC.mkDerivation rec {
# NOTE: this should be updated with linux_rpi
@@ -21,7 +21,7 @@ stdenvNoCC.mkDerivation rec {
dontBuild = true;
dontFixup = true;
meta = with stdenvNoCC.lib; {
meta = with lib; {
description = "Firmware for the Raspberry Pi board";
homepage = "https://github.com/raspberrypi/firmware";
license = licenses.unfreeRedistributableFirmware; # See https://github.com/raspberrypi/firmware/blob/master/boot/LICENCE.broadcom
@@ -1,5 +1,5 @@
{ lib, stdenv, fetchFromGitHub }:
with stdenv.lib;
with lib;
stdenv.mkDerivation {
name = "rtl8192su-unstable-2016-10-05";
@@ -1,5 +1,5 @@
{ lib, stdenv, linuxPackages }:
with stdenv.lib;
with lib;
stdenv.mkDerivation {
name = "rtl8723bs-firmware-${linuxPackages.rtl8723bs.version}";
inherit (linuxPackages.rtl8723bs) src;
@@ -1,6 +1,6 @@
{ lib, stdenv, fetchFromGitHub }:
with stdenv.lib;
with lib;
stdenv.mkDerivation rec {
pname = "sof-firmware";
version = "1.6";
@@ -1,4 +1,4 @@
{ stdenv, fetchzip }:
{ lib, stdenv, fetchzip }:
let
pname = "zd1211-firmware";
@@ -19,6 +19,6 @@ in fetchzip rec {
description = "Firmware for the ZyDAS ZD1211(b) 802.11a/b/g USB WLAN chip";
homepage = "https://sourceforge.net/projects/zd1211/";
license = "GPL";
platforms = stdenv.lib.platforms.linux;
platforms = lib.platforms.linux;
};
}