hopsflow/flake.nix

32 lines
980 B
Nix
Raw Normal View History

2021-12-07 11:27:03 +01:00
{
2021-12-07 11:39:32 +01:00
description = "Calculating open system bath energy changes with HOPS and analytically. ";
2021-12-07 11:27:03 +01:00
2021-12-07 11:39:32 +01:00
inputs = {
nixpkgs.url = "nixpkgs/nixos-unstable";
mach-nix.url = "github:DavHau/mach-nix";
};
2021-12-07 11:27:03 +01:00
2021-12-07 11:39:32 +01:00
outputs = { self, nixpkgs, flake-utils, mach-nix }:
flake-utils.lib.eachDefaultSystem (system:
let
python = "python39";
pkgs = nixpkgs.legacyPackages.${system};
2021-12-07 11:27:03 +01:00
2021-12-07 11:39:32 +01:00
mach-nix-wrapper = import mach-nix { inherit pkgs python; };
requirements = builtins.readFile ./requirements.txt;
pythonBuild = mach-nix-wrapper.mkPython { inherit requirements; };
in {
devShell = pkgs.mkShell {
buildInputs = [
# dev packages
(pkgs.${python}.withPackages
(ps: with ps; [ black mypy sphinx-autodoc-typehints sphinx pydata-sphinx-theme ])) # <--- change here
pkgs.nodePackages.pyright
2021-12-07 11:27:03 +01:00
2021-12-07 11:39:32 +01:00
# app packages
pythonBuild
];
};
});
2021-12-07 11:27:03 +01:00
}