nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 50 lines 1.3 kB view raw
1{ 2 buildPythonPackage, 3 fetchFromGitHub, 4 lib, 5 ply, 6 setuptools, 7 poetry-core, 8 withOpenSCAD ? false, 9 openscad, 10}: 11buildPythonPackage rec { 12 pname = "solidpython2"; 13 version = "2.1.3"; 14 pyproject = true; 15 src = fetchFromGitHub { 16 owner = "jeff-dh"; 17 repo = "SolidPython"; 18 tag = "v${version}"; 19 hash = "sha256-3A1vYqIHFUiOH2cEx/XSOien3PmNpMAhLOe3T1yubx4="; 20 }; 21 22 # NOTE: this patch makes tests runnable outside the source-tree 23 # - it uses diff instead of git-diff 24 # - modifies the tests output to resemble the paths resulting from running inside the source-tree 25 # - drop the openscad image geneneration tests, these don't work on the nix sandbox due to the need for xserver 26 patches = [ ./difftool_tests.patch ]; 27 28 propagatedBuildInputs = lib.optionals withOpenSCAD [ openscad ]; 29 30 build-system = [ 31 poetry-core 32 ]; 33 dependencies = [ 34 ply 35 setuptools 36 ]; 37 pythonImportsCheck = [ "solid2" ]; 38 checkPhase = '' 39 runHook preCheck 40 python $TMPDIR/source/tests/run_tests.py 41 runHook postCheck 42 ''; 43 44 meta = { 45 homepage = "https://github.com/jeff-dh/SolidPython"; 46 description = "Python frontend for solid modelling that compiles to OpenSCAD"; 47 license = lib.licenses.lgpl2Plus; 48 maintainers = with lib.maintainers; [ jonboh ]; 49 }; 50}