spot: Build an optimised binary, to drop CPU usage: 70% -> 10%

https://github.com/xou816/spot/issues/131 reports that this dropped
~30-40% to 5-10% on an i7-7700.

On my Pinephone, it dropped 70% to 10%.
This commit is contained in:
Tom Fitzhenry 2021-09-18 21:28:26 +10:00
parent 9ec36def15
commit 3db41812bb

View File

@ -59,6 +59,9 @@ stdenv.mkDerivation rec {
libpulseaudio
];
# Per https://github.com/xou816/spot/blob/2a591febcfa4b9690ea166097392d2a327cd0c60/README.md#L111 .
mesonBuildType = "release";
postPatch = ''
chmod +x build-aux/cargo.sh
patchShebangs build-aux/cargo.sh build-aux/meson/postinstall.py