diff options
author | Joris | 2020-06-06 17:44:26 +0200 |
---|---|---|
committer | Joris | 2020-06-06 19:54:03 +0200 |
commit | 1595e0de940a86a7810df0e02e43838d97c0d846 (patch) | |
tree | 9701eeec0d98baa9f6044b1911df68e4c8539819 /default.nix | |
parent | 6b9195000eb5404c247288b384d7ca2bacc1ab23 (diff) |
Provide nix build
Diffstat (limited to 'default.nix')
-rw-r--r-- | default.nix | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/default.nix b/default.nix new file mode 100644 index 0000000..4430918 --- /dev/null +++ b/default.nix @@ -0,0 +1,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 + ''; +} |