about summary refs log tree commit diff
path: root/nixpkgs/pkgs/by-name/sr/srm-cuarzo/package.nix
blob: 71aeb8e31601828e9ec5fa69a4d7446797353efb (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
61
62
{ lib
, stdenv
, fetchFromGitHub
, meson
, ninja
, pkg-config
, libdisplay-info
, libdrm
, libGL
, libinput
, mesa
, seatd
, udev
}:
stdenv.mkDerivation (self: {
  pname = "srm-cuarzo";
  version = "0.5.3-1";
  rev = "v${self.version}";
  hash = "sha256-KRp+rTpiUbOmUPE9vASwTF+c8TDveFnAEqptcGO5luc=";

  src = fetchFromGitHub {
    inherit (self) rev hash;
    owner = "CuarzoSoftware";
    repo = "SRM";
  };

  nativeBuildInputs = [
    meson
    ninja
    pkg-config
  ];

  buildInputs = [
    libdisplay-info
    libdrm
    libGL
    libinput
    mesa
    seatd
    udev
  ];

  outputs = [ "out" "dev" ];

  postPatch = ''
    substituteInPlace src/meson.build \
      --replace "/usr/include/drm" "${libdrm.dev}/include/drm" \
      --replace "/usr/include/libdrm" "${libdrm.dev}/include/libdrm"
  '';

  preConfigure = ''
    # The root meson.build file is in src/
    cd src
  '';

  meta = {
    description = "Simple Rendering Manager";
    homepage = "https://github.com/CuarzoSoftware/SRM";
    maintainers = [ lib.maintainers.dblsaiko ];
    platforms = lib.platforms.linux;
  };
})