From e24af8437a690ef09c3145ea9f835197a60dd1ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Thu, 21 Jul 2022 10:35:49 +0200 Subject: nixShells: provide default shell with my default configuration --- devShells/c.nix | 7 ++++--- devShells/default.nix | 13 +++++++++++-- devShells/nuttx.nix | 4 ++-- devShells/riscv.nix | 4 ++-- 4 files changed, 19 insertions(+), 9 deletions(-) (limited to 'devShells') diff --git a/devShells/c.nix b/devShells/c.nix index 949b291..c1b5553 100644 --- a/devShells/c.nix +++ b/devShells/c.nix @@ -1,19 +1,20 @@ -{ nixpkgs, shellrc, system }: +{ system, nixpkgs, default }: let pkgs = nixpkgs.legacyPackages.${system}; in pkgs.mkShell { packages = (with pkgs; [ clang-tools - gcc gdb + gcc gdb pkg-config cppcheck flawfinder bear meson lcov massif-visualizer ]); inputsFrom = with pkgs; [ check + curl - shellrc.packages.${system}.default + default ]; meta.platforms = nixpkgs.lib.platforms.linux; } diff --git a/devShells/default.nix b/devShells/default.nix index 6c91b20..be2d89f 100644 --- a/devShells/default.nix +++ b/devShells/default.nix @@ -1,14 +1,23 @@ { nixpkgs, shellrc, system }: let + default = let + pkgs = nixpkgs.legacyPackages.${system}; + in pkgs.mkShell { + inputsFrom = with pkgs; [ + shellrc.packages.${system}.default + ]; + }; + callDevelop = file: import file { - inherit nixpkgs; - inherit shellrc; inherit system; + inherit nixpkgs; + inherit default; }; in { + default = default; armv6 = callDevelop ./nuttx.nix { arch = "armv6s-m"; }; armv7e = callDevelop ./nuttx.nix { arch = "armv7e-m"; fpu = "vfpv3-d16"; }; c = callDevelop ./c.nix; diff --git a/devShells/nuttx.nix b/devShells/nuttx.nix index d3303c1..7fa690c 100644 --- a/devShells/nuttx.nix +++ b/devShells/nuttx.nix @@ -1,4 +1,4 @@ -{ nixpkgs, shellrc, system }: +{ system, nixpkgs, default }: { arch, fpu ? null }: with nixpkgs.lib; let @@ -22,6 +22,6 @@ in pkgs.mkShell { ]) ++ (with pkgs-riscv.buildPackages; [ gcc gdb ]); - inputsFrom = [ shellrc.packages.${system}.default ]; + inputsFrom = [ default ]; meta.platforms = nixpkgs.lib.platforms.linux; } diff --git a/devShells/riscv.nix b/devShells/riscv.nix index ded7859..bd19eef 100644 --- a/devShells/riscv.nix +++ b/devShells/riscv.nix @@ -1,4 +1,4 @@ -{ nixpkgs, shellrc, system }: +{ system, nixpkgs, default }: let pkgs = nixpkgs.legacyPackages.${system}; pkgs-riscv = import nixpkgs.outPath { @@ -18,6 +18,6 @@ in pkgs.mkShell { ]) ++ (with pkgs-riscv.buildPackages; [ gcc pkg-config ]); - inputsFrom = [ shellrc.packages.${system}.default ]; + inputsFrom = [ default ]; meta.platforms = nixpkgs.lib.platforms.linux; } -- cgit v1.2.3