mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-28 16:43:58 +00:00
571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
45 lines
1.2 KiB
Nix
45 lines
1.2 KiB
Nix
{ lib
|
|
, buildGoModule
|
|
, fetchFromGitHub
|
|
, fetchpatch
|
|
}:
|
|
|
|
buildGoModule rec {
|
|
pname = "mpd-mpris";
|
|
version = "0.4.1";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "natsukagami";
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
sha256 = "sha256-QxPkGWpCWiyEbChH9SHeD+SiV8k0c/G7MG/azksP3xU=";
|
|
};
|
|
|
|
patches = [
|
|
# Makes Exec= path not absolute, see https://github.com/natsukagami/mpd-mpris/pull/42
|
|
(fetchpatch {
|
|
url = "https://github.com/natsukagami/mpd-mpris/commit/8a5b53b1aa3174c3ccb1db24fb4e39f90012b98f.patch";
|
|
hash = "sha256-LArPq+RRPJOs0je1olqg+pK7nvU7UIlrpGtHv2PhIY4=";
|
|
})
|
|
];
|
|
|
|
vendorHash = "sha256-HCDJrp9WFB1z+FnYpOI5e/AojtdnpN2ZNtgGVaH/v/Q=";
|
|
|
|
doCheck = false;
|
|
|
|
subPackages = [ "cmd/${pname}" ];
|
|
|
|
postInstall = ''
|
|
install -Dm644 mpd-mpris.service $out/lib/systemd/user/mpd-mpris.service
|
|
install -Dm644 mpd-mpris.desktop $out/etc/xdg/autostart/mpd-mpris.desktop
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "Implementation of the MPRIS protocol for MPD";
|
|
homepage = "https://github.com/natsukagami/mpd-mpris";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ doronbehar ];
|
|
mainProgram = "mpd-mpris";
|
|
};
|
|
}
|