nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 setuptools,
6 pytestCheckHook,
7}:
8
9buildPythonPackage rec {
10 pname = "spython";
11 version = "0.3.15";
12 pyproject = true;
13
14 src = fetchFromGitHub {
15 owner = "singularityhub";
16 repo = "singularity-cli";
17 tag = version;
18 hash = "sha256-XYiudDXXiX0izFZZpQb71DBg/wRKjeupvKHixGFVuKM=";
19 };
20
21 postPatch = ''
22 substituteInPlace setup.py \
23 --replace-fail '"pytest-runner"' ""
24 '';
25
26 build-system = [ setuptools ];
27
28 nativeCheckInputs = [ pytestCheckHook ];
29
30 pythonImportsCheck = [ "spython" ];
31
32 disabledTests = [
33 # Assertion errors
34 "test_has_no_instances"
35 "test_check_install"
36 "test_check_get_singularity_version"
37 ];
38
39 disabledTestPaths = [
40 # Tests are looking for something that doesn't exist
41 "spython/tests/test_client.py"
42 ];
43
44 meta = {
45 description = "Streamlined singularity python client (spython) for singularity";
46 homepage = "https://github.com/singularityhub/singularity-cli";
47 changelog = "https://github.com/singularityhub/singularity-cli/blob/${src.tag}/CHANGELOG.md";
48 license = lib.licenses.mpl20;
49 maintainers = with lib.maintainers; [ fab ];
50 mainProgram = "spython";
51 };
52}