From 2dbccc394a4964a2a3badd192184b6d35dd63336 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Thu, 23 Mar 2023 12:31:51 +0100 Subject: Rework how I pass packages to the NixOS --- devShells/nuttx.nix | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'devShells/nuttx.nix') diff --git a/devShells/nuttx.nix b/devShells/nuttx.nix index 78dd9c0..33f5761 100644 --- a/devShells/nuttx.nix +++ b/devShells/nuttx.nix @@ -1,15 +1,14 @@ { - system, - nixpkgs, + pkgs, default, c, arch, fpu ? null, }: with builtins; -with nixpkgs.lib; let - pkgs = import nixpkgs.outPath { - localSystem = system; +with pkgs.lib; let + pkgsCross = import pkgs.path { + localSystem = pkgs.buildPlatform.system; crossSystem = { config = if (hasPrefix "armv" arch) @@ -24,8 +23,8 @@ with nixpkgs.lib; let }; }; in - pkgs.buildPackages.mkShell { - packages = with pkgs.buildPackages; + pkgsCross.buildPackages.mkShell { + packages = with pkgsCross.buildPackages; [ kconfig-frontends genromfs @@ -38,5 +37,5 @@ in esptool ]); inputsFrom = [default c]; - meta.platforms = nixpkgs.lib.platforms.linux; + meta.platforms = pkgsCross.lib.platforms.linux; } -- cgit v1.2.3