Skip to content

Instantly share code, notes, and snippets.

@betaboon
Last active March 21, 2019 15:09
Show Gist options
  • Save betaboon/181b7c942d543e7e44f12cb9f1a10945 to your computer and use it in GitHub Desktop.
Save betaboon/181b7c942d543e7e44f12cb9f1a10945 to your computer and use it in GitHub Desktop.
{ stdenv, buildPythonApplication, fetchFromGitHub
, aria
, libnotify
, pulseaudio
, psutil
, pyqt5
, requests
, setproctitle
, sound-theme-freedesktop
, youtube-dl
}:
buildPythonApplication rec {
pname = "persepolis";
version = "3.1.0";
src = fetchFromGitHub {
owner = "persepolisdm";
repo = "persepolis";
rev = "${version}";
sha256 = "0xngk8wgj5k27mh3bcrf2wwzqr8a3g0d4pc5i5vcavnnaj03j44m";
};
postPatch = ''
sed -i 's|/usr/share/sounds/freedesktop/stereo/|${sound-theme-freedesktop}/share/sounds/freedesktop/stereo/|' setup.py
# they are using entry_points/console_scripts wrong
# see: https://github.com/persepolisdm/persepolis/blob/3.1.0/setup.py#L197
# vs: https://python-packaging.readthedocs.io/en/latest/command-line-scripts.html#the-console-scripts-entry-point
sed -i "s|'persepolis = persepolis.__main__'|'persepolis = persepolis.scripts.persepolis:main'|" setup.py
'';
# see: https://github.com/persepolisdm/persepolis/blob/3.1.0/setup.py#L130
doCheck = false;
propagatedBuildInputs = [
aria
libnotify
pulseaudio
psutil
pyqt5
requests
setproctitle
sound-theme-freedesktop
youtube-dl
];
meta = with stdenv.lib; {
description = "A plugin for mkdocs to exclude arbitrary paths and files";
homepage = https://persepolisdm.github.io/;
license = licenses.gpl3;
maintainers = [ maintainers.linarcx ];
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment