aboutsummaryrefslogtreecommitdiff
path: root/devShells
diff options
context:
space:
mode:
Diffstat (limited to 'devShells')
-rw-r--r--devShells/apo.nix10
-rw-r--r--devShells/c.nix87
-rw-r--r--devShells/default.nix16
-rw-r--r--devShells/nuttx.nix15
-rw-r--r--devShells/python.nix109
-rw-r--r--devShells/qt.nix35
6 files changed, 126 insertions, 146 deletions
diff --git a/devShells/apo.nix b/devShells/apo.nix
index c1049a8..a840670 100644
--- a/devShells/apo.nix
+++ b/devShells/apo.nix
@@ -1,12 +1,10 @@
{
- system,
- nixpkgs,
+ pkgs,
default,
c,
}: let
- pkgs = nixpkgs.legacyPackages.${system};
- riscvPkgs = import nixpkgs.outPath {
- localSystem = system;
+ riscvPkgs = import pkgs.path {
+ localSystem = pkgs.buildPlatform.system;
crossSystem = {
config = "riscv32-none-elf";
libc = "newlib-nano";
@@ -23,5 +21,5 @@ in
riscvPkgs.buildPackages.gcc
];
inputsFrom = [default c];
- meta.platforms = nixpkgs.lib.platforms.linux;
+ meta.platforms = pkgs.lib.platforms.linux;
}
diff --git a/devShells/c.nix b/devShells/c.nix
index 7aba33f..e20fcc8 100644
--- a/devShells/c.nix
+++ b/devShells/c.nix
@@ -1,52 +1,49 @@
{
- system,
- nixpkgs,
+ pkgs,
default,
-}: let
- pkgs = nixpkgs.legacyPackages.${system};
-in
- pkgs.mkShell {
- packages = with pkgs; [
- clang-tools_14
- ctags
- gcc
- gdb
- pkg-config
+}:
+pkgs.mkShell {
+ packages = with pkgs; [
+ clang-tools_14
+ ctags
+ gcc
+ gdb
+ pkg-config
- gnumake
- bear
- meson
- ninja
- cmake
+ gnumake
+ bear
+ meson
+ ninja
+ cmake
- valgrind
- lcov
- massif-visualizer
- cppcheck
- flawfinder
+ valgrind
+ lcov
+ massif-visualizer
+ cppcheck
+ flawfinder
- check
- curl
- ncurses
- flex
- bison
- gperf
- gobject-introspection
- gtk3
- gtk4
+ check
+ curl
+ ncurses
+ flex
+ bison
+ gperf
+ gobject-introspection
+ gtk3
+ gtk4
- # Various libraries
- openssl.dev
- zlib.dev
- curl.dev
- libconfig
- czmq
- libevent.dev
+ # Various libraries
+ openssl.dev
+ zlib.dev
+ curl.dev
+ libconfig
+ czmq
+ libevent.dev
- # LVGL
- SDL2
- libffi.dev
- ];
- inputsFrom = with pkgs; [default];
- meta.platforms = nixpkgs.lib.platforms.linux;
- }
+ # LVGL
+ SDL2
+ libffi.dev
+ ];
+ inputsFrom = with pkgs; [default];
+ meta.platforms = pkgs.lib.platforms.linux;
+}
diff --git a/devShells/default.nix b/devShells/default.nix
index b0a1728..998a39b 100644
--- a/devShells/default.nix
+++ b/devShells/default.nix
@@ -1,17 +1,9 @@
-{
- nixpkgs,
- shellrc,
- system,
-}: let
- callDevelop = nixpkgs.lib.callPackageWith ({
- inherit system;
- inherit nixpkgs;
- }
- // shells);
+pkgs: let
+ callDevelop = pkgs.lib.callPackageWith (shells // {inherit pkgs;});
shells = {
- default = nixpkgs.legacyPackages.${system}.mkShell {
- inputsFrom = [shellrc.packages.${system}.default];
+ default = pkgs.mkShell {
+ packages = [];
};
armv6 = callDevelop ./nuttx.nix {arch = "armv6s-m";};
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;
}
diff --git a/devShells/python.nix b/devShells/python.nix
index 570840d..d0a40b5 100644
--- a/devShells/python.nix
+++ b/devShells/python.nix
@@ -1,58 +1,55 @@
{
- system,
- nixpkgs,
+ pkgs,
default,
-}: let
- pkgs = nixpkgs.legacyPackages.${system};
-in
- pkgs.mkShell {
- packages = with pkgs; [
- (python3.withPackages (pypkgs:
- with pypkgs; [
- ipython
-
- pytest
- pytest-html
- pytest-tap
- coverage
- python-lsp-black
- pylint
- pydocstyle
- mypy
-
- pygraphviz
- matplotlib
-
- python-gitlab
- PyGithub
-
- schema
- jinja2
- ruamel-yaml
- msgpack
- urllib3
-
- influxdb-client
- psycopg
- paho-mqtt
-
- humanize
- rich
-
- pygobject3
-
- pyserial
- pylibftdi
- pylxd
- selenium
- ]))
- geckodriver
- chromedriver
-
- gobject-introspection
- gtk3
- gtk4
- ];
- inputsFrom = with pkgs; [default];
- meta.platforms = nixpkgs.lib.platforms.linux;
- }
+}:
+pkgs.mkShell {
+ packages = with pkgs; [
+ (python3.withPackages (pypkgs:
+ with pypkgs; [
+ ipython
+
+ pytest
+ pytest-html
+ pytest-tap
+ coverage
+ python-lsp-black
+ pylint
+ pydocstyle
+ mypy
+
+ pygraphviz
+ matplotlib
+
+ python-gitlab
+ PyGithub
+
+ schema
+ jinja2
+ ruamel-yaml
+ msgpack
+ urllib3
+
+ influxdb-client
+ psycopg
+ paho-mqtt
+
+ humanize
+ rich
+
+ pygobject3
+
+ pyserial
+ pylibftdi
+ pylxd
+ selenium
+ ]))
+ geckodriver
+ chromedriver
+
+ gobject-introspection
+ gtk3
+ gtk4
+ ];
+ inputsFrom = with pkgs; [default];
+ meta.platforms = pkgs.lib.platforms.linux;
+}
diff --git a/devShells/qt.nix b/devShells/qt.nix
index eb9d3e9..2070009 100644
--- a/devShells/qt.nix
+++ b/devShells/qt.nix
@@ -1,22 +1,19 @@
{
- system,
- nixpkgs,
+ pkgs,
default,
c,
-}: let
- pkgs = nixpkgs.legacyPackages.${system};
-in
- pkgs.mkShell {
- packages = with pkgs;
- with libsForQt5; [
- qtbase
- qttranslations
- qtserialport
- qtwebsockets
- doctest
- qtcharts
- qtwayland
- ];
- inputsFrom = with pkgs; [default c];
- meta.platforms = ["x86_64-linux"];
- }
+}:
+pkgs.mkShell {
+ packages = with pkgs;
+ with libsForQt5; [
+ qtbase
+ qttranslations
+ qtserialport
+ qtwebsockets
+ doctest
+ qtcharts
+ qtwayland
+ ];
+ inputsFrom = with pkgs; [default c];
+ meta.platforms = pkgs.lib.platforms.linux;
+}