Skip to content

Commit

Permalink
Merge pull request #292837 from iFreilicht/update-persepolis
Browse files Browse the repository at this point in the history
persepolis: 3.2.0 -> 4.0.1
  • Loading branch information
SuperSandro2000 authored May 17, 2024
2 parents d769131 + 0535756 commit 3dd4b58
Show file tree
Hide file tree
Showing 7 changed files with 85 additions and 183 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ index aaabb35..69676d3 100644
@@ -72,16 +72,8 @@ def startAria():

# in macintosh
elif os_type == 'Darwin':
elif os_type == OS.OSX:
- if aria2_path == "" or aria2_path == None or os.path.isfile(str(aria2_path)) == False:
-
- cwd = sys.argv[0]
Expand Down
84 changes: 84 additions & 0 deletions pkgs/by-name/pe/persepolis/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
{ lib
, stdenv
, qt5
, python3
, fetchFromGitHub
, aria2
, ffmpeg
, libnotify
, pulseaudio
, sound-theme-freedesktop
, pkg-config
, meson
, ninja
}:

python3.pkgs.buildPythonApplication rec {
pname = "persepolis";
version = "4.0.1";
format = "other";

src = fetchFromGitHub {
owner = "persepolisdm";
repo = "persepolis";
rev = "57dc9d438bb3f126070a17c7a3677c45ea4dd332";
hash = "sha256-7OXAITFQJ2/aY0QmqlAo7if7cY7+T3j6PUjfJJV8Z2Q=";
};

patches = [
# Upstream does currently not allow building from source on macOS. These patches can likely
# be removed if https://github.com/persepolisdm/persepolis/issues/943 is fixed upstream
./0003-Search-PATH-for-aria2c-on-darwin.patch
./0004-Search-PATH-for-ffmpeg-on-darwin.patch
];

postPatch = ''
# Ensure dependencies with hard-coded FHS dependencies are properly detected
substituteInPlace check_dependencies.py --replace-fail "isdir(notifications_path)" "isdir('${sound-theme-freedesktop}/share/sounds/freedesktop')"
'';

postInstall = ''
mkdir -p $out/share/applications
cp $src/xdg/com.github.persepolisdm.persepolis.desktop $out/share/applications
'';

# prevent double wrapping
dontWrapQtApps = true;
nativeBuildInputs = [ meson ninja pkg-config qt5.wrapQtAppsHook ];

# feed args to wrapPythonApp
makeWrapperArgs = [
"--prefix PATH : ${lib.makeBinPath [ aria2 ffmpeg libnotify ]}"
"\${qtWrapperArgs[@]}"
];

# The presence of these dependencies is checked during setuptoolsCheckPhase,
# but apart from that, they're not required during build, only runtime
nativeCheckInputs = [
aria2
libnotify
pulseaudio
sound-theme-freedesktop
ffmpeg
];

propagatedBuildInputs = [
pulseaudio
sound-theme-freedesktop
] ++ (with python3.pkgs; [
psutil
pyqt5
requests
setproctitle
setuptools
yt-dlp
]);

meta = with lib; {
description = "A GUI for aria2";
mainProgram = "persepolis";
homepage = "https://persepolisdm.github.io/";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ iFreilicht ];
};
}

This file was deleted.

This file was deleted.

92 changes: 0 additions & 92 deletions pkgs/tools/networking/persepolis/default.nix

This file was deleted.

4 changes: 0 additions & 4 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6050,10 +6050,6 @@ with pkgs;

pcp = callPackage ../tools/misc/pcp { };

persepolis = python3Packages.callPackage ../tools/networking/persepolis {
wrapQtAppsHook = qt5.wrapQtAppsHook;
};

pev = callPackage ../development/tools/analysis/pev { };

phd2 = callPackage ../applications/science/astronomy/phd2 { };
Expand Down

0 comments on commit 3dd4b58

Please sign in to comment.