Merge pull request #131298 from dali99/add_to_hydrus_maintainer

hydrus: Update and improve package

authored by Sandro and committed by GitHub fbf61871 3f149700

+52 -28
+27 -27
pkgs/applications/graphics/hydrus/default.nix
··· 1 { lib 2 , fetchFromGitHub 3 - , xz 4 , wrapQtAppsHook 5 , miniupnpc_2 6 , enableSwftools ? false 7 , swftools 8 - , pythonPackages 9 }: 10 11 - pythonPackages.buildPythonPackage rec { 12 pname = "hydrus"; 13 - version = "441"; 14 format = "other"; 15 16 src = fetchFromGitHub { 17 owner = "hydrusnetwork"; 18 repo = "hydrus"; 19 rev = "v${version}"; 20 - sha256 = "13h4qcz0iqba4mwyvgmdqh99jy22x7kw20f3g43b5aq3qyk9ca2h"; 21 }; 22 23 nativeBuildInputs = [ 24 wrapQtAppsHook 25 ]; 26 27 - propagatedBuildInputs = with pythonPackages; [ 28 beautifulsoup4 29 html5lib 30 lxml 31 numpy 32 opencv4 33 pillow 34 psutil 35 pyopenssl 36 pyyaml 37 requests 38 send2trash 39 service-identity 40 twisted 41 - lz4 42 - xz 43 - pysocks 44 - matplotlib 45 - qtpy 46 - pyside2 47 - mpv 48 ]; 49 50 - checkInputs = with pythonPackages; [ nose httmock ]; 51 52 # most tests are failing, presumably because we are not using test.py 53 checkPhase = '' ··· 76 ''; 77 78 outputs = [ "out" "doc" ]; 79 - 80 - postPatch = '' 81 - sed 's;os\.path\.join(\sHC\.BIN_DIR,.*;"${miniupnpc_2}/bin/upnpc";' \ 82 - -i ./hydrus/core/networking/HydrusNATPunch.py 83 - '' + lib.optionalString enableSwftools '' 84 - sed 's;os\.path\.join(\sHC\.BIN_DIR,.*;"${swftools}/bin/swfrender";' \ 85 - -i ./hydrus/core/HydrusFlashHandling.py 86 - ''; 87 - 88 - #doCheck = true; 89 90 installPhase = '' 91 # Move the hydrus module and related directories 92 - mkdir -p $out/${pythonPackages.python.sitePackages} 93 - mv {hydrus,static} $out/${pythonPackages.python.sitePackages} 94 mv help $out/doc/ 95 96 # install the hydrus binaries 97 mkdir -p $out/bin 98 install -m0755 server.py $out/bin/hydrus-server 99 install -m0755 client.py $out/bin/hydrus-client 100 ''; 101 102 dontWrapQtApps = true; 103 preFixup = '' 104 makeWrapperArgs+=("''${qtWrapperArgs[@]}") 105 ''; 106 107 meta = with lib; { 108 description = "Danbooru-like image tagging and searching system for the desktop"; 109 license = licenses.wtfpl; 110 homepage = "https://hydrusnetwork.github.io/hydrus/"; 111 - maintainers = [ maintainers.evanjs ]; 112 }; 113 }
··· 1 { lib 2 , fetchFromGitHub 3 , wrapQtAppsHook 4 , miniupnpc_2 5 + , ffmpeg 6 , enableSwftools ? false 7 , swftools 8 + , python3Packages 9 }: 10 11 + python3Packages.buildPythonPackage rec { 12 pname = "hydrus"; 13 + version = "447"; 14 format = "other"; 15 16 src = fetchFromGitHub { 17 owner = "hydrusnetwork"; 18 repo = "hydrus"; 19 rev = "v${version}"; 20 + sha256 = "0a9nrsbw3w1229bm90xayixvkpvr6g338w64x4v75sqxvpbx84lz"; 21 }; 22 23 nativeBuildInputs = [ 24 wrapQtAppsHook 25 ]; 26 27 + propagatedBuildInputs = with python3Packages; [ 28 beautifulsoup4 29 + chardet 30 + cloudscraper 31 html5lib 32 lxml 33 + lz4 34 + nose 35 numpy 36 opencv4 37 pillow 38 psutil 39 + pylzma 40 pyopenssl 41 + pyside2 42 + pysocks 43 + pythonPackages.mpv 44 pyyaml 45 + qtpy 46 requests 47 send2trash 48 service-identity 49 + six 50 twisted 51 ]; 52 53 + checkInputs = with python3Packages; [ nose mock httmock ]; 54 55 # most tests are failing, presumably because we are not using test.py 56 checkPhase = '' ··· 79 ''; 80 81 outputs = [ "out" "doc" ]; 82 83 installPhase = '' 84 # Move the hydrus module and related directories 85 + mkdir -p $out/${python3Packages.python.sitePackages} 86 + mv {hydrus,static} $out/${python3Packages.python.sitePackages} 87 mv help $out/doc/ 88 89 # install the hydrus binaries 90 mkdir -p $out/bin 91 install -m0755 server.py $out/bin/hydrus-server 92 install -m0755 client.py $out/bin/hydrus-client 93 + '' + lib.optionalString enableSwftools '' 94 + mkdir -p $out/${python3Packages.python.sitePackages}/bin 95 + # swfrender seems to have to be called sfwrender_linux 96 + # not sure if it can be loaded through PATH, but this is simpler 97 + # $out/python3Packages.python.sitePackages/bin is correct NOT .../hydrus/bin 98 + ln -s ${swftools}/bin/swfrender $out/${python3Packages.python.sitePackages}/bin/swfrender_linux 99 ''; 100 101 dontWrapQtApps = true; 102 preFixup = '' 103 makeWrapperArgs+=("''${qtWrapperArgs[@]}") 104 + makeWrapperArgs+=(--prefix PATH : ${lib.makeBinPath [ ffmpeg miniupnpc_2 ]}) 105 ''; 106 107 meta = with lib; { 108 description = "Danbooru-like image tagging and searching system for the desktop"; 109 license = licenses.wtfpl; 110 homepage = "https://hydrusnetwork.github.io/hydrus/"; 111 + maintainers = with maintainers; [ dandellion evanjs ]; 112 }; 113 }
+23
pkgs/development/python-modules/pylzma/default.nix
···
··· 1 + { lib, buildPythonPackage, fetchPypi }: 2 + 3 + buildPythonPackage rec { 4 + pname = "pylzma"; 5 + version = "0.5.0"; 6 + 7 + # This vendors an old LZMA SDK 8 + # After some discussion, it seemed most reasonable to keep it that way 9 + # xz, and uefi-firmware-parser also does this 10 + src = fetchPypi { 11 + inherit pname version; 12 + sha256 = "074anvhyjgsv2iby2ql1ixfvjgmhnvcwjbdz8gk70xzkzcm1fx5q"; 13 + }; 14 + 15 + pythonImportsCheck = [ "pylzma" ]; 16 + 17 + meta = with lib; { 18 + homepage = "https://www.joachim-bauch.de/projects/pylzma/"; 19 + description = "Platform independent python bindings for the LZMA compression library"; 20 + license = licenses.lgpl21Only; 21 + maintainers = with maintainers; [ dandellion ]; 22 + }; 23 + }
-1
pkgs/tools/video/swftools/default.nix
··· 19 license = licenses.gpl2Only; 20 maintainers = [ maintainers.koral ]; 21 platforms = lib.platforms.unix; 22 - broken = true; 23 knownVulnerabilities = [ 24 "CVE-2017-10976" 25 "CVE-2017-11096"
··· 19 license = licenses.gpl2Only; 20 maintainers = [ maintainers.koral ]; 21 platforms = lib.platforms.unix; 22 knownVulnerabilities = [ 23 "CVE-2017-10976" 24 "CVE-2017-11096"
+2
pkgs/top-level/python-packages.nix
··· 6215 6216 pylxd = callPackage ../development/python-modules/pylxd { }; 6217 6218 pymacaroons = callPackage ../development/python-modules/pymacaroons { }; 6219 6220 pymaging = callPackage ../development/python-modules/pymaging { };
··· 6215 6216 pylxd = callPackage ../development/python-modules/pylxd { }; 6217 6218 + pylzma = callPackage ../development/python-modules/pylzma { }; 6219 + 6220 pymacaroons = callPackage ../development/python-modules/pymacaroons { }; 6221 6222 pymaging = callPackage ../development/python-modules/pymaging { };