From 1595e0de940a86a7810df0e02e43838d97c0d846 Mon Sep 17 00:00:00 2001 From: Joris Date: Sat, 6 Jun 2020 17:44:26 +0200 Subject: Provide nix build --- default.nix | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 default.nix (limited to 'default.nix') 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 + ''; +} -- cgit v1.2.3