default.nix (1417B)
1 { 2 lib, 3 fetchFromGitHub, 4 python3Packages, 5 qt5, 6 }: 7 8 python3Packages.buildPythonApplication { 9 pname = "map-stylizer"; 10 version = "0-unstable-2020-06-30"; 11 format = "other"; 12 13 src = fetchFromGitHub { 14 owner = "Absolute-Tinkerer"; 15 repo = "map-stylizer"; 16 rev = "6279f40408aff823a4eb1071334bd2acd10cb921"; 17 hash = "sha256-vUMHdUn5IZkB21Wg83lRZ/HwSnmgzem4ZBjELcizNE0="; 18 }; 19 20 patches = [ ./config.patch ]; 21 22 dontUseSetuptoolsBuild = true; 23 dontUseSetuptoolsCheck = true; 24 25 installPhase = '' 26 site_packages=$out/lib/${python3Packages.python.libPrefix}/site-packages 27 mkdir -p $site_packages 28 cp -r src main.py $site_packages 29 30 substituteInPlace $site_packages/main.py \ 31 --replace-fail "'src'" "'$site_packages/src'" 32 33 substituteInPlace $site_packages/src/core/constants.py \ 34 --replace-fail "src/resources" "$site_packages/src/resources" 35 36 makeWrapper ${ 37 (python3Packages.python.withPackages (ps: [ ps.pyqt5 ])).interpreter 38 } $out/bin/map-stylizer \ 39 --set QT_QPA_PLATFORM_PLUGIN_PATH ${qt5.qtbase.bin}/lib/qt-*/plugins/platforms \ 40 --add-flags "$site_packages/main.py" 41 ''; 42 43 meta = { 44 description = "GUI written in Python to parse OSM (OpenStreetMap) files and render them onscreen"; 45 homepage = "https://github.com/Absolute-Tinkerer/map-stylizer"; 46 license = lib.licenses.gpl3; 47 maintainers = [ lib.maintainers.sikmir ]; 48 }; 49 }