mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-02 03:43:06 +00:00
Merge pull request #90456 from Mic92/i3pystatus
This commit is contained in:
commit
62c02ec3bd
@ -1,31 +1,45 @@
|
||||
{ stdenv, fetchFromGitHub, libpulseaudio, python3Packages, extraLibs ? [] }:
|
||||
{ stdenv
|
||||
, fetchFromGitHub
|
||||
, libpulseaudio
|
||||
, libnotify
|
||||
, gobject-introspection
|
||||
, python3Packages
|
||||
, wrapGAppsHook
|
||||
, extraLibs ? [] }:
|
||||
|
||||
python3Packages.buildPythonApplication rec {
|
||||
# i3pystatus moved to rolling release:
|
||||
# https://github.com/enkore/i3pystatus/issues/584
|
||||
version = "unstable-2019-06-10";
|
||||
version = "unstable-2020-06-12";
|
||||
pname = "i3pystatus";
|
||||
|
||||
src = fetchFromGitHub
|
||||
{
|
||||
src = fetchFromGitHub {
|
||||
owner = "enkore";
|
||||
repo = "i3pystatus";
|
||||
rev = "56ce08d0ff8d5d64950d6b588ebede35a95e0ce2";
|
||||
sha256 = "12938860jbcly1xwhd71jvy2dff28pwv9kqh6mab1859148bzmcg";
|
||||
rev = "dad5eb0c5c8a2ecd20c37ade4732586c6e53f44b";
|
||||
sha256 = "18ygvkl92yr69kxsym57k1mc90asdxpz4b943i61qr0s4fc5n4mq";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = with python3Packages; [ keyring colour netifaces psutil basiciw ] ++
|
||||
[ libpulseaudio ] ++ extraLibs;
|
||||
buildInputs = [ libpulseaudio libnotify gobject-introspection ];
|
||||
|
||||
libpulseaudioPath = stdenv.lib.makeLibraryPath [ libpulseaudio ];
|
||||
ldWrapperSuffix = "--suffix LD_LIBRARY_PATH : \"${libpulseaudioPath}\"";
|
||||
# LC_TIME != C results in locale.Error: unsupported locale setting
|
||||
makeWrapperArgs = [ "--set LC_TIME C" ldWrapperSuffix ]; # libpulseaudio.so is loaded manually
|
||||
propagatedBuildInputs = with python3Packages; [
|
||||
keyring colour netifaces psutil basiciw pygobject3
|
||||
] ++ extraLibs;
|
||||
|
||||
makeWrapperArgs = [
|
||||
# LC_TIME != C results in locale.Error: unsupported locale setting
|
||||
"--set" "LC_TIME" "C"
|
||||
"--suffix" "LD_LIBRARY_PATH" ":" "${stdenv.lib.makeLibraryPath [ libpulseaudio ]}"
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
makeWrapperArgs+=(--set GI_TYPELIB_PATH "$GI_TYPELIB_PATH")
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
makeWrapper ${python3Packages.python.interpreter} $out/bin/${pname}-python-interpreter \
|
||||
--prefix PYTHONPATH : "$PYTHONPATH" \
|
||||
${ldWrapperSuffix}
|
||||
''${makeWrapperArgs[@]}
|
||||
'';
|
||||
|
||||
# no tests in tarball
|
||||
|
Loading…
Reference in New Issue
Block a user