6 , enableSwftools ? false
16 python3Packages.buildPythonPackage rec {
21 src = fetchFromGitHub {
22 owner = "hydrusnetwork";
24 rev = "refs/tags/v${version}";
25 hash = "sha256-JhCnSNmCOEJdM5aEPpYWLpKy/EQ9BoN1A/aUAaILWtQ=";
30 python3Packages.mkdocs-material
41 name = "hydrus-client";
42 exec = "hydrus-client";
43 desktopName = "Hydrus Client";
44 icon = "hydrus-client";
45 comment = meta.description;
48 categories = [ "FileTools" "Utility" ];
53 propagatedBuildInputs = with python3Packages; [
85 nativeCheckInputs = with python3Packages; [
90 outputs = [ "out" "doc" ];
95 # Move the hydrus module and related directories
96 mkdir -p $out/${python3Packages.python.sitePackages}
97 mv {hydrus,static,db} $out/${python3Packages.python.sitePackages}
98 # Fix random files being marked with execute permissions
99 chmod -x $out/${python3Packages.python.sitePackages}/static/*.{png,svg,ico}
102 mkdir -p $doc/share/doc
103 mv help $doc/share/doc/hydrus
105 # install the hydrus binaries
107 install -m0755 hydrus_server.py $out/bin/hydrus-server
108 install -m0755 hydrus_client.py $out/bin/hydrus-client
109 install -m0755 hydrus_test.py $out/bin/hydrus-test
112 mkdir -p "$out/share/icons/hicolor/scalable/apps"
113 ln -s "$doc/share/doc/hydrus/assets/hydrus-white.svg" "$out/share/icons/hicolor/scalable/apps/hydrus-client.svg"
114 '' + lib.optionalString enableSwftools ''
115 mkdir -p $out/${python3Packages.python.sitePackages}/bin
116 # swfrender seems to have to be called sfwrender_linux
117 # not sure if it can be loaded through PATH, but this is simpler
118 # $out/python3Packages.python.sitePackages/bin is correct NOT .../hydrus/bin
119 ln -s ${swftools}/bin/swfrender $out/${python3Packages.python.sitePackages}/bin/swfrender_linux
127 export QT_QPA_PLATFORM=offscreen
128 export HOME=$(mktemp -d)
134 dontWrapQtApps = true;
136 makeWrapperArgs+=("''${qtWrapperArgs[@]}")
137 makeWrapperArgs+=(--prefix PATH : ${lib.makeBinPath [ ffmpeg miniupnpc ]})
141 description = "Danbooru-like image tagging and searching system for the desktop";
142 license = licenses.wtfpl;
143 homepage = "https://hydrusnetwork.github.io/hydrus/";
144 maintainers = with maintainers; [ dandellion evanjs ];