This reverts commit 65a333600d5c88a98d674f637d092807cfc12253. This wasn't tested for correctness with something like fodwatch [0], and should not have been (self-)merged so quickly, especially without further review. It also resulted in the breakage of at least one package [1] (and that's the one we know of and was caught). A few packages that were updated in between this commit and this revert were not reverted back to using `rev`, but other than that, this is a 1:1 revert. [0]: https://codeberg.org/raphaelr/fodwatch [1]: https://github.com/NixOS/nixpkgs/pull/396904 / 758551e4587d75882aebc21a04bee960418f8ce9
82 lines
1.6 KiB
Nix
82 lines
1.6 KiB
Nix
{
|
|
lib,
|
|
buildPythonPackage,
|
|
fetchFromGitHub,
|
|
fetchpatch,
|
|
pillow,
|
|
xlib,
|
|
six,
|
|
xvfb-run,
|
|
setuptools,
|
|
gobject-introspection,
|
|
pygobject3,
|
|
gtk3,
|
|
libayatana-appindicator,
|
|
pytest,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "pystray";
|
|
version = "0.19.5";
|
|
pyproject = true;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "moses-palmer";
|
|
repo = "pystray";
|
|
rev = "v${version}";
|
|
hash = "sha256-CZhbaXwKFrRBEomzfFPMQdMkTOl5lbgI64etfDRiRu4=";
|
|
};
|
|
|
|
patches = [
|
|
# fix test_menu_construct_from_none test case
|
|
# https://github.com/moses-palmer/pystray/pull/133
|
|
(fetchpatch {
|
|
url = "https://github.com/moses-palmer/pystray/commit/813007e3034d950d93a2f3e5b029611c3c9c98ad.patch";
|
|
hash = "sha256-m2LfZcWXSfgxb73dac21VDdMDVz3evzcCz5QjdnfM1U=";
|
|
})
|
|
];
|
|
|
|
postPatch = ''
|
|
substituteInPlace setup.py \
|
|
--replace-fail "'sphinx >=1.3.1'" ""
|
|
'';
|
|
|
|
nativeBuildInputs = [
|
|
gobject-introspection
|
|
setuptools
|
|
];
|
|
|
|
propagatedBuildInputs = [
|
|
pillow
|
|
xlib
|
|
six
|
|
pygobject3
|
|
gtk3
|
|
libayatana-appindicator
|
|
];
|
|
|
|
nativeCheckInputs = [
|
|
pytest
|
|
xvfb-run
|
|
];
|
|
|
|
checkPhase = ''
|
|
runHook preCheck
|
|
|
|
xvfb-run -s '-screen 0 800x600x24' pytest tests/menu_descriptor_tests.py
|
|
|
|
runHook postCheck
|
|
'';
|
|
|
|
meta = with lib; {
|
|
homepage = "https://github.com/moses-palmer/pystray";
|
|
description = "This library allows you to create a system tray icon";
|
|
license = with licenses; [
|
|
gpl3Plus
|
|
lgpl3Plus
|
|
];
|
|
platforms = platforms.linux;
|
|
maintainers = with maintainers; [ jojosch ];
|
|
};
|
|
}
|