mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-19 11:23:29 +00:00
Merge pull request #318213 from pluiedev/init/novelwriter
novelwriter: init at 2.4.3
This commit is contained in:
commit
e8dc88026d
73
pkgs/by-name/no/novelwriter/package.nix
Normal file
73
pkgs/by-name/no/novelwriter/package.nix
Normal file
@ -0,0 +1,73 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
python3,
|
||||
fetchFromGitHub,
|
||||
qt5,
|
||||
nix-update-script,
|
||||
}:
|
||||
let
|
||||
version = "2.4.3";
|
||||
in
|
||||
python3.pkgs.buildPythonApplication {
|
||||
pname = "novelwriter";
|
||||
inherit version;
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "vkbo";
|
||||
repo = "novelWriter";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-PuoI/2JnbOFuSDTY3uDrySqPl/MGYna+QvSI7WQ8QMk=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ qt5.wrapQtAppsHook ];
|
||||
|
||||
build-system = with python3.pkgs; [ setuptools ];
|
||||
|
||||
dependencies = with python3.pkgs; [
|
||||
pyqt5
|
||||
pyenchant
|
||||
qt5.qtbase
|
||||
qt5.qtwayland
|
||||
];
|
||||
|
||||
preBuild = ''
|
||||
export QT_QPA_PLATFORM_PLUGIN_PATH=${qt5.qtbase.bin}/lib/qt-${qt5.qtbase.version}/plugins/platforms
|
||||
'';
|
||||
|
||||
postInstall = lib.optionalString stdenv.isLinux ''
|
||||
mkdir -p $out/share/{icons,applications,pixmaps,mime/packages}
|
||||
|
||||
cp -r setup/data/hicolor $out/share/icons
|
||||
cp setup/data/novelwriter.desktop $out/share/applications
|
||||
cp setup/data/novelwriter.png $out/share/pixmaps
|
||||
cp setup/data/x-novelwriter-project.xml $out/share/mime/packages
|
||||
'';
|
||||
|
||||
dontWrapQtApps = true;
|
||||
|
||||
postFixup = ''
|
||||
wrapQtApp $out/bin/novelwriter
|
||||
'';
|
||||
|
||||
passthru.updateScript = nix-update-script {
|
||||
# Stable releases only
|
||||
extraArgs = [
|
||||
"--version-regex"
|
||||
"^v([0-9.]+)$"
|
||||
];
|
||||
};
|
||||
|
||||
meta = {
|
||||
description = "Open source plain text editor designed for writing novels";
|
||||
homepage = "https://novelwriter.io";
|
||||
changelog = "https://github.com/vkbo/novelWriter/blob/main/CHANGELOG.md";
|
||||
license = with lib.licenses; [ gpl3 ];
|
||||
maintainers = with lib.maintainers; [ pluiedev ];
|
||||
mainProgram = "novelwriter";
|
||||
|
||||
platforms = with lib.platforms; unix ++ windows;
|
||||
broken = stdenv.isDarwin; # TODO awaiting build instructions for Darwin
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue
Block a user