Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 buildGoModule, 4 fetchFromGitHub, 5 fetchpatch, 6}: 7 8buildGoModule rec { 9 pname = "mpd-mpris"; 10 version = "0.4.1"; 11 12 src = fetchFromGitHub { 13 owner = "natsukagami"; 14 repo = "mpd-mpris"; 15 rev = "v${version}"; 16 sha256 = "sha256-QxPkGWpCWiyEbChH9SHeD+SiV8k0c/G7MG/azksP3xU="; 17 }; 18 19 patches = [ 20 # Makes Exec= path not absolute, see https://github.com/natsukagami/mpd-mpris/pull/42 21 (fetchpatch { 22 url = "https://github.com/natsukagami/mpd-mpris/commit/8a5b53b1aa3174c3ccb1db24fb4e39f90012b98f.patch"; 23 hash = "sha256-LArPq+RRPJOs0je1olqg+pK7nvU7UIlrpGtHv2PhIY4="; 24 }) 25 ]; 26 27 vendorHash = "sha256-HCDJrp9WFB1z+FnYpOI5e/AojtdnpN2ZNtgGVaH/v/Q="; 28 29 doCheck = false; 30 31 subPackages = [ "cmd/mpd-mpris" ]; 32 33 postInstall = '' 34 install -Dm644 mpd-mpris.service $out/lib/systemd/user/mpd-mpris.service 35 install -Dm644 mpd-mpris.desktop $out/etc/xdg/autostart/mpd-mpris.desktop 36 ''; 37 38 meta = with lib; { 39 description = "Implementation of the MPRIS protocol for MPD"; 40 homepage = "https://github.com/natsukagami/mpd-mpris"; 41 license = licenses.mit; 42 maintainers = with maintainers; [ doronbehar ]; 43 mainProgram = "mpd-mpris"; 44 }; 45}