summaryrefslogtreecommitdiffstats
path: root/pkgs/by-name/mp/mpvpaper/package.nix
blob: 3323d7ff222a1dd7f1c0b06fc242468c50dc85d0 (plain)
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
{
  stdenv,
  lib,
  meson,
  ninja,
  wayland,
  wayland-protocols,
  wayland-scanner,
  egl-wayland,
  glew,
  mpv,
  pkg-config,
  fetchFromGitHub,
  makeWrapper,
  installShellFiles,
}:

stdenv.mkDerivation (finalAttrs: {
  pname = "mpvpaper";
  version = "1.9";

  src = fetchFromGitHub {
    owner = "GhostNaN";
    repo = "mpvpaper";
    rev = finalAttrs.version;
    sha256 = "sha256-FpwMhzYmbjwvbpJd6xDRka6h2bvgsqdopqP5deQKXSA=";
  };

  strictDeps = true;
  nativeBuildInputs = [
    meson
    ninja
    pkg-config
    makeWrapper
    installShellFiles
    wayland-scanner
  ];

  buildInputs = [
    wayland
    wayland-protocols
    egl-wayland
    glew
    mpv
  ];

  preInstall = ''
    mv ../mpvpaper.man ../mpvpaper.1
  '';

  postInstall = ''
    wrapProgram $out/bin/mpvpaper \
      --prefix PATH : ${lib.makeBinPath [ mpv ]}

    installManPage ../mpvpaper.1
  '';

  meta = {
    description = "Video wallpaper program for wlroots based wayland compositors";
    homepage = "https://github.com/GhostNaN/mpvpaper";
    license = lib.licenses.gpl3Only;
    platforms = lib.platforms.linux;
    mainProgram = "mpvpaper";
    maintainers = [ ];
  };
})