-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
43 lines (34 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
{
description = "ds1000z-tools";
inputs.nixpkgs.url = "nixpkgs/nixos-23.11";
inputs.utils.url = "github:numtide/flake-utils";
outputs = { self, nixpkgs, utils }:
utils.lib.eachSystem utils.lib.defaultSystems (system:
let
pkgs = nixpkgs.legacyPackages."${system}";
python = pkgs.python3;
in
rec {
packages.ds1000z-tools = python.pkgs.buildPythonPackage rec {
name = "ds1000z-tools";
src = ./.;
propagatedBuildInputs = with python.pkgs; [ numpy pyvisa pyvisa-py tqdm ];
nativeBuildInputs = with python.pkgs; [ setuptools ];
pyproject = true;
doCheck = true;
nativeCheckInputs = with python.pkgs; [ pytest pytestCheckHook ];
pytestFlagsArray = [ "ds1000z_tools" "-x" ];
meta.mainProgram = "ds1000z-tools";
};
defaultPackage = packages.ds1000z-tools;
devShells.ds1000z-tools = packages.ds1000z-tools.overridePythonAttrs (attrs: {
nativeBuildInputs = attrs.nativeBuildInputs ++ [
python.pkgs.mypy
python.pkgs.black
pkgs.nixpkgs-fmt
];
});
devShell = devShells.ds1000z-tools;
}
);
}