File: python-tox.nix

package info (click to toggle)
confget 5.1.2-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 740 kB
  • sloc: python: 1,017; ansic: 893; sh: 770; makefile: 142
file content (26 lines) | stat: -rw-r--r-- 570 bytes parent folder | download | duplicates (2)
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
# SPDX-FileCopyrightText: Peter Pentchev <roam@ringlet.net>
# SPDX-License-Identifier: BSD-2-Clause

{ pkgs ? import <nixpkgs> { }
, py-ver ? 311
}:
let
  python-name = "python${toString py-ver}";
  python = builtins.getAttr python-name pkgs;
  # tomli is needed until https://github.com/NixOS/nixpkgs/pull/194020 goes in
  python-with-tox = python.withPackages (p: with p; [ tomli tox ]);
in
pkgs.mkShell {
  buildInputs = [
    pkgs.groff
    pkgs.perl
    python-with-tox
  ];

  shellHook = ''
    set -e
    cd python
    sh tox-devel.sh -- -p all
    exit
  '';
}