fork
Configure Feed
Select the types of activity you want to include in your feed.
nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
fork
Configure Feed
Select the types of activity you want to include in your feed.
1{
2 stdenv,
3 lib,
4 pkg-config,
5 fetchFromGitHub,
6 libxrandr,
7 libx11,
8 xorgproto,
9 libdrm,
10 SDL2,
11}:
12
13stdenv.mkDerivation (finalAttrs: {
14 pname = "switchres";
15 version = "2.2.1";
16
17 src = fetchFromGitHub {
18 owner = "antonioginer";
19 repo = "switchres";
20 tag = "v${finalAttrs.version}";
21 hash = "sha256-/21RcpumWYNBPck7gpH6krwC3Thz/rKDPgeJblN2BDA=";
22 };
23
24 nativeBuildInputs = [
25 pkg-config
26 ];
27
28 buildInputs = [
29 libxrandr
30 xorgproto
31 libdrm
32 SDL2
33 ];
34
35 patchPhase = ''
36 runHook prePatch
37
38 substituteInPlace ./custom_video_xrandr.cpp \
39 --replace-fail libX11.so ${libx11}/lib/libX11.so \
40 --replace-fail libXrandr.so ${libxrandr}/lib/libXrandr.so
41
42 substituteInPlace ./custom_video_drmkms.cpp \
43 --replace-fail libdrm.so ${libdrm}/lib/libdrm.so \
44
45 runHook postPatch
46 '';
47
48 env = {
49 PREFIX = "$(out)";
50 };
51
52 preInstall = ''
53 install -Dm755 switchres $out/bin/switchres
54 '';
55
56 meta = {
57 description = "Modeline generation engine for emulation";
58 homepage = "https://github.com/antonioginer/switchres";
59 changelog = "https://github.com/antonioginer/switchres/releases/tag/v${finalAttrs.version}";
60 license = lib.licenses.gpl2Only;
61 mainProgram = "switchres";
62 maintainers = with lib.maintainers; [ bot-wxt1221 ];
63 platforms = lib.platforms.linux;
64 };
65})