This commit is contained in:
dusk 2022-05-29 22:12:19 +03:00
parent de26fd16e8
commit cea4ee54fc
Signed by: dusk
GPG Key ID: 1D8F8FAF2294D6EA
4 changed files with 130 additions and 12 deletions

View File

@ -5,9 +5,6 @@
... ...
}: let }: let
l = lib; l = lib;
pkgs = import inputs.nixpkgs {
inherit system;
config.allowUnfree = true;
overlays = overlays =
l.mapAttrsToList l.mapAttrsToList
( (
@ -19,6 +16,21 @@
else o else o
) )
(l.readDir ./overlays); (l.readDir ./overlays);
newPkgs =
l.mapAttrsToList
(
name: _: final: prev: {
${l.removeSuffix ".nix" name} =
prev.callPackage
"${./pkgs}/${name}"
{inherit inputs;};
}
)
(l.readDir ./pkgs);
pkgs = import inputs.nixpkgs {
inherit system;
config.allowUnfree = true;
overlays = overlays ++ newPkgs;
}; };
pkgsToExport = import ./pkgs-to-export.nix; pkgsToExport = import ./pkgs-to-export.nix;
in in

View File

@ -1 +1 @@
["discord-system-electron" "fractal-next"] ["discord-system-electron" "fractal-next" "gamescope"]

104
pkgs-set/pkgs/gamescope.nix Normal file
View File

@ -0,0 +1,104 @@
{
lib,
stdenv,
fetchFromGitHub,
meson,
pkgconfig,
libdrm,
xorg,
wayland,
wayland-protocols,
libxkbcommon,
libcap,
SDL2,
mesa,
libinput,
pixman,
xcbutilerrors,
xcbutilwm,
glslang,
ninja,
makeWrapper,
xwayland,
libuuid,
xcbutilrenderutil,
pipewire,
stb,
writeText,
wlroots,
vulkan-loader,
vulkan-headers,
libseat,
...
}: let
stbpc = writeText "stbpc" ''
prefix=${stb}
includedir=''${prefix}/include/stb
Cflags: -I''${includedir}
Name: stb
Version: ${stb.version}
Description: stb
'';
stb_ = stb.overrideAttrs (oldAttrs: rec {
installPhase = ''
${oldAttrs.installPhase}
install -Dm644 ${stbpc} $out/lib/pkgconfig/stb.pc
'';
});
in
stdenv.mkDerivation rec {
pname = "gamescope";
version = "3.11.30";
src = fetchFromGitHub {
owner = "Plagman";
repo = "gamescope";
rev = version;
sha256 = "sha256-dSQrOlQfUZkA8Vrc/Tj9dAWIIBOeb+tAen21fZe3Gto=";
fetchSubmodules = true;
};
postInstall = ''
wrapProgram $out/bin/gamescope \
--prefix PATH : "${lib.makeBinPath [xwayland]}"
'';
buildInputs = with xorg; [
libX11
libXdamage
libXcomposite
libXrender
libXext
libXxf86vm
libXtst
libdrm
vulkan-loader
wayland
wayland-protocols
libxkbcommon
libcap
SDL2
mesa
libinput
pixman
xcbutilerrors
xcbutilwm
libXi
libXres
libuuid
xcbutilrenderutil
xwayland
pipewire
wlroots
libseat
];
nativeBuildInputs = [meson pkgconfig glslang ninja makeWrapper stb_];
meta = with lib; {
description = "The micro-compositor formerly known as steamcompmgr";
license = licenses.bsd2;
homepage = src.meta.homepage;
platforms = platforms.linux;
maintainers = with maintainers; [];
};
}

View File

@ -144,6 +144,7 @@ in {
dejavu_fonts dejavu_fonts
#(nerdfonts.override {fonts = [font.name];}) #(nerdfonts.override {fonts = [font.name];})
# Programs # Programs
gamescope
wezterm wezterm
cargo-outdated cargo-outdated
cargo-release cargo-release
@ -162,6 +163,7 @@ in {
mupdf mupdf
transmission-qt transmission-qt
lutris lutris
bottles
xdg_utils xdg_utils
tagref tagref
papirus-icon-theme papirus-icon-theme