nur update
This commit is contained in:
86
pkgs/hydrus/default.nix
Normal file
86
pkgs/hydrus/default.nix
Normal file
@@ -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
|
||||
'';
|
||||
}
|
||||
Reference in New Issue
Block a user