-
Notifications
You must be signed in to change notification settings - Fork 5
/
flake.nix
46 lines (38 loc) · 1.21 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
{
description = "Multipath tcp pcap analyzer tool";
inputs = {
# inputs.nixpkgs.follows = "nixpkgs";
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
poetry2nix = {
url = "github:nix-community/poetry2nix";
inputs.nixpkgs.follows = "nixpkgs";
};
flake-utils.url = "github:numtide/flake-utils";
flake-compat = {
url = "github:edolstra/flake-compat";
flake = false;
};
};
outputs = { self, nixpkgs, flake-utils, poetry2nix, ... }: let
in flake-utils.lib.eachDefaultSystem (system: let
pkgs = nixpkgs.legacyPackages.${system};
overrides = pkgs.poetry2nix.overrides.withDefaults (final: prev: {
matplotlib = pkgs.python3Packages.matplotlib;
});
in rec {
packages.mptcpanalyzer = pkgs.poetry2nix.mkPoetryApplication {
projectDir = ./.;
inherit overrides;
};
defaultPackage = self.packages.${system}.mptcpanalyzer;
devShell = defaultPackage.overrideAttrs(oa: {
propagatedBuildInputs = oa.propagatedBuildInputs ++ [
pkgs.nodePackages.pyright
# poetry2nix.packages."${system}".poetry
];
postShellHook = ''
export PYTHONPATH="$PWD:$PYTHONPATH"
'';
});
});
}