aboutsummaryrefslogtreecommitdiff
path: root/devShells
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2022-07-21 10:35:49 +0200
committerKarel Kočí <cynerd@email.cz>2022-07-21 10:35:49 +0200
commite24af8437a690ef09c3145ea9f835197a60dd1ee (patch)
tree363051a7cffd5672ad8fe48e722259ebdeee33a6 /devShells
parentdd4951d40bf5c7da87b003b2bf1ab05576397bb3 (diff)
downloadnixos-personal-e24af8437a690ef09c3145ea9f835197a60dd1ee.tar.gz
nixos-personal-e24af8437a690ef09c3145ea9f835197a60dd1ee.tar.bz2
nixos-personal-e24af8437a690ef09c3145ea9f835197a60dd1ee.zip
nixShells: provide default shell with my default configuration
Diffstat (limited to 'devShells')
-rw-r--r--devShells/c.nix7
-rw-r--r--devShells/default.nix13
-rw-r--r--devShells/nuttx.nix4
-rw-r--r--devShells/riscv.nix4
4 files changed, 19 insertions, 9 deletions
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;
}