flatcam: 8.5 -> unstable-2022-02-02

qt4 -> qt5

ajs124 85d2adb0 de1d98ca

+75 -81
+74 -67
pkgs/applications/science/electronics/flatcam/default.nix
··· 1 1 { lib 2 - , stdenv 3 - , python3 4 - , fetchPypi 5 2 , fetchFromBitbucket 6 - , fetchpatch 7 - , substituteAll 8 - , geos 3 + , buildPythonApplication 4 + , pyqt5 5 + , matplotlib 6 + , numpy 7 + , cycler 8 + , python-dateutil 9 + , kiwisolver 10 + , six 11 + , setuptools 12 + , dill 13 + , Rtree 14 + , pyopengl 15 + , vispy 16 + , ortools 17 + , svg-path 18 + , simplejson 19 + , shapely 20 + , freetype-py 21 + , fonttools 22 + , rasterio 23 + , lxml 24 + , ezdxf 25 + , qrcode 26 + , reportlab 27 + , svglib 28 + , gdal 29 + , pyserial 30 + , python3 9 31 }: 10 32 11 - let 12 - python = python3.override { 13 - packageOverrides = self: super: { 14 - shapely = super.shapely.overridePythonAttrs (old: rec { 15 - version = "1.8.4"; 16 - 17 - src = fetchPypi { 18 - pname = "Shapely"; 19 - inherit version; 20 - hash = "sha256-oZXlHKr6IYKR8suqP+9p/TNTyT7EtlsqRyLEz0DDGYw="; 21 - }; 22 - 23 - # Environment variable used in shapely/_buildcfg.py 24 - GEOS_LIBRARY_PATH = "${geos}/lib/libgeos_c${stdenv.hostPlatform.extensions.sharedLibrary}"; 25 - 26 - patches = [ 27 - # Patch to search form GOES .so/.dylib files in a Nix-aware way 28 - (substituteAll { 29 - src = ./shapely-library-paths.patch; 30 - libgeos_c = GEOS_LIBRARY_PATH; 31 - libc = lib.optionalString (!stdenv.isDarwin) "${stdenv.cc.libc}/lib/libc${stdenv.hostPlatform.extensions.sharedLibrary}.6"; 32 - }) 33 - ]; 34 - 35 - postPatch = '' 36 - substituteInPlace pyproject.toml \ 37 - --replace 'setuptools<64' 'setuptools' 38 - ''; 39 - }); 40 - }; 41 - }; 42 - in 43 - python.pkgs.buildPythonApplication rec { 33 + buildPythonApplication rec { 44 34 pname = "flatcam"; 45 - version = "8.5"; 35 + version = "unstable-2022-02-02"; 46 36 47 37 src = fetchFromBitbucket { 48 38 owner = "jpcgt"; 49 39 repo = pname; 50 - rev = "533afd6a1772857cb633c011b5e0a15b60b1e92e"; # 8.5 with Red Hat packaging. 51 - sha256 = "199kiiml18k34z1zhk2hbhibphmnv0kb11kxiajq52alps0mjb3m"; 40 + rev = "ebf5cb9e3094362c4b0774a54cf119559c02211d"; # beta branch as of 2022-02-02 41 + hash = "sha256-QKkBPEM+HVYmSZ83b4JRmOmCMp7C3EUqbJKPqUXMiKE="; 52 42 }; 53 43 54 - propagatedBuildInputs = with python.pkgs; [ 44 + format = "other"; 45 + 46 + dontBuild = true; 47 + 48 + propagatedBuildInputs = [ 49 + pyqt5 55 50 matplotlib 56 51 numpy 57 - packaging 58 - pyqt4 59 - rtree 60 - scipy 52 + cycler 53 + python-dateutil 54 + kiwisolver 55 + six 61 56 setuptools 57 + dill 58 + Rtree 59 + pyopengl 60 + vispy 61 + ortools 62 + svg-path 63 + simplejson 62 64 shapely 63 - simplejson 64 - six 65 - svg-path 65 + freetype-py 66 + fonttools 67 + rasterio 68 + lxml 69 + ezdxf 70 + qrcode 71 + reportlab 72 + svglib 73 + gdal 74 + pyserial 66 75 ]; 67 76 68 - packaging_fix_pull_request_patch = fetchpatch { 69 - name = "packaging_fix_pull_request.patch"; 70 - url = "https://bitbucket.org/trepetti/flatcam/commits/5591ed889d1f48a5190fe237b562cb932cb5876c/raw"; 71 - sha256 = "19rhjdrf1n1q29cgpcry6pl2kl90zq0d613hhkwdir9bhq5bkknp"; 72 - }; 77 + preInstall = '' 78 + patchShebangs . 73 79 74 - patches = [ 75 - packaging_fix_pull_request_patch 76 - ./release.patch 77 - ]; 80 + sed -i "s|/usr/local/bin|$out/bin|" Makefile 78 81 79 - postPatch = '' 80 - substituteInPlace setup.py --replace "'shapely>=1.3'" "'shapely>=1.3'," 82 + mkdir -p $out/share/{flatcam,applications} 83 + mkdir -p $out/bin 81 84 ''; 82 85 83 - # Only non-GUI tests can be run deterministically in the Nix build environment. 84 - checkPhase = '' 85 - python -m unittest tests.test_excellon 86 - python -m unittest tests.test_gerber_buffer 87 - python -m unittest tests.test_paint 88 - python -m unittest tests.test_pathconnect 86 + installFlags = [ 87 + "USER_ID=0" 88 + "LOCAL_PATH=/build/source/." 89 + "INSTALL_PATH=${placeholder "out"}/share/flatcam" 90 + "APPS_PATH=${placeholder "out"}/share/applications" 91 + ]; 92 + 93 + postInstall = '' 94 + sed -i "s|python3|${python3.withPackages (_: propagatedBuildInputs)}/bin/python3|" $out/bin/flatcam-beta 95 + mv $out/bin/flatcam{-beta,} 89 96 ''; 90 97 91 98 meta = with lib; {
-13
pkgs/applications/science/electronics/flatcam/release.patch
··· 1 - diff --git a/FlatCAMVersion.py b/FlatCAMVersion.py 2 - index ba9e04a5..2c64d5a6 100644 3 - --- a/FlatCAMVersion.py 4 - +++ b/FlatCAMVersion.py 5 - @@ -16,7 +16,7 @@ version = { 6 - "number": 8.5, 7 - "date": (2016, 7, 1), # Year, Month, Day 8 - "name": None, 9 - - "release": False, 10 - + "release": True, 11 - } 12 - 13 -
+1 -1
pkgs/top-level/all-packages.nix
··· 39961 39961 39962 39962 diylc = callPackage ../applications/science/electronics/diylc { }; 39963 39963 39964 - flatcam = callPackage ../applications/science/electronics/flatcam { }; 39964 + flatcam = python3.pkgs.callPackage ../applications/science/electronics/flatcam { }; 39965 39965 39966 39966 flopoco = callPackage ../applications/science/electronics/flopoco { }; 39967 39967