mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-29 02:13:23 +00:00
switchres: init at 2.2.1 (#340709)
This commit is contained in:
commit
a4f42e5470
63
pkgs/by-name/sw/switchres/package.nix
Normal file
63
pkgs/by-name/sw/switchres/package.nix
Normal file
@ -0,0 +1,63 @@
|
||||
{
|
||||
stdenv,
|
||||
lib,
|
||||
pkg-config,
|
||||
fetchFromGitHub,
|
||||
xorg,
|
||||
libdrm,
|
||||
SDL2,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "switchres";
|
||||
version = "2.2.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "antonioginer";
|
||||
repo = "switchres";
|
||||
rev = "refs/tags/v${finalAttrs.version}";
|
||||
hash = "sha256-/21RcpumWYNBPck7gpH6krwC3Thz/rKDPgeJblN2BDA=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
pkg-config
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
xorg.libXrandr
|
||||
xorg.xorgproto
|
||||
libdrm
|
||||
SDL2
|
||||
];
|
||||
|
||||
patchPhase = ''
|
||||
runHook preHook
|
||||
|
||||
substituteInPlace ./custom_video_xrandr.cpp \
|
||||
--replace-fail libX11.so ${xorg.libX11}/lib/libX11.so \
|
||||
--replace-fail libXrandr.so ${xorg.libXrandr}/lib/libXrandr.so
|
||||
|
||||
substituteInPlace ./custom_video_drmkms.cpp \
|
||||
--replace-fail libdrm.so ${libdrm}/lib/libdrm.so \
|
||||
|
||||
runHook postHook
|
||||
'';
|
||||
|
||||
env = {
|
||||
PREFIX = "$(out)";
|
||||
};
|
||||
|
||||
preInstall = ''
|
||||
install -Dm755 switchres $out/bin/switchres
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Modeline generation engine for emulation";
|
||||
homepage = "https://github.com/antonioginer/switchres";
|
||||
changelog = "https://github.com/antonioginer/switchres/releases/tag/v${finalAttrs.version}";
|
||||
license = lib.licenses.gpl2Only;
|
||||
mainProgram = "switchres";
|
||||
maintainers = with lib.maintainers; [ bot-wxt1221 ];
|
||||
platforms = lib.platforms.linux;
|
||||
};
|
||||
})
|
Loading…
Reference in New Issue
Block a user