From 5ebd57d6bc0cbab7e2b4cbf5832d51afd5e417c8 Mon Sep 17 00:00:00 2001 From: Daniel Olsen Date: Sat, 13 Mar 2021 01:03:17 +0100 Subject: [PATCH] nur update --- default.nix | 8 ++- pkgs/hydrus/default.nix | 86 ++++++++++++++++++++++++++ pkgs/python-modules/pylzma/default.nix | 21 +++++++ pkgs/synapse-admin/default.nix | 6 +- 4 files changed, 117 insertions(+), 4 deletions(-) create mode 100644 pkgs/hydrus/default.nix create mode 100644 pkgs/python-modules/pylzma/default.nix diff --git a/default.nix b/default.nix index 661139f..96d7af5 100644 --- a/default.nix +++ b/default.nix @@ -10,7 +10,11 @@ let wsgiserver = pkgs.callPackage ./pkgs/python-modules/wsgiserver { buildPythonPackage = pkgs.python3Packages.buildPythonPackage; fetchPypi = pkgs.python3Packages.fetchPypi; }; -in + + opencv-python-headless = pkgs.callPackage ./pkgs/python-modules/opencv-python-headless { buildPythonPackage = pkgs.python3Packages.buildPythonPackage; fetchPypi = pkgs.python3Packages.fetchPypi; }; + pylzma = pkgs.callPackage ./pkgs/python-modules/pylzma { buildPythonPackage = pkgs.python3Packages.buildPythonPackage; fetchPypi = pkgs.python3Packages.fetchPypi; }; + python-mpv = pkgs.callPackage ./pkgs/python-modules/python-mpv { buildPythonPackage = pkgs.python3Packages.buildPythonPackage; fetchPypi = pkgs.python3Packages.fetchPypi; }; +in { # The `lib`, `modules`, and `overlay` names are special lib = import ./lib { inherit pkgs; }; # functions @@ -39,6 +43,8 @@ in # radical-native = pkgs.callPackage ./pkgs/radical-native { }; photini = pkgs.libsForQt5.callPackage ./pkgs/photini { }; + hydrus = pkgs.libsForQt5.callPackage ./pkgs/hydrus { inherit pylzma;}; + metapixel = pkgs.callPackage ./pkgs/metapixel { }; plotbitrate = pkgs.callPackage ./pkgs/plotbitrate { }; diff --git a/pkgs/hydrus/default.nix b/pkgs/hydrus/default.nix new file mode 100644 index 0000000..8603ebe --- /dev/null +++ b/pkgs/hydrus/default.nix @@ -0,0 +1,86 @@ +{ mkDerivation, fetchFromGitHub, python3, python3Packages, wrapGAppsHook, qt5, pylzma, ffmpeg, miniupnpc }: +let + pythonEnv = python3.withPackages (pythonPackages: with pythonPackages; [ + beautifulsoup4 + chardet + cloudscraper + html5lib + lxml + lz4 + nose + numpy + pillow + psutil + pylzma + pyopenssl + pyside2 + pysocks + pyyaml + qtpy + requests + send2trash + service-identity + six + twisted + + opencv4 + ]); +in + mkDerivation rec { + pname = "hydrus"; + version = "432"; + + src = fetchFromGitHub { + owner = "hydrusnetwork"; + repo = "hydrus"; + rev = "v${version}"; + sha256 = "1i3canx007pdw6grwjacx7abmlk0fvj8aygrzqsilay2y2gpivmm"; + }; + + format = "other"; + dontWrapQtApps = true; + dontWrapGApps = true; + + + makeWrapperArgs = [ + "\${gappsWrapperArgs[@]}" + "\${qtWrapperArgs[@]}" + ]; + + preFixup = '' + wrapPythonPrograms + ''; + + buildPhase = '' + runHook preBuild + + python -OO -m compileall -f . + + runHook postBuild + ''; + + installPhase = '' + runHook preInstall + + mkdir -p "$out/opt/hydrus" + cp -r help hydrus static client.pyw server.py "$out/opt/hydrus/" + chmod a+x "$out/opt/hydrus/server.py" + + mkdir -p $out/opt/hydrus/bin + ln -s "${miniupnpc}/bin/upnpc" "$out/opt/hydrus/bin/upnpc_linux" + ln -s "${ffmpeg}/bin/ffmpeg" "$out/opt/hydrus/bin/ffmpeg" + + mkdir -p "$out/bin" + + runHook postInstall + ''; + + nativeBuildInputs = [ qt5.wrapQtAppsHook python3Packages.wrapPython ]; + buildInputs = [ ffmpeg miniupnpc ]; + propagatedBuildInputs = [ pythonEnv ]; + + postInstall = '' + echo wrapping + wrapQtApp $out/opt/hydrus/client.pyw --prefix PYTHONPATH : $PYTHONPATH + ''; + } diff --git a/pkgs/python-modules/pylzma/default.nix b/pkgs/python-modules/pylzma/default.nix new file mode 100644 index 0000000..4b431b0 --- /dev/null +++ b/pkgs/python-modules/pylzma/default.nix @@ -0,0 +1,21 @@ +{ lib, buildPythonPackage, fetchPypi }: + +buildPythonPackage rec { + pname = "pylzma"; + version = "0.5.0"; + + src = fetchPypi { + inherit pname version; + sha256 = "074anvhyjgsv2iby2ql1ixfvjgmhnvcwjbdz8gk70xzkzcm1fx5q"; + }; + + + doCheck = false; + + meta = with lib; { + homepage = "https://github.com/opencv/opencv-python"; + description = "Unofficial pre-built CPU-only OpenCV packages for Python"; + license = licenses.mit; + }; + +} diff --git a/pkgs/synapse-admin/default.nix b/pkgs/synapse-admin/default.nix index a811fe7..477510e 100644 --- a/pkgs/synapse-admin/default.nix +++ b/pkgs/synapse-admin/default.nix @@ -2,13 +2,13 @@ mkYarnPackage { pname = "synapse-admin"; - version = "0.4.1"; + version = "0.7.0"; src = fetchFromGitHub { owner = "Awesome-Technologies"; repo = "synapse-admin"; - rev = "0.4.1"; - sha256 = "1ig9pb2cqpg4hgn3mm765sc57fn9c00xz1hpxvrvdyhwlvscs95i"; + rev = "0.7.0"; + sha256 = "00vqqgchzff231s5kxxsv3yalnmr16q86ycj2nj1m728d3jmi0k1"; }; buildPhase = ''