File: python-tox.nix

package info (click to toggle)
feature-check 2.2.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 588 kB
  • sloc: perl: 1,061; python: 1,042; sh: 133; makefile: 111
file content (21 lines) | stat: -rw-r--r-- 538 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# SPDX-FileCopyrightText: Peter Pentchev <roam@ringlet.net>
# SPDX-License-Identifier: BSD-2-Clause

{ pkgs ? import <nixpkgs> {}, py-ver ? "12" }:
let
  python-name = "python3${py-ver}";
  python = builtins.getAttr python-name pkgs;
  python-pkgs = python.withPackages (p: with p; [ tox ]);
in pkgs.mkShell {
  buildInputs = [
    pkgs.gitMinimal
    python-pkgs
  ];
  shellHook = ''
    set -e
    cd python
    TOX_SKIP_ENV=unit-tests python3.${py-ver} -m tox -p all
    python3.${py-ver} -m tox -p all -e unit-tests
    exit
  '';
}