chromium,chromedriver: 129.0.6668.91 -> 129.0.6668.100
[NixPkgs.git] / pkgs / by-name / no / novelwriter / package.nix
blobf33aa1b03a426b21d79117fb25747019ebf02a61
2   lib,
3   stdenv,
4   python3,
5   fetchFromGitHub,
6   qt5,
7   nix-update-script,
8 }:
9 let
10   version = "2.5.2";
12 python3.pkgs.buildPythonApplication {
13   pname = "novelwriter";
14   inherit version;
15   pyproject = true;
17   src = fetchFromGitHub {
18     owner = "vkbo";
19     repo = "novelWriter";
20     rev = "v${version}";
21     hash = "sha256-xRSq6lBZ6jHtNve027uF2uNs3/40s0YdFN9F9O7m5VU=";
22   };
24   nativeBuildInputs = [ qt5.wrapQtAppsHook ];
26   build-system = with python3.pkgs; [ setuptools ];
28   dependencies = with python3.pkgs; [
29     pyqt5
30     pyenchant
31     qt5.qtbase
32     qt5.qtwayland
33   ];
35   preBuild = ''
36     export QT_QPA_PLATFORM_PLUGIN_PATH=${qt5.qtbase.bin}/lib/qt-${qt5.qtbase.version}/plugins/platforms
37   '';
39   postInstall = lib.optionalString stdenv.hostPlatform.isLinux ''
40     mkdir -p $out/share/{icons,applications,pixmaps,mime/packages}
42     cp -r setup/data/hicolor $out/share/icons
43     cp setup/data/novelwriter.desktop $out/share/applications
44     cp setup/data/novelwriter.png $out/share/pixmaps
45     cp setup/data/x-novelwriter-project.xml $out/share/mime/packages
46   '';
48   dontWrapQtApps = true;
50   postFixup = ''
51     wrapQtApp $out/bin/novelwriter
52   '';
54   passthru.updateScript = nix-update-script {
55     # Stable releases only
56     extraArgs = [
57       "--version-regex"
58       "^v([0-9.]+)$"
59     ];
60   };
62   meta = {
63     description = "Open source plain text editor designed for writing novels";
64     homepage = "https://novelwriter.io";
65     changelog = "https://github.com/vkbo/novelWriter/blob/main/CHANGELOG.md";
66     license = with lib.licenses; [ gpl3 ];
67     maintainers = with lib.maintainers; [ pluiedev ];
68     mainProgram = "novelwriter";
70     platforms = with lib.platforms; unix ++ windows;
71     broken = stdenv.hostPlatform.isDarwin; # TODO awaiting build instructions for Darwin
72   };