aboutsummaryrefslogtreecommitdiff
path: root/default.nix
blob: 44309188ec6858283fc4d88a13855bd8fb5644bd (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 = "nixpkgs-20.03";
  url = "git@github.com:nixos/nixpkgs.git";
  rev = "5272327b81ed355bbed5659b8d303cf2979b6953";
  ref = "refs/tags/20.03";
}) {});

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

  src = ./.;

  buildInputs = [
    qt5.qtbase
    sqlite
  ];

  propagatedBuildInputs = with python38Packages; [
    pyqt5
    pytest
  ];

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

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