Skip to content

Commit 52b9e84

Browse files
committed
s/nixpkgs-lib/lib/
1 parent 32b5d64 commit 52b9e84

File tree

8 files changed

+13
-14
lines changed

8 files changed

+13
-14
lines changed

flake.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@
145145
})
146146
) (import ./checks { inherit self nixpkgs system; });
147147
}) // {
148-
lib = import ./lib { nixpkgs-lib = nixpkgs.lib; };
148+
lib = import ./lib { inherit (nixpkgs) lib; };
149149

150150
overlay = final: prev: {
151151
cloud-hypervisor-graphics = prev.callPackage (spectrum + "/pkgs/cloud-hypervisor") {};

lib/default.nix

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{ nixpkgs-lib }:
1+
{ lib }:
22
rec {
33
hypervisors = [
44
"qemu"
@@ -25,8 +25,8 @@ rec {
2525
fst // {
2626
letter = snd;
2727
}
28-
) (nixpkgs-lib.zipLists volumes (
29-
nixpkgs-lib.drop offset nixpkgs-lib.strings.lowerChars
28+
) (lib.zipLists volumes (
29+
lib.drop offset lib.strings.lowerChars
3030
));
3131

3232
createVolumesScript = pkgs: pkgs.lib.concatMapStringsSep "\n" (
@@ -52,9 +52,9 @@ rec {
5252
else "";
5353
mkfsExtraArgsString =
5454
if mkfsExtraArgs != null
55-
then nixpkgs-lib.escapeShellArgs mkfsExtraArgs
55+
then lib.escapeShellArgs mkfsExtraArgs
5656
else " ";
57-
in (nixpkgs-lib.optionalString autoCreate ''
57+
in (lib.optionalString autoCreate ''
5858
PATH=$PATH:${with pkgs.buildPackages; lib.makeBinPath [ coreutils util-linux e2fsprogs xfsprogs dosfstools btrfs-progs ]}
5959
6060
if [ ! -e '${image}' ]; then
@@ -70,7 +70,6 @@ rec {
7070

7171
makeMacvtap = { microvmConfig, hypervisorConfig }:
7272
import ./macvtap.nix {
73-
inherit microvmConfig hypervisorConfig;
74-
lib = nixpkgs-lib;
73+
inherit microvmConfig hypervisorConfig lib;
7574
};
7675
}

lib/runner.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
let
77
inherit (pkgs) lib;
88

9-
inherit (import ./. { nixpkgs-lib = lib; }) createVolumesScript makeMacvtap;
9+
inherit (import ./. { inherit lib; }) createVolumesScript makeMacvtap;
1010
inherit (makeMacvtap {
1111
inherit microvmConfig hypervisorConfig;
1212
}) openMacvtapFds macvtapFds;

lib/runners/qemu.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ let
4141
inherit (microvmConfig) hostName cpu vcpu mem balloonMem user interfaces shares socket forwardPorts devices vsock graphics storeOnDisk kernel initrdPath storeDisk;
4242
inherit (microvmConfig.qemu) machine extraArgs serialConsole;
4343

44-
inherit (import ../. { nixpkgs-lib = pkgs.lib; }) withDriveLetters;
44+
inherit (import ../. { inherit (pkgs) lib; }) withDriveLetters;
4545

4646
volumes = withDriveLetters microvmConfig;
4747

lib/runners/stratovirt.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ let
1414

1515
tapMultiQueue = vcpu > 1;
1616

17-
inherit (import ../. { nixpkgs-lib = pkgs.lib; }) withDriveLetters;
17+
inherit (import ../. { inherit (pkgs) lib; }) withDriveLetters;
1818
volumes = withDriveLetters microvmConfig;
1919

2020
# PCI required by vfio-pci for PCI passthrough

nixos-modules/microvm/default.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
let
44
microvm-lib = import ../../lib {
5-
nixpkgs-lib = lib;
5+
inherit lib;
66
};
77

88
in

nixos-modules/microvm/mounts.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ let
44
inherit (config.microvm) storeDiskType storeOnDisk writableStoreOverlay;
55

66
inherit (import ../../lib {
7-
nixpkgs-lib = lib;
7+
inherit lib;
88
}) defaultFsType withDriveLetters;
99

1010
hostStore = builtins.head (

nixos-modules/microvm/options.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{ config, options, lib, pkgs, ... }:
22
let
33
self-lib = import ../../lib {
4-
nixpkgs-lib = lib;
4+
inherit lib;
55
};
66

77
hostName = config.networking.hostName or "$HOSTNAME";

0 commit comments

Comments
 (0)