File: python-functional.nix

package info (click to toggle)
remrun 0.2.4-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 444 kB
  • sloc: python: 775; sh: 629; makefile: 55
file content (23 lines) | stat: -rw-r--r-- 572 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
22
23
# SPDX-FileCopyrightText: Peter Pentchev <roam@ringlet.net>
# SPDX-License-Identifier: BSD-2-Clause

{ pkgs ? import <nixpkgs> { }
, py-ver ? "11"
}:
let
  python-name = "python3${py-ver}";
  python = builtins.getAttr python-name pkgs;
in
pkgs.mkShell {
  buildInputs = [
    pkgs.locale
    pkgs.openssh
    python
  ];
  shellHook = ''
    set -e
    PYTHONPATH="$(pwd)/python" python3.${py-ver} -B -u -m run_sshd_test -v -- ../remrun.sh
    PYTHONPATH="$(pwd)/python" python3.${py-ver} -B -u -m run_sshd_test -v -t "$(pwd)/run-test.sh" -- ../remrun.sh
    exit
  '';
}