From 50ce82cc84b7fd4394c1387f3155bc7c100d7bdf Mon Sep 17 00:00:00 2001 From: mexisme Date: Mon, 28 Nov 2022 22:26:47 +1300 Subject: [PATCH] Fix for unexpected recursion error Might be related to how these packages access "pkgs" ? --- microsoft/surface/kernel/default.nix | 14 +++++--------- microsoft/surface/repos.nix | 2 +- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/microsoft/surface/kernel/default.nix b/microsoft/surface/kernel/default.nix index b266919..1920dfe 100644 --- a/microsoft/surface/kernel/default.nix +++ b/microsoft/surface/kernel/default.nix @@ -1,16 +1,12 @@ -{ lib, - buildLinux, - callPackage, - linuxPackagesFor, - ... -}: +{ config, lib, pkgs, ... }: # To test the kernel build: # nix-build -E "with import {}; (pkgs.callPackage ./. {}).boot.kernelPackages.kernel" let inherit (lib) kernel recurseIntoAttrs; - repos = callPackage ../repos.nix {}; + inherit (pkgs) buildLinux linuxPackagesFor; + repos = pkgs.callPackage ../repos.nix {}; linuxPackage = { version, @@ -25,11 +21,11 @@ let modDirVersion = version; extraMeta.branch = branch; }; - linuxPackagesFor' = (linuxPackagesFor buildLinux'); + linuxPackagesFor' = linuxPackagesFor buildLinux'; in recurseIntoAttrs linuxPackagesFor'; linux-5_16_11 = linuxPackage ( - callPackage ./linux-5.16.11.nix { inherit repos; } + pkgs.callPackage ./linux-5.16.11.nix { inherit repos; } ); in { diff --git a/microsoft/surface/repos.nix b/microsoft/surface/repos.nix index 3ee09a9..42e31de 100644 --- a/microsoft/surface/repos.nix +++ b/microsoft/surface/repos.nix @@ -1,4 +1,4 @@ -{ lib, pkgs, fetchFromGitHub, fetchurl }: { +{ fetchFromGitHub, fetchurl }: { # This is the owner and repo for the pre-patched kernel from the "linux-surface" project: linux-surface-kernel = { rev, sha256 }: fetchFromGitHub {