mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-17 07:13:23 +01:00
mangohud: init at 0.4.1
This commit is contained in:
parent
8d0340aee5
commit
5debc57760
3 changed files with 97 additions and 0 deletions
14
pkgs/tools/graphics/mangohud/combined.nix
Normal file
14
pkgs/tools/graphics/mangohud/combined.nix
Normal file
|
@ -0,0 +1,14 @@
|
|||
{ stdenv, pkgs, lib
|
||||
, libXNVCtrl
|
||||
}:
|
||||
let
|
||||
mangohud_64 = pkgs.callPackage ./default.nix { inherit libXNVCtrl; };
|
||||
mangohud_32 = pkgs.pkgsi686Linux.callPackage ./default.nix { inherit libXNVCtrl; };
|
||||
in
|
||||
pkgs.buildEnv rec {
|
||||
name = "mangohud-${mangohud_64.version}";
|
||||
|
||||
paths = [ mangohud_32 ] ++ lib.optionals stdenv.is64bit [ mangohud_64 ];
|
||||
|
||||
meta = mangohud_64.meta;
|
||||
}
|
79
pkgs/tools/graphics/mangohud/default.nix
Normal file
79
pkgs/tools/graphics/mangohud/default.nix
Normal file
|
@ -0,0 +1,79 @@
|
|||
{ stdenv
|
||||
, lib
|
||||
, fetchFromGitHub
|
||||
, fetchpatch
|
||||
, meson
|
||||
, ninja
|
||||
, pkg-config
|
||||
, python3Packages
|
||||
, dbus
|
||||
, glslang
|
||||
, libglvnd
|
||||
, libXNVCtrl
|
||||
, mesa
|
||||
, vulkan-headers
|
||||
, vulkan-loader
|
||||
, xorg
|
||||
}:
|
||||
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "mangohud${lib.optionalString stdenv.is32bit "_32"}";
|
||||
version = "0.4.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "flightlessmango";
|
||||
repo = "MangoHud";
|
||||
rev = "v${version}";
|
||||
sha256 = "04v2ps8n15ph2smjgnssax5hq88bszw2kbcff37cnd5c8yysvfi6";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
patches = [
|
||||
(fetchpatch {
|
||||
# FIXME obsolete in >=0.5.0
|
||||
url = "https://patch-diff.githubusercontent.com/raw/flightlessmango/MangoHud/pull/208.patch";
|
||||
sha256 = "1i6x6sr4az1zv0p6vpw99n947c7awgbbv087fghjlczhry676nmh";
|
||||
})
|
||||
];
|
||||
|
||||
mesonFlags = [
|
||||
"-Dappend_libdir_mangohud=false"
|
||||
"-Duse_system_vulkan=enabled"
|
||||
"--libdir=lib${lib.optionalString stdenv.is32bit "32"}"
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
dbus
|
||||
glslang
|
||||
libglvnd
|
||||
libXNVCtrl
|
||||
mesa
|
||||
python3Packages.Mako
|
||||
vulkan-headers
|
||||
vulkan-loader
|
||||
xorg.libX11
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
meson
|
||||
ninja
|
||||
pkg-config
|
||||
python3Packages.Mako
|
||||
python3Packages.python
|
||||
];
|
||||
|
||||
preConfigure = ''
|
||||
mkdir -p "$out/share/vulkan/"
|
||||
ln -sf "${vulkan-headers}/share/vulkan/registry/" $out/share/vulkan/
|
||||
ln -sf "${vulkan-headers}/include" $out
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "A Vulkan and OpenGL overlay for monitoring FPS, temperatures, CPU/GPU load and more";
|
||||
homepage = "https://github.com/flightlessmango/MangoHud";
|
||||
platforms = platforms.linux;
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ zeratax ];
|
||||
};
|
||||
}
|
|
@ -6532,6 +6532,10 @@ in
|
|||
|
||||
mandoc = callPackage ../tools/misc/mandoc { };
|
||||
|
||||
mangohud = callPackage ../tools/graphics/mangohud/combined.nix {
|
||||
libXNVCtrl = linuxPackages.nvidia_x11.settings.libXNVCtrl;
|
||||
};
|
||||
|
||||
manix = callPackage ../tools/nix/manix {
|
||||
inherit (darwin.apple_sdk.frameworks) Security;
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue