sigil: wrap qt app properly and move to by-name (#396355)
This commit is contained in:
@@ -19391,6 +19391,18 @@
|
||||
}
|
||||
];
|
||||
};
|
||||
prince213 = {
|
||||
name = "Sizhe Zhao";
|
||||
email = "prc.zhao@outlook.com";
|
||||
matrix = "@prince213:matrix.org";
|
||||
github = "Prince213";
|
||||
githubId = 25235514;
|
||||
keys = [
|
||||
{
|
||||
fingerprint = "2589 45E5 C556 7B4D B36C 3E28 A64B 5235 356E 16D1";
|
||||
}
|
||||
];
|
||||
};
|
||||
princemachiavelli = {
|
||||
name = "Josh Hoffer";
|
||||
email = "jhoffer@sansorgan.es";
|
||||
|
||||
@@ -1,66 +0,0 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
fetchFromGitHub,
|
||||
cmake,
|
||||
pkg-config,
|
||||
makeWrapper,
|
||||
boost,
|
||||
xercesc,
|
||||
qtbase,
|
||||
qttools,
|
||||
qtwebengine,
|
||||
qtsvg,
|
||||
python3Packages,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "sigil";
|
||||
version = "2.4.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
repo = "Sigil";
|
||||
owner = "Sigil-Ebook";
|
||||
tag = version;
|
||||
hash = "sha256-/lnSNamLkPLG8tn0w8F0zFyypMUXyMhgxA2WyQFegKw=";
|
||||
};
|
||||
|
||||
pythonPath = with python3Packages; [ lxml ];
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
pkg-config
|
||||
makeWrapper
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
boost
|
||||
xercesc
|
||||
qtbase
|
||||
qttools
|
||||
qtwebengine
|
||||
qtsvg
|
||||
python3Packages.lxml
|
||||
];
|
||||
|
||||
prePatch = ''
|
||||
sed -i '/^QTLIB_DIR=/ d' src/Resource_Files/bash/sigil-sh_install
|
||||
'';
|
||||
|
||||
dontWrapQtApps = true;
|
||||
|
||||
preFixup = ''
|
||||
wrapProgram "$out/bin/sigil" \
|
||||
--prefix PYTHONPATH : $PYTHONPATH \
|
||||
''${qtWrapperArgs[@]}
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Free, open source, multi-platform ebook (ePub) editor";
|
||||
homepage = "https://github.com/Sigil-Ebook/Sigil/";
|
||||
license = lib.licenses.gpl3;
|
||||
# currently unmaintained
|
||||
platforms = lib.platforms.linux;
|
||||
mainProgram = "sigil";
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
fetchFromGitHub,
|
||||
cmake,
|
||||
pkg-config,
|
||||
boost,
|
||||
xercesc,
|
||||
python3Packages,
|
||||
qt6,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "sigil";
|
||||
version = "2.4.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
repo = "Sigil";
|
||||
owner = "Sigil-Ebook";
|
||||
tag = version;
|
||||
hash = "sha256-/lnSNamLkPLG8tn0w8F0zFyypMUXyMhgxA2WyQFegKw=";
|
||||
};
|
||||
|
||||
pythonPath = with python3Packages; [ lxml ];
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
pkg-config
|
||||
qt6.wrapQtAppsHook
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
boost
|
||||
xercesc
|
||||
qt6.qtbase
|
||||
qt6.qttools
|
||||
qt6.qtwebengine
|
||||
qt6.qtsvg
|
||||
python3Packages.lxml
|
||||
];
|
||||
|
||||
prePatch = ''
|
||||
sed -i '/^QTLIB_DIR=/ d' src/Resource_Files/bash/sigil-sh_install
|
||||
'';
|
||||
|
||||
installPhase = lib.optionalString stdenv.hostPlatform.isDarwin ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p $out/Applications
|
||||
mv bin/Sigil.app $out/Applications
|
||||
# https://github.com/NixOS/nixpkgs/issues/186653
|
||||
chmod -x $out/Applications/Sigil.app/Contents/lib/*.dylib \
|
||||
$out/Applications/Sigil.app/Contents/polyfills/*.js \
|
||||
$out/Applications/Sigil.app/Contents/python3lib/*.py \
|
||||
$out/Applications/Sigil.app/Contents/hunspell_dictionaries/*.{aff,dic}
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
preFixup = ''
|
||||
qtWrapperArgs+=(--prefix PYTHONPATH : "$PYTHONPATH")
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Free, open source, multi-platform ebook (ePub) editor";
|
||||
homepage = "https://github.com/Sigil-Ebook/Sigil/";
|
||||
license = lib.licenses.gpl3Plus;
|
||||
maintainers = with lib.maintainers; [ prince213 ];
|
||||
platforms = with lib.platforms; linux ++ darwin;
|
||||
mainProgram = "sigil";
|
||||
};
|
||||
}
|
||||
@@ -5155,8 +5155,6 @@ with pkgs;
|
||||
|
||||
shiv = with python3Packages; toPythonApplication shiv;
|
||||
|
||||
sigil = qt6.callPackage ../applications/editors/sigil { };
|
||||
|
||||
slither-analyzer = with python3Packages; toPythonApplication slither-analyzer;
|
||||
|
||||
# aka., pgp-tools
|
||||
|
||||
Reference in New Issue
Block a user