about summary refs log tree commit diff
path: root/pkgs/by-name/mp/mpvc/package.nix
blob: 90b5c1d4b5eb8c879900ba9a28d81100e7784311 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
{
  lib,
  fetchFromGitHub,
  makeWrapper,
  socat,
  stdenv,
  testers,
}:

stdenv.mkDerivation (finalAttrs: {
  pname = "mpvc";
  version = "1.4-unstable-2024-07-09";

  src = fetchFromGitHub {
    owner = "gmt4";
    repo = "mpvc";
    rev = "966156dacd026cde220951d41c4ac5915cd6ad64";
    hash = "sha256-/M3xOb0trUaxJGXmV2+sOCbrHGyP4jpyo+S/oBoDkO0=";
  };

  nativeBuildInputs = [ makeWrapper ];

  buildInputs = [ socat ];

  outputs = [ "out" "doc" ];

  makeFlags = [ "PREFIX=$(out)" ];

  installFlags = [ "PREFIX=$(out)" ];

  strictDeps = true;

  postInstall = ''
    wrapProgram $out/bin/mpvc --prefix PATH : "${lib.getBin socat}/"
  '';

  # This is not Archlinux :)
  postFixup = ''
    rm -r $out/share/licenses
    rmdir $out/share || true
  '';

  meta = {
    homepage = "https://github.com/gmt4/mpvc";
    description = "Mpc-like control interface for mpv";
    license = lib.licenses.mit;
    mainProgram = "mpvc";
    maintainers = with lib.maintainers; [ AndersonTorres ];
    platforms = lib.platforms.linux;
  };
})