mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-10-31 22:51:22 +00:00
Merge pull request #156571 from AndersonTorres/new-misc
mpc: install Bash shell completion (and more)
This commit is contained in:
commit
48743a4f17
@ -513,10 +513,6 @@
|
||||
githubId = 38869148;
|
||||
name = "Alex Eyre";
|
||||
};
|
||||
algorith = {
|
||||
email = "dries_van_daele@telenet.be";
|
||||
name = "Dries Van Daele";
|
||||
};
|
||||
alibabzo = {
|
||||
email = "alistair.bill@gmail.com";
|
||||
github = "alibabzo";
|
||||
|
@ -70,7 +70,7 @@ in
|
||||
type = types.listOf (types.submodule bindingCfg);
|
||||
default = [];
|
||||
example = lib.literalExpression ''
|
||||
[ { keys = ["PLAYPAUSE"]; cmd = "''${pkgs.mpc_cli}/bin/mpc -q toggle"; } ]
|
||||
[ { keys = ["PLAYPAUSE"]; cmd = "''${pkgs.mpc-cli}/bin/mpc -q toggle"; } ]
|
||||
'';
|
||||
description = ''
|
||||
Key bindings for <command>triggerhappy</command>.
|
||||
|
@ -96,7 +96,7 @@ import ./make-test-python.nix ({ pkgs, lib, ... }:
|
||||
};
|
||||
|
||||
testScript = ''
|
||||
mpc = "${pkgs.mpc_cli}/bin/mpc --wait"
|
||||
mpc = "${pkgs.mpc-cli}/bin/mpc --wait"
|
||||
|
||||
# Connects to the given server and attempts to play a tune.
|
||||
def play_some_music(server):
|
||||
|
@ -3,7 +3,7 @@
|
||||
, fetchFromGitHub
|
||||
, makeWrapper
|
||||
, rofi
|
||||
, mpc_cli
|
||||
, mpc-cli
|
||||
, perl
|
||||
, util-linux
|
||||
, python3Packages
|
||||
@ -28,11 +28,24 @@ stdenv.mkDerivation {
|
||||
|
||||
strictDeps = true;
|
||||
|
||||
installPhase = ''
|
||||
DESTDIR=$out PREFIX=/ make install
|
||||
wrapProgram $out/bin/clerk \
|
||||
--prefix PATH : "${lib.makeBinPath [ rofi mpc_cli perl util-linux libnotify ]}"
|
||||
'';
|
||||
installPhase =
|
||||
let
|
||||
binPath = lib.makeBinPath [
|
||||
libnotify
|
||||
mpc-cli
|
||||
perl
|
||||
rofi
|
||||
util-linux
|
||||
];
|
||||
in
|
||||
''
|
||||
runHook preInstall
|
||||
|
||||
DESTDIR=$out PREFIX=/ make install
|
||||
wrapProgram $out/bin/clerk --prefix PATH : "${binPath}"
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "An MPD client built on top of rofi";
|
||||
|
@ -1,12 +1,13 @@
|
||||
{ lib
|
||||
, stdenv
|
||||
, fetchFromGitHub
|
||||
, installShellFiles
|
||||
, libiconv
|
||||
, libmpdclient
|
||||
, meson
|
||||
, ninja
|
||||
, pkg-config
|
||||
, libmpdclient
|
||||
, sphinx
|
||||
, libiconv
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
@ -14,21 +15,39 @@ stdenv.mkDerivation rec {
|
||||
version = "0.34";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "MusicPlayerDaemon";
|
||||
repo = "mpc";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-2FjYBfak0IjibuU+CNQ0y9Ei8hTZhynS/BK2DNerhVw=";
|
||||
owner = "MusicPlayerDaemon";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
hash = "sha256-2FjYBfak0IjibuU+CNQ0y9Ei8hTZhynS/BK2DNerhVw=";
|
||||
};
|
||||
|
||||
buildInputs = [ libmpdclient ] ++ lib.optionals stdenv.isDarwin [ libiconv ];
|
||||
buildInputs = [
|
||||
libmpdclient
|
||||
]
|
||||
++ lib.optionals stdenv.isDarwin [ libiconv ];
|
||||
|
||||
nativeBuildInputs = [ meson ninja pkg-config sphinx ];
|
||||
nativeBuildInputs = [
|
||||
installShellFiles
|
||||
meson
|
||||
ninja
|
||||
pkg-config
|
||||
sphinx
|
||||
];
|
||||
|
||||
postInstall = ''
|
||||
installShellCompletion --cmd mpc --bash $out/share/doc/mpc/contrib/mpc-completion.bash
|
||||
'';
|
||||
|
||||
postFixup = ''
|
||||
rm $out/share/doc/mpc/contrib/mpc-completion.bash
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "A minimalist command line interface to MPD";
|
||||
homepage = "https://www.musicpd.org/clients/mpc/";
|
||||
license = licenses.gpl2;
|
||||
maintainers = with maintainers; [ algorith ];
|
||||
platforms = with platforms; linux ++ darwin;
|
||||
description = "A minimalist command line interface to MPD";
|
||||
changelog = "https://raw.githubusercontent.com/MusicPlayerDaemon/mpc/v${version}/NEWS";
|
||||
license = licenses.gpl2Plus;
|
||||
maintainers = with maintainers; [ AndersonTorres ];
|
||||
platforms = with platforms; unix;
|
||||
};
|
||||
}
|
||||
|
@ -631,6 +631,7 @@ mapAliases ({
|
||||
module_init_tools = kmod; # added 2016-04-22
|
||||
mozart = mozart2-binary; # added 2019-09-23
|
||||
mozart-binary = mozart2-binary; # added 2019-09-23
|
||||
mpc_cli = mpc-cli; # moved from top-level 2022-01-24
|
||||
mpd_clientlib = libmpdclient; # added 2021-02-11
|
||||
mpich2 = mpich; # added 2018-08-06
|
||||
msf = metasploit; # added 2018-04-25
|
||||
|
@ -27336,7 +27336,7 @@ with pkgs;
|
||||
|
||||
mpg321 = callPackage ../applications/audio/mpg321 { };
|
||||
|
||||
mpc_cli = callPackage ../applications/audio/mpc {
|
||||
mpc-cli = callPackage ../applications/audio/mpc {
|
||||
inherit (python3Packages) sphinx;
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user