From 2aed8df02806db5f88b76de64c7c9a475947aef9 Mon Sep 17 00:00:00 2001 From: Andreas Date: Wed, 13 Nov 2024 12:25:43 +0100 Subject: [PATCH] expresslrs-configurator: init at 1.7.2 Signed-off-by: Andreas --- maintainers/maintainer-list.nix | 6 ++ .../ex/expresslrs-configurator/package.nix | 101 ++++++++++++++++++ 2 files changed, 107 insertions(+) create mode 100644 pkgs/by-name/ex/expresslrs-configurator/package.nix diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index eb4de4a1f18b0..a962894e5002e 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -1926,6 +1926,12 @@ githubId = 21687187; name = "Mirza Arnaut"; }; + asamonik = { + email = "mail@asamonik.at"; + github = "asamonik"; + githubId = 49288593; + name = "Andreas"; + }; asbachb = { email = "asbachb-nixpkgs-5c2a@impl.it"; matrix = "@asbachb:matrix.org"; diff --git a/pkgs/by-name/ex/expresslrs-configurator/package.nix b/pkgs/by-name/ex/expresslrs-configurator/package.nix new file mode 100644 index 0000000000000..1f407cff89527 --- /dev/null +++ b/pkgs/by-name/ex/expresslrs-configurator/package.nix @@ -0,0 +1,101 @@ +{ + stdenv, + fetchzip, + autoPatchelfHook, + lib, + makeWrapper, + electron_33, + libgcc, + libstdcxx5, + musl, + libxc, + libxkbcommon, + alsa-lib, + at-spi2-core, + gcc, + nss, + nspr, + cups, + libdrm, + gtk3, + pango, + cairo, + xorg, + mesa, + libglvnd, + dbus, + libpulseaudio, + freetype, + fontconfig, + wayland, + wayland-protocols, + +}: + +let + electron = electron_33; +in +stdenv.mkDerivation rec { + pname = "expresslrs-configurator"; + version = "1.7.2"; + + src = fetchzip { + url = "https://github.com/ExpressLRS/ExpressLRS-Configurator/releases/download/v${version}/expresslrs-configurator-${version}.zip"; + stripRoot = false; + sha256 = "sha256-pXmJ420HeJaMjAZCzlIriuFrTK5xabxTrSy3PDVisgU="; + }; + + nativeBuildInputs = [ + autoPatchelfHook + makeWrapper + ]; + + buildInputs = [ + gcc + libgcc + libstdcxx5 + musl + libxc + libxkbcommon + alsa-lib + at-spi2-core + gcc + nss + nspr + cups + libdrm + gtk3 + pango + cairo + xorg.libXcomposite + xorg.libXdamage + xorg.libXfixes + xorg.libXrandr + mesa + libglvnd + dbus + libpulseaudio + freetype + fontconfig + wayland + wayland-protocols + ]; + + installPhase = '' + mkdir -p $out/bin $out/share/expresslrs-configurator/ + cp -r $src/{locales,resources}/* $out/share/expresslrs-configurator + + makeWrapper '${electron}/bin/electron' "$out/bin/expresslrs-configurator" \ + --add-flags "$out/share/expresslrs-configurator/app.asar" \ + --add-flags "--enable-logging --log-file=/tmp/electron-log.txt" \ + --add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto}}" + ''; + + meta = with lib; { + description = "Cross-platform build & configuration tool for ExpressLRS"; + homepage = "https://github.com/ExpressLRS/ExpressLRS-Configurator"; + license = licenses.gpl3Plus; + platforms = platforms.linux; + maintainers = with maintainers; [ asamonik ]; + }; +}