NUR/pkgs/MangoHUD/default.nix

42 lines
909 B
Nix
Raw Normal View History

2020-04-04 16:29:45 +02:00
{ stdenv, lib, fetchFromGitHub
, pkgconfig, ninja, meson
, python3Packages, glslang, libglvnd
2020-04-14 20:45:20 +02:00
, xorg, git, vulkan-loader, vulkan-headers, mesa }:
2020-04-04 16:29:45 +02:00
let
version = "0.3.1";
in
stdenv.mkDerivation {
pname = "mangohud";
inherit version;
src = fetchFromGitHub {
fetchSubmodules = true;
owner = "flightlessmango";
repo = "MangoHud";
rev = "v${version}";
sha256 = "0sh5kvx3ww0m30zcqc1zjhcw8sqdzv6ay41fb35m7p07f82n95ys";
};
mesonFlags = [
"-Dappend_libdir_mangohud=false"
];
buildInputs = [
libglvnd glslang python3Packages.Mako
2020-04-14 20:45:20 +02:00
xorg.libX11 vulkan-loader vulkan-headers mesa
2020-04-04 16:29:45 +02:00
];
nativeBuildInputs = [
pkgconfig meson ninja
python3Packages.python python3Packages.Mako
git
];
postConfigure = ''
ln -sf "${vulkan-headers}/share/vulkan/registry" ./modules/Vulkan-Headers/
ln -sf "${vulkan-headers}/include" ./modules/Vulkan-Headers/
'';
}