refactor: pull out flake devshells
This commit is contained in:
17
devshell/c.nix
Normal file
17
devshell/c.nix
Normal file
@@ -0,0 +1,17 @@
|
||||
{
|
||||
system,
|
||||
pkgs,
|
||||
self
|
||||
}: pkgs.mkShell {
|
||||
buildInputs = (with pkgs; [
|
||||
inotify-tools
|
||||
gdb
|
||||
gcc
|
||||
]) ++ (with self.packages.${system}; [
|
||||
c-hectic
|
||||
nvim-pager
|
||||
watch
|
||||
]);
|
||||
|
||||
PAGER = "${self.packages.${system}.nvim-pager}/bin/pager";
|
||||
}
|
||||
24
devshell/default.nix
Normal file
24
devshell/default.nix
Normal file
@@ -0,0 +1,24 @@
|
||||
{
|
||||
system,
|
||||
pkgs,
|
||||
self
|
||||
}: pkgs.mkShell {
|
||||
buildInputs =
|
||||
(with self.packages.${system}; [
|
||||
nvim-alias
|
||||
#prettify-log
|
||||
nvim-pager
|
||||
])
|
||||
++ (with pkgs; [
|
||||
git
|
||||
jq
|
||||
yq-go
|
||||
curl
|
||||
(writeScriptBin "hemar-check" ''
|
||||
ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null vm-postgres 'zsh -c check'
|
||||
'')
|
||||
]);
|
||||
|
||||
# environment
|
||||
PAGER = "${self.packages.${system}.nvim-pager}/bin/pager";
|
||||
}
|
||||
8
devshell/haskell.nix
Normal file
8
devshell/haskell.nix
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
system,
|
||||
pkgs,
|
||||
self
|
||||
}: self.devShells.${system}.default
|
||||
// (pkgs.mkShell {
|
||||
buildInputs = [pkgs.stack];
|
||||
})
|
||||
22
devshell/postgres-c.nix
Normal file
22
devshell/postgres-c.nix
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
system,
|
||||
pkgs,
|
||||
self
|
||||
}: pkgs.mkShell {
|
||||
buildInputs = (with pkgs; [
|
||||
inotify-tools
|
||||
postgresql_15
|
||||
]) ++ (with self.packages.${system}; [
|
||||
nvim-pager
|
||||
]) ++ (with pkgs; [
|
||||
gdb
|
||||
gcc
|
||||
]);
|
||||
|
||||
PAGER = "${self.packages.${system}.nvim-pager}/bin/pager";
|
||||
|
||||
shellHook = ''
|
||||
export PATH=${pkgs.gcc}/bin:$PATH
|
||||
export PAGER="${self.packages.${system}.nvim-pager}/bin/pager"
|
||||
'';
|
||||
}
|
||||
14
devshell/pure-c.nix
Normal file
14
devshell/pure-c.nix
Normal file
@@ -0,0 +1,14 @@
|
||||
{
|
||||
system,
|
||||
pkgs,
|
||||
self
|
||||
}: pkgs.mkShell {
|
||||
buildInputs = (with pkgs; [ inotify-tools ]) ++ (with self.packages.${system}; [ nvim-pager ]) ++ (with pkgs; [ gdb gcc binutils ]);
|
||||
PAGER = "${self.packages.${system}.nvim-pager}/bin/pager";
|
||||
|
||||
shellHook = ''
|
||||
export PATH=${pkgs.gcc}/bin:$PATH
|
||||
|
||||
export PAGER="${self.packages.${system}.nvim-pager}/bin/pager"
|
||||
'';
|
||||
}
|
||||
17
devshell/rust.nix
Normal file
17
devshell/rust.nix
Normal file
@@ -0,0 +1,17 @@
|
||||
{
|
||||
self,
|
||||
pkgs,
|
||||
system
|
||||
}: let
|
||||
rustToolchain =
|
||||
if builtins.pathExists ./rust-toolchain.toml
|
||||
then pkgs.pkgsBuildHost.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml
|
||||
else pkgs.pkgsBuildHost.rust-bin.stable."1.81.0".default;
|
||||
in
|
||||
self.devShells.${system}.default
|
||||
// (pkgs.mkShell {
|
||||
nativeBuildInputs = [
|
||||
rustToolchain
|
||||
pkgs.pkg-config
|
||||
];
|
||||
})
|
||||
Reference in New Issue
Block a user