about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/wayland/hyprpaper/default.nix
blob: 188bf40fead1f05db8d93dd66829c3cc819c68f3 (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
52
53
54
55
56
57
58
59
60
{ lib
, stdenv
, fetchFromGitHub
, cmake
, pkg-config
, libjpeg
, mesa
, pango
, wayland
, wayland-protocols
, wayland-scanner
}:

stdenv.mkDerivation rec {
  pname = "hyprpaper";
  version = "unstable-2022-07-04";

  src = fetchFromGitHub {
    owner = "hyprwm";
    repo = pname;
    rev = "e15912e9817d79bb988085c88e313fac5ab60940";
    sha256 = "sha256-UZSRcj+CckUDllBtmlIcwA+xXUonpJZl3zC151IV3f0=";
  };

  nativeBuildInputs = [
    cmake
    pkg-config
    wayland-scanner
  ];

  buildInputs = [
    libjpeg
    mesa
    pango
    wayland
    wayland-protocols
  ];

  prePatch = ''
    substituteInPlace src/main.cpp \
      --replace GIT_COMMIT_HASH '"${src.rev}"'
  '';

  preConfigure = ''
    make protocols
  '';

  installPhase = ''
    mkdir -p $out/bin
    install -m755 ./hyprpaper $out/bin
  '';

  meta = with lib; {
    homepage = "https://github.com/hyprwm/hyprpaper";
    description = "A blazing fast wayland wallpaper utility";
    license = licenses.bsd3;
    platforms = platforms.linux;
    maintainers = with maintainers; [ wozeparrot ];
  };
}