cosmic-osd: substitue path for audio-volume-change.oga file
The path `/usr/share/sounds/freedesktop/stereo/audio-volume-change.oga` is not accessible on NixOS because the directory `/usr` does not exist on NixOS. But the `audio-volume-change.oga` file is available in the `sound-theme-freedesktop` package. So substitute the full, FHS-compliant path with the path of the `sound-theme-freedesktop` package from the Nix store.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
{
|
||||
lib,
|
||||
fetchFromGitHub,
|
||||
sound-theme-freedesktop,
|
||||
rustPlatform,
|
||||
libcosmicAppHook,
|
||||
pulseaudio,
|
||||
@@ -20,6 +21,11 @@ rustPlatform.buildRustPackage (finalAttrs: {
|
||||
hash = "sha256-ezOeRgqI/GOWFknUVZI7ZLEy1GYaBI+/An83HWKL6ho=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace src/components/app.rs \
|
||||
--replace-fail '/usr/share/sounds/freedesktop/stereo/audio-volume-change.oga' '${sound-theme-freedesktop}/share/sounds/freedesktop/stereo/audio-volume-change.oga'
|
||||
'';
|
||||
|
||||
useFetchCargoVendor = true;
|
||||
cargoHash = "sha256-vYehF2RjPrTZiuGcRUe4XX3ftRo7f+SIoKizD/kOtR8=";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user