mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-12-05 04:10:19 +00:00
antimicrox: 3.6.1 -> 3.6.2, modernize (#589281)
This commit is contained in:
@@ -1,56 +1,89 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
cmake,
|
||||
kdePackages,
|
||||
pkg-config,
|
||||
itstool,
|
||||
udevCheckHook,
|
||||
SDL2,
|
||||
libsForQt5,
|
||||
libxtst,
|
||||
fetchFromGitHub,
|
||||
SDL2,
|
||||
cmake,
|
||||
gettext,
|
||||
itstool,
|
||||
kdePackages,
|
||||
libx11,
|
||||
libxi,
|
||||
libxtst,
|
||||
nix-update-script,
|
||||
qt6,
|
||||
udevCheckHook,
|
||||
versionCheckHook,
|
||||
writableTmpDirAsHomeHook,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "antimicrox";
|
||||
version = "3.6.1";
|
||||
version = "3.6.2";
|
||||
|
||||
__structuredAttrs = true;
|
||||
strictDeps = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "AntiMicroX";
|
||||
repo = "antimicrox";
|
||||
rev = finalAttrs.version;
|
||||
sha256 = "sha256-frPXUTbD5Wk0Wo8E9L8Es5GCvWY55Qx0RGSkYDaVs6g=";
|
||||
tag = finalAttrs.version;
|
||||
hash = "sha256-Hy0AHg3foZnIbN4Xx8kwYhbg+Z+cjdop6lYdgYPRyts=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
kdePackages.extra-cmake-modules
|
||||
pkg-config
|
||||
itstool
|
||||
udevCheckHook
|
||||
libsForQt5.wrapQtAppsHook
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
SDL2
|
||||
libsForQt5.qttools
|
||||
libxtst
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace CMakeLists.txt \
|
||||
--replace "/usr/lib/udev/rules.d/" "$out/lib/udev/rules.d/"
|
||||
--replace-fail '"/usr/lib/udev/rules.d/"' "\"$out/lib/udev/rules.d/\""
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
gettext
|
||||
itstool
|
||||
qt6.qttools
|
||||
qt6.wrapQtAppsHook
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
kdePackages.extra-cmake-modules
|
||||
libx11
|
||||
libxi
|
||||
libxtst
|
||||
qt6.qtbase
|
||||
SDL2
|
||||
];
|
||||
|
||||
cmakeFlags = [
|
||||
(lib.cmakeBool "USE_QT6_BY_DEFAULT" true)
|
||||
(lib.cmakeBool "CHECK_FOR_UPDATES" false)
|
||||
(lib.cmakeFeature "ANTIMICROX_PKG_VERSION" finalAttrs.version)
|
||||
];
|
||||
|
||||
# upstream tests are Qt5-only and not built in CI
|
||||
doCheck = false;
|
||||
doInstallCheck = true;
|
||||
|
||||
nativeInstallCheckInputs = [
|
||||
udevCheckHook
|
||||
versionCheckHook
|
||||
writableTmpDirAsHomeHook
|
||||
];
|
||||
|
||||
preInstallCheck = ''
|
||||
export QT_QPA_PLATFORM=offscreen
|
||||
'';
|
||||
|
||||
versionCheckKeepEnvironment = "HOME QT_QPA_PLATFORM";
|
||||
|
||||
passthru.updateScript = nix-update-script { };
|
||||
|
||||
meta = {
|
||||
description = "GUI for mapping keyboard and mouse controls to a gamepad";
|
||||
inherit (finalAttrs.src.meta) homepage;
|
||||
maintainers = [ ];
|
||||
homepage = "https://github.com/AntiMicroX/antimicrox";
|
||||
changelog = "https://github.com/AntiMicroX/antimicrox/blob/${finalAttrs.src.tag}/CHANGELOG.md";
|
||||
license = lib.licenses.gpl3Plus;
|
||||
platforms = with lib.platforms; linux;
|
||||
maintainers = [ ];
|
||||
platforms = lib.platforms.linux;
|
||||
mainProgram = "antimicrox";
|
||||
};
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user