aboutsummaryrefslogtreecommitdiff
path: root/devShells
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2023-01-08 11:25:01 +0100
committerKarel Kočí <cynerd@email.cz>2023-01-08 11:25:01 +0100
commitd5dc7479c489d17e6dcacf081c0f1b5242d99bd9 (patch)
treec12d18231cacb81ff5b69a2073894d228e3c81e7 /devShells
parentc7a226a92d65cedd384fa29083efdbb07a6084b0 (diff)
downloadnixos-personal-d5dc7479c489d17e6dcacf081c0f1b5242d99bd9.tar.gz
nixos-personal-d5dc7479c489d17e6dcacf081c0f1b5242d99bd9.tar.bz2
nixos-personal-d5dc7479c489d17e6dcacf081c0f1b5242d99bd9.zip
Format using Alejandra
Diffstat (limited to 'devShells')
-rw-r--r--devShells/c.nix77
-rw-r--r--devShells/default.nix30
-rw-r--r--devShells/nuttx.nix55
-rw-r--r--devShells/qt.nix53
-rw-r--r--devShells/riscv.nix29
5 files changed, 141 insertions, 103 deletions
diff --git a/devShells/c.nix b/devShells/c.nix
index d015cb4..7aba33f 100644
--- a/devShells/c.nix
+++ b/devShells/c.nix
@@ -1,37 +1,52 @@
-{ system, nixpkgs
-, default
-}:
-let
+{
+ system,
+ nixpkgs,
+ default,
+}: let
pkgs = nixpkgs.legacyPackages.${system};
+in
+ pkgs.mkShell {
+ packages = with pkgs; [
+ clang-tools_14
+ ctags
+ gcc
+ gdb
+ pkg-config
-in pkgs.mkShell {
- packages = (with pkgs; [
+ gnumake
+ bear
+ meson
+ ninja
+ cmake
- clang-tools_14 ctags
- gcc gdb pkg-config
+ valgrind
+ lcov
+ massif-visualizer
+ cppcheck
+ flawfinder
- gnumake bear
- meson ninja
- cmake
+ check
+ curl
+ ncurses
+ flex
+ bison
+ gperf
+ gobject-introspection
+ gtk3
+ gtk4
- valgrind
- lcov massif-visualizer
- cppcheck flawfinder
+ # Various libraries
+ openssl.dev
+ zlib.dev
+ curl.dev
+ libconfig
+ czmq
+ libevent.dev
- check
- curl
- ncurses
- flex bison gperf
- gobject-introspection
- gtk3 gtk4
-
- # 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 = nixpkgs.lib.platforms.linux;
+ }
diff --git a/devShells/default.nix b/devShells/default.nix
index 1e8dee3..88d3638 100644
--- a/devShells/default.nix
+++ b/devShells/default.nix
@@ -1,22 +1,28 @@
-{ nixpkgs, shellrc, system }:
-let
-
+{
+ nixpkgs,
+ shellrc,
+ system,
+}: let
callDevelop = nixpkgs.lib.callPackageWith ({
inherit system;
inherit nixpkgs;
- } // shells);
+ }
+ // shells);
shells = {
default = nixpkgs.legacyPackages.${system}.mkShell {
- inputsFrom = [ shellrc.packages.${system}.default ];
+ inputsFrom = [shellrc.packages.${system}.default];
};
- armv6 = callDevelop ./nuttx.nix { arch = "armv6s-m"; };
- armv7e = callDevelop ./nuttx.nix { arch = "armv7e-m"; fpu = "vfpv3-d16"; };
- espc = callDevelop ./nuttx.nix { arch = "rv32imc"; };
- c = callDevelop ./c.nix { };
- qt = callDevelop ./qt.nix { };
+ armv6 = callDevelop ./nuttx.nix {arch = "armv6s-m";};
+ armv7e = callDevelop ./nuttx.nix {
+ arch = "armv7e-m";
+ fpu = "vfpv3-d16";
+ };
+ espc = callDevelop ./nuttx.nix {arch = "rv32imc";};
+ c = callDevelop ./c.nix {};
+ qt = callDevelop ./qt.nix {};
#riscv = callDevelop ./riscv.nix { };
};
-
-in shells
+in
+ shells
diff --git a/devShells/nuttx.nix b/devShells/nuttx.nix
index 2d3e271..14367c6 100644
--- a/devShells/nuttx.nix
+++ b/devShells/nuttx.nix
@@ -1,31 +1,42 @@
-{ system, nixpkgs
-, default, c
-, arch, fpu ? null
+{
+ system,
+ nixpkgs,
+ default,
+ c,
+ arch,
+ fpu ? null,
}:
with builtins;
-with nixpkgs.lib;
-let
+with nixpkgs.lib; let
pkgs = import nixpkgs.outPath {
localSystem = system;
crossSystem = {
- config = if (hasPrefix "armv" arch) then
- "arm-none-eabi" + (optionalString (fpu != null) "hf")
+ config =
+ if (hasPrefix "armv" arch)
+ then "arm-none-eabi" + (optionalString (fpu != null) "hf")
else "riscv32-none-elf";
libc = "newlib-nano";
- gcc = {
- arch = arch;
- } // (optionalAttrs (fpu != null) { fpu = fpu; });
+ gcc =
+ {
+ arch = arch;
+ }
+ // (optionalAttrs (fpu != null) {fpu = fpu;});
};
};
-
-in pkgs.buildPackages.mkShell {
- packages = with pkgs.buildPackages; [
- kconfig-frontends genromfs xxd
- openocd
- gcc gdb
- ] ++ (optionals (hasPrefix "rv32" arch) [
- esptool
- ]);
- inputsFrom = [ default c ];
- meta.platforms = nixpkgs.lib.platforms.linux;
-}
+in
+ pkgs.buildPackages.mkShell {
+ packages = with pkgs.buildPackages;
+ [
+ kconfig-frontends
+ genromfs
+ xxd
+ openocd
+ gcc
+ gdb
+ ]
+ ++ (optionals (hasPrefix "rv32" arch) [
+ esptool
+ ]);
+ inputsFrom = [default c];
+ meta.platforms = nixpkgs.lib.platforms.linux;
+ }
diff --git a/devShells/qt.nix b/devShells/qt.nix
index caf9b99..b6450eb 100644
--- a/devShells/qt.nix
+++ b/devShells/qt.nix
@@ -1,27 +1,30 @@
-{ system, nixpkgs
-, default, c
-}:
-let
+{
+ system,
+ nixpkgs,
+ default,
+ c,
+}: let
pkgs = nixpkgs.legacyPackages.${system};
+in
+ pkgs.mkShell {
+ packages = with pkgs;
+ with libsForQt5; [
+ qtbase
+ qtserialport
+ qtwebsockets
+ doctest
-in pkgs.mkShell {
- packages = (with pkgs; with libsForQt5; [
- qtbase
- qtserialport
- qtwebsockets
- doctest
-
- (qcoro.overrideAttrs (oldAttrs: {
- version = "0.6.1";
- src = fetchFromGitHub {
- owner = "danvratil";
- repo = "qcoro";
- rev = "261663560f59a162c0c82158a6cde41089668871";
- sha256 = "OAYJpoW3b0boSYBfuzLrFvlYSmP3SON8O6HsDQoi+I8=";
- };
- buildInputs = oldAttrs.buildInputs ++ [qt5.qtbase];
- }))
- ]);
- inputsFrom = with pkgs; [ default c ];
- meta.platforms = ["x86_64-linux"];
-}
+ (qcoro.overrideAttrs (oldAttrs: {
+ version = "0.6.1";
+ src = fetchFromGitHub {
+ owner = "danvratil";
+ repo = "qcoro";
+ rev = "261663560f59a162c0c82158a6cde41089668871";
+ sha256 = "OAYJpoW3b0boSYBfuzLrFvlYSmP3SON8O6HsDQoi+I8=";
+ };
+ buildInputs = oldAttrs.buildInputs ++ [qt5.qtbase];
+ }))
+ ];
+ inputsFrom = with pkgs; [default c];
+ meta.platforms = ["x86_64-linux"];
+ }
diff --git a/devShells/riscv.nix b/devShells/riscv.nix
index 99a0259..b3bbcea 100644
--- a/devShells/riscv.nix
+++ b/devShells/riscv.nix
@@ -1,7 +1,9 @@
-{ system, nixpkgs
-, default, c
-}:
-let
+{
+ system,
+ nixpkgs,
+ default,
+ c,
+}: let
pkgs = import nixpkgs.outPath {
localSystem = system;
crossSystem = {
@@ -12,12 +14,13 @@ let
};
};
};
-
-in pkgs.buildPackages.mkShell {
- packages = with pkgs.buildPackages; [
- qtrvsim
- gcc pkg-config
- ];
- inputsFrom = [ default c ];
- meta.platforms = nixpkgs.lib.platforms.linux;
-}
+in
+ pkgs.buildPackages.mkShell {
+ packages = with pkgs.buildPackages; [
+ qtrvsim
+ gcc
+ pkg-config
+ ];
+ inputsFrom = [default c];
+ meta.platforms = nixpkgs.lib.platforms.linux;
+ }