summaryrefslogtreecommitdiff
path: root/package.nix
blob: 60dcd2f441039302cb28c8a26b6c67ff0becd702 (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
{
  doCheck ? true,
  lib,
  libGL,
  libxkbcommon,
  makeWrapper,
  naersk,
  pkg-config,
  xorg,
  ...
}:
naersk.buildPackage rec {
  name = "rustty";
  src = ./.;
  buildInputs = [
    # wayland graphics
    libGL
    libxkbcommon
    xorg.libXcursor
    xorg.libX11
  ];
  nativeBuildInputs = [
    pkg-config
    makeWrapper
  ];
  postInstall = ''
    wrapProgram "$out/bin/${meta.mainProgram}" --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath buildInputs}"
  '';

  # enables test suite
  inherit doCheck;

  meta = {
    mainProgram = "rustty";
    homepage = "https://mtgmonkey.net";
  };
}