-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathflake.nix
55 lines (51 loc) · 1.48 KB
/
flake.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
{
description = "twesterhout/annealing-sign-problem: Unveiling ground state sign structures of frustrated quantum systems via non-glassy Ising models";
nixConfig = {
extra-experimental-features = "nix-command flakes";
};
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
nix-filter.url = "github:numtide/nix-filter";
flake-compat = {
url = "github:edolstra/flake-compat";
# don't look for a flake.nix file in this repository
# this tells Nix to retrieve this input as just source code
flake = false;
};
};
outputs = inputs: inputs.flake-utils.lib.eachDefaultSystem (system:
with builtins;
let
inherit (inputs.nixpkgs) lib;
pkgs = import inputs.nixpkgs { inherit system; };
my-python = pkgs.python3.withPackages (ps: with ps; [
cffi
loguru
h5py
numpy
pyyaml
scipy
]);
in
{
devShells.default =
pkgs.mkShell {
packages = [ ];
nativeBuildInputs = with pkgs; [
my-python
# lsp support for Python
python3Packages.black
nodePackages.pyright
# plotting etc.
gnuplot_qt
imagemagick
];
shellHook = ''
export PROMPT_COMMAND=""
export PS1='🐍 Python ${pkgs.python3.version} \w $ '
'';
};
formatter = pkgs.nixpkgs-fmt;
});
}