update: devShells: inputs

This commit is contained in:
L-Nafaryus 2024-04-20 01:34:48 +05:00
parent 001cb9222a
commit 6cf4c1f9d4
Signed by: L-Nafaryus
GPG Key ID: 582F8B0866B294A1
8 changed files with 67 additions and 49 deletions

8
devShells/bonfire.nix Normal file
View File

@ -0,0 +1,8 @@
{ crane-lib, pkgs, ... }:
crane-lib.devShell {
packages = with pkgs; [
# nil
jq
cachix
];
}

View File

@ -1,23 +1,30 @@
# self.devShells.${system}
#
{ self, nixpkgs, crane, ... }:
{ self, nixpkgs, ... }:
let
forAllSystems = nixpkgs.lib.genAttrs [ "x86_64-linux" ];
nixpkgsFor = forAllSystems (system: import nixpkgs { inherit system; });
in forAllSystems(system: let
in forAllSystems(system:
let environment = {
pkgs = nixpkgsFor.${system};
bpkgs = self.packages.${system};
blib = self.lib;
cranelib = crane.lib.${system};
in {
bonfire = self;
bonfire-lib = self.lib;
bonfire-pkgs = self.packages.${system};
crane = self.inputs.crane;
crane-lib = self.inputs.crane.lib.${system};
}; in {
netgen = import ./netgen.nix { inherit pkgs bpkgs; };
default = import ./bonfire.nix environment;
openfoam = import ./openfoam.nix { inherit pkgs bpkgs; };
netgen = import ./netgen.nix environment;
rust = import ./rust.nix { inherit pkgs cranelib; };
rust-x11 = import ./rust-x11.nix { inherit pkgs cranelib; };
openfoam = import ./openfoam.nix environment;
go = import ./go.nix { inherit pkgs; };
rust = import ./rust.nix environment;
rust-x11 = import ./rust-x11.nix environment;
go = import ./go.nix environment;
})

View File

@ -1,4 +1,11 @@
{ pkgs, ... }:
pkgs.mkShell {
buildInputs = with pkgs; [ go gopls gotools go-tools golangci-lint gnumake ];
pkgs.mkShellNoCC {
packages = with pkgs; [
go
gopls
gotools
go-tools
golangci-lint
gnumake
];
}

View File

@ -1,15 +1,9 @@
{ pkgs, bpkgs, ... }:
let
python = pkgs.python3.withPackages(ps: []);
in pkgs.mkShellNoCC {
packages = with pkgs; [
bpkgs.netgen
python
{ pkgs, bonfire-pkgs, ... }:
pkgs.mkShellNoCC {
packages = [
bonfire-pkgs.netgen
pkgs.python3
];
shellHook = ''
export PYTHONPATH="${python}/${python.sitePackages}"
export PYTHONPATH="$PYTHONPATH:${bpkgs.netgen}/${python.sitePackages}"
'';
shellHook = bonfire-pkgs.netgen.passthru.shellHook;
}

View File

@ -1,11 +1,9 @@
{ pkgs, bpkgs, ... }:
{ pkgs, bonfire-pkgs, ... }:
pkgs.mkShellNoCC {
packages = with pkgs; [
bpkgs.openfoam
mpi
packages = [
bonfire-pkgs.openfoam
pkgs.mpi
];
shellHook = ''
. ${bpkgs.openfoam}/OpenFOAM-${bpkgs.openfoam.major}/etc/bashrc
'';
shellHook = bonfire-pkgs.openfoam.passthru.shellHook;
}

View File

@ -1,21 +1,23 @@
{ pkgs, cranelib, ... }:
cranelib.devShell {
{ pkgs, crane-lib, ... }:
crane-lib.devShell rec {
packages = with pkgs; [
libGL
xorg.libXi xorg.libX11 xorg.libXcursor xorg.libXrandr
lld
libxkbcommon
pkg-config
libGL
vulkan-loader
vulkan-headers
vulkan-tools
vulkan-validation-layers
xorg.libXi
xorg.libX11
xorg.libXcursor
xorg.libXrandr
libxkbcommon
libudev-zero
alsa-lib
];
shellHook = ''
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${
with pkgs; lib.makeLibraryPath [
libGL
xorg.libX11 xorg.libXi xorg.libXcursor xorg.libXrandr
libxkbcommon
vulkan-loader
]
}"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${pkgs.lib.makeLibraryPath packages}"
'';
}

View File

@ -1,4 +1,6 @@
{ pkgs, cranelib, ... }:
cranelib.devShell {
packages = [];
{ pkgs, crane-lib, ... }:
crane-lib.devShell {
packages = [
pkgs.cargo-watch
];
}

View File

@ -65,6 +65,6 @@
apps = import ./apps { inherit self nixpkgs; };
devShells = import ./devShells { inherit self nixpkgs crane; };
devShells = import ./devShells { inherit self nixpkgs; };
};
}