-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
53 lines (43 loc) · 1.23 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
{
inputs = {
# I typically use the exact nixpkgs set that I use for building my current
# system to avoid redundancy.
nixpkgs.url = "github:dpaetzel/nixpkgs/dpaetzel/nixos-config";
};
outputs = { self, nixpkgs }:
let
system = "x86_64-linux";
pkgs = import nixpkgs { inherit system; };
python = pkgs.python310;
in rec {
defaultPackage.${system} = python.pkgs.buildPythonPackage rec {
pname = "ematools";
version = "v0.1";
src = self;
format = "pyproject";
propagatedBuildInputs = with python.pkgs; [
click
matplotlib
networkx
pydot
pygraphviz
requests
toolz
tqdm
];
meta = with pkgs.lib; {
description = "Python scripts that interface with emanote";
license = licenses.gpl3;
};
};
devShell.${system} = pkgs.mkShell {
# TODO Install graph.py script properly
shellHook = ''
export LD_LIBRARY_PATH=${pkgs.xorg.libXxf86vm.out}:$LD_LIBRARY_PATH
'';
buildInputs = with python.pkgs;
[ ipython python ]
++ defaultPackage.${system}.propagatedBuildInputs;
};
};
}