update project build tooling
This commit is contained in:
51
flake.nix
51
flake.nix
@@ -1,29 +1,36 @@
|
||||
{
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, flake-utils, ... }:
|
||||
flake-utils.lib.eachDefaultSystem(system:
|
||||
let
|
||||
pkgs = import nixpkgs { inherit system; };
|
||||
in rec {
|
||||
devShell = pkgs.mkShell {
|
||||
buildInputs = with pkgs; [
|
||||
poetry
|
||||
(python3.withPackages (ps:
|
||||
with ps; [
|
||||
black
|
||||
isort
|
||||
pylint
|
||||
bandit
|
||||
]))
|
||||
bashInteractive
|
||||
];
|
||||
# shellHook = ''
|
||||
# PYTHONPATH=$PYTHONPATH:$(pwd)
|
||||
# '';
|
||||
};
|
||||
});
|
||||
flake-utils.lib.eachDefaultSystem (system:
|
||||
let
|
||||
pkgs = import nixpkgs { inherit system; };
|
||||
in
|
||||
rec {
|
||||
packages = {
|
||||
pyrad3 = with pkgs; with pkgs.python3Packages; callPackage ./default.nix { };
|
||||
};
|
||||
devShell = pkgs.mkShell
|
||||
{
|
||||
buildInputs = with pkgs;
|
||||
[
|
||||
(python3.withPackages (ps: with ps; [
|
||||
bandit
|
||||
black
|
||||
flake8
|
||||
flit
|
||||
isort
|
||||
pylint
|
||||
pytest
|
||||
]))
|
||||
bashInteractive
|
||||
];
|
||||
|
||||
shellHook = ''
|
||||
export PYTHONPATH=''${PYTHONPATH:+''${PYTHONPATH}:}''$(pwd)/src/
|
||||
'';
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user