From d1c631e98709a1c1c625133d0e5ad95f5f289f1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20L=C3=B8vbr=C3=B8tte=20Olsen?= Date: Thu, 27 Feb 2020 23:13:11 +0100 Subject: [PATCH] init photini --- default.nix | 1 + pkgs/photini/default.nix | 45 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 pkgs/photini/default.nix diff --git a/default.nix b/default.nix index 9a26d21..bad3096 100644 --- a/default.nix +++ b/default.nix @@ -23,6 +23,7 @@ janus = pkgs.libsForQt5.callPackage ./pkgs/JanusVR/client { }; radical-native = pkgs.callPackage ./pkgs/radical-native { }; + photini = pkgs.libsForQt5.callPackage ./pkgs/photini { }; } diff --git a/pkgs/photini/default.nix b/pkgs/photini/default.nix new file mode 100644 index 0000000..b968ce7 --- /dev/null +++ b/pkgs/photini/default.nix @@ -0,0 +1,45 @@ +{ + fetchFromGitHub, python3, python3Packages, gexiv2, gobject-introspection, wrapGAppsHook, qtbase, qt5, ffmpeg, + enableSpellCheck ? false, enableFlickr ? false, enableGPhotos ? false +}: + +let + pythonEnv = python3.withPackages (pythonPackages: with pythonPackages; [ + pyqt5 #_with_qtwebkit + pyqtwebengine + pygobject3 + appdirs + requests + six + pillow + setuptools + gpxpy + ] + ++ (if enableSpellCheck then with pythonPackages; [ pyenchant ] else []) + ); +in + + python3Packages.buildPythonApplication rec { + pname = "photini"; + version = "2019.10.1"; + + src = fetchFromGitHub { + owner = "jim-easterbrook"; + repo = "Photini"; + rev = "${version}"; + sha256 = "19xm24vgfqis0bqrg5fc5jxf5yr1md5y49kb7q3792gihykl6yzm"; + }; + + + nativeBuildInputs = [ wrapGAppsHook qt5.wrapQtAppsHook ]; + buildInputs = [ gexiv2 ffmpeg gobject-introspection ]; + propagatedBuildInputs = [ pythonEnv ]; + + + postInstall = '' + for program in $out/bin/*; do + wrapQtApp $program --prefix PYTHONPATH : $PYTHONPATH + done + ''; + + }