aboutsummaryrefslogtreecommitdiff
path: root/default.nix
blob: 254a3934ded96ec9545abf8eb04082e83963f1ba (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
with import (builtins.fetchGit {
  name = "nixos-21.05-2021-08-02";
  url = "https://github.com/nixos/nixpkgs/";
  ref = "refs/heads/nixos-21.05";
  rev = "d4590d21006387dcb190c516724cb1e41c0f8fdf";
}) {};

python38Packages.buildPythonApplication rec {
  pname = "todo";
  version = "0.1.0";

  src = ./.;

  buildInputs = [
    qt5.qtwayland
    sqlite
  ];

  propagatedBuildInputs = with python38Packages; [
    pyqt5
    pytest
  ];

  makeWrapperArgs = [
    "--set QT_QPA_PLATFORM_PLUGIN_PATH ${qt5.qtwayland.bin}/lib/qt-*/plugins/platforms"
    "--set QT_PLUGIN_PATH ${qt5.qtwayland.bin}/lib/qt-*/plugins"
  ];

  shellHook = ''
    export QT_QPA_PLATFORM_PLUGIN_PATH="$(echo ${qt5.qtwayland.bin}/lib/qt-*/plugins/platforms)"
    export QT_PLUGIN_PATH="$(echo ${qt5.qtwayland.bin}/lib/qt-*/plugins)"
    export PYTHONPATH=./:$PYTHONPATH # Give access to kiosk_browser module
  '';
}