Skip to content

Commit 393c216

Browse files
committed
Nix package: add .desktop and .service file
1 parent 3848e0a commit 393c216

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

nix/package.nix

+9
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,13 @@ buildGoModule {
33
name = "mpd-mpris";
44
src = ./..;
55
vendorSha256 = "sha256-HCDJrp9WFB1z+FnYpOI5e/AojtdnpN2ZNtgGVaH/v/Q=";
6+
7+
postInstall = ''
8+
mkdir -p $out/lib/systemd/user
9+
substitute mpd-mpris.service $out/lib/systemd/user/mpd-mpris.service \
10+
--replace "/usr/bin/mpd-mpris" "$out/bin/mpd-mpris"
11+
12+
mkdir -p $out/etc/xdg/autostart
13+
substitute mpd-mpris.desktop $out/etc/xdg/autostart/mpd-mpris.desktop
14+
'';
615
}

0 commit comments

Comments
 (0)