From e1d3c39e210df3bcd76f730992faf7cf987abf51 Mon Sep 17 00:00:00 2001 From: Mistyttm Date: Sat, 23 Nov 2024 02:06:10 +1000 Subject: [PATCH 1/2] maintainers: add mistyttm --- maintainers/maintainer-list.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index 5653007c42b0..e3b0344fd489 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -15407,6 +15407,12 @@ githubId = 780485; name = "Misty De Méo"; }; + mistyttm = { + name = "Emmey Rose"; + email = "contact@mistyttm.dev"; + github = "Mistyttm"; + githubId = 51770769; + }; misuzu = { email = "bakalolka@gmail.com"; github = "misuzu"; From b712cb1473384d4dfc1a114255b69e5fd68a0f3e Mon Sep 17 00:00:00 2001 From: Mistyttm Date: Sat, 23 Nov 2024 02:09:29 +1000 Subject: [PATCH 2/2] bs-manager: init at 1.5.2 --- pkgs/by-name/bs/bs-manager/package.nix | 95 ++++++++++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 pkgs/by-name/bs/bs-manager/package.nix diff --git a/pkgs/by-name/bs/bs-manager/package.nix b/pkgs/by-name/bs/bs-manager/package.nix new file mode 100644 index 000000000000..bedf992d0b23 --- /dev/null +++ b/pkgs/by-name/bs/bs-manager/package.nix @@ -0,0 +1,95 @@ +{ + asar, + autoPatchelfHook, + dpkg, + electron, + fetchurl, + lib, + makeWrapper, + nix-update-script, + openssl, + stdenv, + zlib, +}: +stdenv.mkDerivation (finalAttrs: { + pname = "bs-manager"; + version = "1.5.2"; + + src = + if stdenv.hostPlatform.system == "x86_64-linux" then + fetchurl { + url = "https://github.com/Zagrios/bs-manager/releases/download/v1.5.2/bs-manager_1.5.2_amd64.deb"; + hash = "sha256-rNqnEez56t4TPIKhljC0HEams2xhj6nB3CGW0CuQBKQ="; + } + else + throw "BSManager is not available for your platform"; + + # TODO: Package BSManager's fork of DepotDownloader and replace vendored binary at $out/opt/BSManager/resources/assets/scripts/DepotDownloader + # See https://github.com/Iluhadesu/DepotDownloader + + nativeBuildInputs = [ + asar + autoPatchelfHook # for vendored DepotDownloader + dpkg + makeWrapper + ]; + + buildInputs = [ + stdenv.cc.cc + zlib + ]; + + # DepotDownloader dlopen()s libssl + runtimeDependencies = [ + (lib.getLib openssl) + ]; + + dontConfigure = true; + dontBuild = true; + + installPhase = '' + runHook preInstall + + mkdir -p $out/opt/BSManager + cp -r opt/BSManager/{locales,resources} $out/opt/BSManager + cp -Tr usr/ $out + + # Some assets aren't included in the asar bundle. BSManager relies on + # process.resourcesPath to load some of these assets which we have to patch later + asar extract $out/opt/BSManager/resources/app.asar $out/opt/BSManager/resources + rm $out/opt/BSManager/resources/app.asar + + # Update desktop Exec entry + substituteInPlace $out/share/applications/bs-manager.desktop \ + --replace-fail Exec=/opt/BSManager/bs-manager Exec=bs-manager + + mkdir -p $out/bin + makeWrapper ${lib.getExe electron} $out/bin/bs-manager \ + --add-flags $out/opt/BSManager/resources \ + --add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations --enable-wayland-ime=true}}" \ + --inherit-argv0 + + runHook postInstall + ''; + + preFixup = '' + substituteInPlace "$out/opt/BSManager/resources/dist/main/main.js" \ + --replace-fail "process.resourcesPath" "'$out/opt/BSManager/resources'" + ''; + + passthru.updateScript = nix-update-script { }; + + meta = { + changelog = "https://github.com/Zagrios/bs-manager/blob/master/CHANGELOG.md"; + description = "Your Beat Saber Assistant"; + homepage = "https://github.com/Zagrios/bs-manager"; + license = lib.licenses.gpl3Only; + mainProgram = "bs-manager"; + maintainers = with lib.maintainers; [ + mistyttm + Scrumplex + ]; + platforms = [ "x86_64-linux" ]; + sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ]; + }; +})