forked from Mic92/nix-update
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdefault.nix
More file actions
29 lines (27 loc) · 777 Bytes
/
default.nix
File metadata and controls
29 lines (27 loc) · 777 Bytes
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
{ pkgs ? import <nixpkgs> { }
}:
pkgs.python311.pkgs.buildPythonApplication {
name = "nix-update";
src = ./.;
buildInputs = [ pkgs.makeWrapper ];
nativeCheckInputs = [
pkgs.python311.pkgs.pytest
pkgs.glibcLocales
pkgs.mypy
# technically not test inputs, but we need it for development in PATH
pkgs.nixVersions.stable or pkgs.nix_2_4
pkgs.nix-prefetch-git
];
checkPhase = ''
echo -e "\x1b[32m## run mypy\x1b[0m"
mypy --no-warn-unused-ignores --strict nix_update tests
'';
makeWrapperArgs = [
"--prefix PATH"
":"
(pkgs.lib.makeBinPath [ pkgs.nixVersions.stable or pkgs.nix_2_4 pkgs.nixpkgs-review pkgs.nix-prefetch-git ])
];
shellHook = ''
# workaround because `python setup.py develop` breaks for me
'';
}