Skip to content

Commit

Permalink
freejoy-configurator-qt: init at 1.7.1b5
Browse files Browse the repository at this point in the history
  • Loading branch information
Pandapip1 committed Jan 14, 2025
1 parent ed890bd commit 5d34ce5
Showing 1 changed file with 64 additions and 0 deletions.
64 changes: 64 additions & 0 deletions pkgs/by-name/fr/freejoy-configurator-qt/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
{
lib,
stdenv,
fetchFromGitHub,
makeDesktopItem,
copyDesktopItems,
systemd,
qt6,
}:

stdenv.mkDerivation (finalAttrs: {
pname = "freejoy-configurator-qt";
version = "1.7.1b5";

src = fetchFromGitHub {
owner = "FreeJoy-Team";
repo = "FreeJoyConfiguratorQt";
tag = "v${finalAttrs.version}";
hash = "sha256-WlSBnUQb986tMFx0H/yXpW1Eb1kgUGujfgN+bZYh4ug=";
};

postPatch =
''
# Replace hardcoded bin install path
substituteInPlace src/src.pro \
--replace-fail '/opt/$$''
+ ''
{TARGET}/bin' "$out/bin"
'';

nativeBuildInputs = [
qt6.wrapQtAppsHook
qt6.qmake
copyDesktopItems
];
buildInputs = [
qt6.qtbase
] ++ (lib.optionals stdenv.isLinux [ systemd ]);

desktopItems = [
(makeDesktopItem {
name = "FreeJoy Configurator";
exec = "FreeJoyQt";
icon = "freejoy-configurator";
desktopName = "FreeJoy Configurator";
comment = "FreeJoy Configuration Tool";
categories = [ "Development" ];
})
];

postInstall = ''
mkdir -p $out/share/pixmaps
cp $src/src/Images/icon.png $out/share/pixmaps/freejoy-configurator.png
'';

meta = {
description = "Graphical utility to configure and set up FreeJoy controllers";
homepage = "https://github.com/FreeJoy-Team/FreeJoyConfiguratorQ";
license = lib.licenses.gpl3Plus;
mainProgram = "FreeJoyQt";
maintainers = with lib.maintainers; [ pandapip1 ];
platforms = lib.platforms.unix;
};
})

0 comments on commit 5d34ce5

Please sign in to comment.