From 3db41812bbf14d672803b941581268c42afec815 Mon Sep 17 00:00:00 2001 From: Tom Fitzhenry Date: Sat, 18 Sep 2021 21:28:26 +1000 Subject: [PATCH] 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%. --- pkgs/applications/audio/spot/default.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/applications/audio/spot/default.nix b/pkgs/applications/audio/spot/default.nix index 2859a2e942e2..5ffec66e1c4e 100644 --- a/pkgs/applications/audio/spot/default.nix +++ b/pkgs/applications/audio/spot/default.nix @@ -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