nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 setuptools,
6 wheel,
7}:
8
9buildPythonPackage rec {
10 pname = "dllogger";
11 version = "1.1.0";
12 pyproject = true;
13
14 src = fetchFromGitHub {
15 owner = "NVIDIA";
16 repo = "dllogger";
17 tag = "v${version}";
18 hash = "sha256-kT6FhAl4JZlFPdzKYopAJBurYVMaU5umn/qZADfPjkE=";
19 };
20
21 nativeBuildInputs = [
22 setuptools
23 wheel
24 ];
25
26 # use examples as smoke tests since upstream has no tests
27 checkPhase = ''
28 runHook preCheck
29
30 python examples/dllogger_example.py
31 python examples/dllogger_singleton_example.py
32
33 runHook postCheck
34 '';
35
36 pythonImportsCheck = [ "dllogger" ];
37
38 meta = {
39 description = "Logging tool for deep learning";
40 homepage = "https://github.com/NVIDIA/dllogger";
41 changelog = "https://github.com/NVIDIA/dllogger/releases/tag/${src.tag}";
42 license = lib.licenses.asl20;
43 maintainers = with lib.maintainers; [ natsukium ];
44 };
45}