pyspread: fix build and simplify expression (#117906)
This commit is contained in:
parent
d48e4ede89
commit
e289a280f3
@ -1,30 +1,39 @@
|
|||||||
{ lib
|
{ lib
|
||||||
, buildPythonApplication
|
, python3
|
||||||
, fetchPypi
|
, fetchpatch
|
||||||
, makeDesktopItem
|
, makeDesktopItem
|
||||||
, makePythonPath
|
|
||||||
, dateutil
|
|
||||||
, matplotlib
|
|
||||||
, numpy
|
|
||||||
, pyenchant
|
|
||||||
, pyqt5
|
|
||||||
, pytest
|
|
||||||
, python
|
|
||||||
, qtsvg
|
, qtsvg
|
||||||
, runtimeShell
|
|
||||||
, wrapQtAppsHook
|
, wrapQtAppsHook
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildPythonApplication rec {
|
python3.pkgs.buildPythonApplication rec {
|
||||||
pname = "pyspread";
|
pname = "pyspread";
|
||||||
version = "1.99.5";
|
version = "1.99.5";
|
||||||
|
|
||||||
src = fetchPypi {
|
src = python3.pkgs.fetchPypi {
|
||||||
inherit pname version;
|
inherit pname version;
|
||||||
sha256 = "sha256-05bC+Uvx72FAh3qxkgXm8jdb/gHRv1D/M7tjOEdE3Xg=";
|
sha256 = "sha256-05bC+Uvx72FAh3qxkgXm8jdb/gHRv1D/M7tjOEdE3Xg=";
|
||||||
};
|
};
|
||||||
|
|
||||||
pythonLibs = [
|
patches = [
|
||||||
|
# https://gitlab.com/pyspread/pyspread/-/merge_requests/34
|
||||||
|
(fetchpatch {
|
||||||
|
name = "entry-points.patch";
|
||||||
|
url = "https://gitlab.com/pyspread/pyspread/-/commit/3d8da6a7a7d76f7027d77ca95fac103961d729a2.patch";
|
||||||
|
excludes = [ "bin/pyspread" "bin/pyspread.bat" ];
|
||||||
|
sha256 = "1l614k7agv339hrin23jj7s1mq576vkdfkdim6wp224k7y37bnil";
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
|
nativeBuildInputs = [
|
||||||
|
wrapQtAppsHook
|
||||||
|
];
|
||||||
|
|
||||||
|
buildInputs = [
|
||||||
|
qtsvg
|
||||||
|
];
|
||||||
|
|
||||||
|
propagatedBuildInputs = with python3.pkgs; [
|
||||||
dateutil
|
dateutil
|
||||||
matplotlib
|
matplotlib
|
||||||
numpy
|
numpy
|
||||||
@ -32,13 +41,10 @@ buildPythonApplication rec {
|
|||||||
pyqt5
|
pyqt5
|
||||||
];
|
];
|
||||||
|
|
||||||
nativeBuildInputs = [ wrapQtAppsHook ];
|
|
||||||
buildInputs = pythonLibs ++ [
|
|
||||||
qtsvg
|
|
||||||
];
|
|
||||||
|
|
||||||
doCheck = false; # it fails miserably with a core dump
|
doCheck = false; # it fails miserably with a core dump
|
||||||
|
|
||||||
|
pythonImportsCheck = [ "pyspread" ];
|
||||||
|
|
||||||
desktopItem = makeDesktopItem rec {
|
desktopItem = makeDesktopItem rec {
|
||||||
name = pname;
|
name = pname;
|
||||||
exec = name;
|
exec = name;
|
||||||
@ -50,20 +56,11 @@ buildPythonApplication rec {
|
|||||||
};
|
};
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
runHook preInstall
|
install -m 444 -Dt $out/share/applications ${desktopItem}/share/applications/*
|
||||||
install -D $out/share/applications
|
|
||||||
install -m 644 $desktopItem/share/applications/* $out/share/applications
|
|
||||||
runHook postInstall
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
fixupPhase = ''
|
preFixup = ''
|
||||||
runHook preFixup
|
makeWrapperArgs+=("''${qtWrapperArgs[@]}")
|
||||||
sed -i -e "s|#!/bin/bash|#!${runtimeShell}|" $out/bin/pyspread
|
|
||||||
wrapProgram $out/bin/pyspread \
|
|
||||||
--prefix PYTHONPATH ':' $(toPythonPath $out):${makePythonPath pythonLibs} \
|
|
||||||
--prefix PATH ':' ${python}/bin/ \
|
|
||||||
''${qtWrapperArgs[@]}
|
|
||||||
runHook postFixup
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
|
@ -7606,9 +7606,7 @@ in
|
|||||||
|
|
||||||
pympress = callPackage ../applications/office/pympress { };
|
pympress = callPackage ../applications/office/pympress { };
|
||||||
|
|
||||||
pyspread = python3Packages.callPackage ../applications/office/pyspread {
|
pyspread = libsForQt5.callPackage ../applications/office/pyspread { };
|
||||||
inherit (qt5) qtsvg wrapQtAppsHook;
|
|
||||||
};
|
|
||||||
|
|
||||||
pythonIRClib = pythonPackages.pythonIRClib;
|
pythonIRClib = pythonPackages.pythonIRClib;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user