about summary refs log tree commit diff
path: root/pkgs/tools/misc/grub
diff options
context:
space:
mode:
authorProfpatsch <mail@profpatsch.de>2021-01-11 08:54:33 +0100
committerProfpatsch <mail@profpatsch.de>2021-01-11 10:38:22 +0100
commit4a7f99d55d299453a9c2397f90b33d1120669775 (patch)
tree9fca8e9c9970d0a00ce56dfe11b63ae76b00cf01 /pkgs/tools/misc/grub
parente87aef06e00c42b26789321454d7bd609548cc12 (diff)
treewide: with stdenv.lib; in meta -> with lib;
Part of: https://github.com/NixOS/nixpkgs/issues/108938

meta = with stdenv.lib;

is a widely used pattern. We want to slowly remove
the `stdenv.lib` indirection and encourage people
to use `lib` directly. Thus let’s start with the meta
field.

This used a rewriting script to mostly automatically
replace all occurances of this pattern, and add the
`lib` argument to the package header if it doesn’t
exist yet.

The script in its current form is available at
https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
Diffstat (limited to 'pkgs/tools/misc/grub')
-rw-r--r--pkgs/tools/misc/grub/2.0x.nix4
-rw-r--r--pkgs/tools/misc/grub/default.nix4
-rw-r--r--pkgs/tools/misc/grub/pvgrub_image/default.nix4
-rw-r--r--pkgs/tools/misc/grub/trusted.nix4
4 files changed, 8 insertions, 8 deletions
diff --git a/pkgs/tools/misc/grub/2.0x.nix b/pkgs/tools/misc/grub/2.0x.nix
index 63cdb61dd336b..207396fb08957 100644
--- a/pkgs/tools/misc/grub/2.0x.nix
+++ b/pkgs/tools/misc/grub/2.0x.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchgit, flex, bison, python3, autoconf, automake, gnulib, libtool
+{ lib, stdenv, fetchgit, flex, bison, python3, autoconf, automake, gnulib, libtool
 , gettext, ncurses, libusb-compat-0_1, freetype, qemu, lvm2, unifont, pkgconfig
 , fuse # only needed for grub-mount
 , zfs ? null
@@ -110,7 +110,7 @@ stdenv.mkDerivation rec {
     sed -i $out/lib/grub/*/modinfo.sh -e "/grub_target_cppflags=/ s|'.*'|' '|"
   '';
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "GNU GRUB, the Grand Unified Boot Loader (2.x beta)";
 
     longDescription =
diff --git a/pkgs/tools/misc/grub/default.nix b/pkgs/tools/misc/grub/default.nix
index e657431429cce..a7233d5c4b1f3 100644
--- a/pkgs/tools/misc/grub/default.nix
+++ b/pkgs/tools/misc/grub/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, autoreconfHook, texinfo, buggyBiosCDSupport ? true }:
+{ lib, stdenv, fetchurl, autoreconfHook, texinfo, buggyBiosCDSupport ? true }:
 
 stdenv.mkDerivation {
   name = "grub-0.97-73";
@@ -26,7 +26,7 @@ stdenv.mkDerivation {
 
   passthru.grubTarget = "";
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     homepage = "https://www.gnu.org/software/grub";
     description = "GRand Unified Bootloader";
     license = licenses.gpl2;
diff --git a/pkgs/tools/misc/grub/pvgrub_image/default.nix b/pkgs/tools/misc/grub/pvgrub_image/default.nix
index 6b796dedb0ade..ec5d0ff12955c 100644
--- a/pkgs/tools/misc/grub/pvgrub_image/default.nix
+++ b/pkgs/tools/misc/grub/pvgrub_image/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, grub2_xen }:
+{ lib, stdenv, grub2_xen }:
 
 with stdenv.lib;
 let
@@ -29,7 +29,7 @@ stdenv.mkDerivation rec {
     cp "grub-${efiSystemsBuild.${stdenv.hostPlatform.system}.target}-xen.bin" $out/lib/grub-xen/
   '';
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "PvGrub image for use for booting PV Xen guests";
 
     longDescription =
diff --git a/pkgs/tools/misc/grub/trusted.nix b/pkgs/tools/misc/grub/trusted.nix
index f14758a3ae75e..7a2454cd7b58a 100644
--- a/pkgs/tools/misc/grub/trusted.nix
+++ b/pkgs/tools/misc/grub/trusted.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, fetchgit, autogen, flex, bison, python, autoconf, automake
+{ lib, stdenv, fetchurl, fetchgit, autogen, flex, bison, python, autoconf, automake
 , gettext, ncurses, libusb-compat-0_1, freetype, qemu, lvm2
 , for_HP_laptop ? false
 }:
@@ -91,7 +91,7 @@ stdenv.mkDerivation rec {
   doCheck = false;
   enableParallelBuilding = true;
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "GRUB 2.0 extended with TCG (TPM) support for integrity measured boot process (trusted boot)";
     homepage = "https://github.com/Sirrix-AG/TrustedGRUB2";
     license = licenses.gpl3Plus;