Merge pull request #287550 from eclairevoyant/waybar-purify

waybar: fix impure dependency on /bin/sh
This commit is contained in:
Artturi 2024-02-14 16:23:01 +02:00 committed by GitHub
commit a6d53bbe97
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,5 +1,6 @@
{ lib
, stdenv
, bash
, fetchFromGitHub
, SDL2
, alsa-lib
@ -163,6 +164,11 @@ stdenv.mkDerivation (finalAttrs: {
"wireplumber" = wireplumberSupport;
}) ++ lib.optional experimentalPatches (lib.mesonBool "experimental" true);
postPatch = ''
substituteInPlace include/util/command.hpp \
--replace-fail /bin/sh ${lib.getExe' bash "sh"}
'';
preFixup = lib.optionalString withMediaPlayer ''
cp $src/resources/custom_modules/mediaplayer.py $out/bin/waybar-mediaplayer.py