update project build tooling

This commit is contained in:
Istvan Ruzman
2022-02-21 14:54:08 +01:00
parent 804063a507
commit 1b3cfe8f1c
7 changed files with 92 additions and 1014 deletions

View File

@@ -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/
'';
};
});
}