From 46ff324c24ffe729bdeb56fffb8981169d9be7e6 Mon Sep 17 00:00:00 2001 From: "Winston R. Milling" Date: Fri, 11 Oct 2024 15:53:48 -0500 Subject: [PATCH 1/2] legcord: init at 1.0.1 https://github.com/Legcord/Legcord/releases/tag/v1.0.0 https://github.com/Legcord/Legcord/releases/tag/v1.0.1 --- pkgs/by-name/le/legcord/package.nix | 141 ++++++++++++++++++++++++++++ 1 file changed, 141 insertions(+) create mode 100644 pkgs/by-name/le/legcord/package.nix diff --git a/pkgs/by-name/le/legcord/package.nix b/pkgs/by-name/le/legcord/package.nix new file mode 100644 index 0000000000000..453c42c8bbf5a --- /dev/null +++ b/pkgs/by-name/le/legcord/package.nix @@ -0,0 +1,141 @@ +{ lib +, stdenv +, fetchurl +, autoPatchelfHook +, dpkg +, makeBinaryWrapper +, wrapGAppsHook3 +, alsa-lib +, at-spi2-atk +, at-spi2-core +, atk +, cairo +, cups +, dbus +, expat +, ffmpeg +, fontconfig +, freetype +, gdk-pixbuf +, glib +, gtk3 +, libappindicator-gtk3 +, libdrm +, libnotify +, libpulseaudio +, libsecret +, libuuid +, libxkbcommon +, mesa +, nss +, pango +, systemd +, xdg-utils +, xorg +, wayland +, pipewire +}: + +stdenv.mkDerivation rec { + pname = "legcord"; + version = "1.0.1"; + + src = + let + base = "https://github.com/Legcord/Legcord/releases/download"; + in + { + x86_64-linux = fetchurl { + url = "${base}/v${version}/Legcord-${version}-linux-amd64.deb"; + hash = "sha256-kZ9dhSJjhYmpZJLbWP8nPP6Lxw+wLe3d9cCahfIomNM="; + }; + aarch64-linux = fetchurl { + url = "${base}/v${version}/Legcord-${version}-linux-arm64.deb"; + hash = "sha256-Ikyjmlt1F7f6WaYWuAgyzLP3zvQPCvMRZ1D9e79umgM="; + }; + }.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}"); + + nativeBuildInputs = [ autoPatchelfHook dpkg makeBinaryWrapper wrapGAppsHook3 ]; + + dontWrapGApps = true; + + buildInputs = [ + alsa-lib + at-spi2-atk + at-spi2-core + atk + cairo + cups + dbus + expat + ffmpeg + fontconfig + freetype + gdk-pixbuf + glib + gtk3 + pango + systemd + mesa # for libgbm + nss + libuuid + libdrm + libnotify + libsecret + libpulseaudio + libxkbcommon + libappindicator-gtk3 + xorg.libX11 + xorg.libxcb + xorg.libXcomposite + xorg.libXcursor + xorg.libXdamage + xorg.libXext + xorg.libXfixes + xorg.libXi + xorg.libXrandr + xorg.libXrender + xorg.libXScrnSaver + xorg.libxshmfence + xorg.libXtst + wayland + pipewire + ]; + + sourceRoot = "."; + unpackCmd = "dpkg-deb -x $src ."; + + installPhase = '' + runHook preInstall + + mkdir -p "$out/bin" + cp -R "opt" "$out" + cp -R "usr/share" "$out/share" + chmod -R g-w "$out" + + # Wrap the startup command + makeBinaryWrapper $out/opt/Legcord/legcord $out/bin/legcord \ + "''${gappsWrapperArgs[@]}" \ + --prefix XDG_DATA_DIRS : "${gtk3}/share/gsettings-schemas/${gtk3.name}/" \ + --add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform=wayland --enable-features=UseOzonePlatform --enable-features=WebRTCPipeWireCapturer }}" \ + --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath buildInputs}" \ + --suffix PATH : ${lib.makeBinPath [ xdg-utils ]} + + # Fix desktop link + substituteInPlace $out/share/applications/legcord.desktop \ + --replace /opt/Legcord/ $out/bin/ + + runHook postInstall + ''; + + meta = with lib; { + description = "Lightweight, alternative desktop client for Discord"; + homepage = "https://legcord.app"; + downloadPage = "https://github.com/Legcord/Legcord"; + sourceProvenance = with sourceTypes; [ binaryNativeCode ]; + license = licenses.osl3; + maintainers = with maintainers; [ wrmilling ]; + platforms = [ "x86_64-linux" "aarch64-linux" ]; + mainProgram = "legcord"; + }; +} From 0e4b0ab7f43f347871bda5ca2cb48ba3cbedea30 Mon Sep 17 00:00:00 2001 From: "Winston R. Milling" Date: Fri, 11 Oct 2024 15:54:32 -0500 Subject: [PATCH 2/2] armcord: remove, add throw with migration details https://github.com/Legcord/Legcord/releases/tag/v1.0.0 --- .../instant-messengers/armcord/default.nix | 141 ------------------ pkgs/top-level/aliases.nix | 1 + pkgs/top-level/all-packages.nix | 3 - 3 files changed, 1 insertion(+), 144 deletions(-) delete mode 100644 pkgs/applications/networking/instant-messengers/armcord/default.nix diff --git a/pkgs/applications/networking/instant-messengers/armcord/default.nix b/pkgs/applications/networking/instant-messengers/armcord/default.nix deleted file mode 100644 index 669c12b6fc37b..0000000000000 --- a/pkgs/applications/networking/instant-messengers/armcord/default.nix +++ /dev/null @@ -1,141 +0,0 @@ -{ lib -, stdenv -, fetchurl -, autoPatchelfHook -, dpkg -, makeBinaryWrapper -, wrapGAppsHook3 -, alsa-lib -, at-spi2-atk -, at-spi2-core -, atk -, cairo -, cups -, dbus -, expat -, ffmpeg -, fontconfig -, freetype -, gdk-pixbuf -, glib -, gtk3 -, libappindicator-gtk3 -, libdrm -, libnotify -, libpulseaudio -, libsecret -, libuuid -, libxkbcommon -, mesa -, nss -, pango -, systemd -, xdg-utils -, xorg -, wayland -, pipewire -}: - -stdenv.mkDerivation rec { - pname = "armcord"; - version = "3.3.1"; - - src = - let - base = "https://github.com/ArmCord/ArmCord/releases/download"; - in - { - x86_64-linux = fetchurl { - url = "${base}/v${version}/ArmCord-${version}-linux-amd64.deb"; - hash = "sha256-BFhgZNBHPERvJY9N4NpnlkGo2M0keencU4H4qlXl9mk="; - }; - aarch64-linux = fetchurl { - url = "${base}/v${version}/ArmCord-${version}-linux-arm64.deb"; - hash = "sha256-PCODruXQW7iAZLKcNw672fs4OuCqDvMlvzRSNca8Tfo="; - }; - }.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}"); - - nativeBuildInputs = [ autoPatchelfHook dpkg makeBinaryWrapper wrapGAppsHook3 ]; - - dontWrapGApps = true; - - buildInputs = [ - alsa-lib - at-spi2-atk - at-spi2-core - atk - cairo - cups - dbus - expat - ffmpeg - fontconfig - freetype - gdk-pixbuf - glib - gtk3 - pango - systemd - mesa # for libgbm - nss - libuuid - libdrm - libnotify - libsecret - libpulseaudio - libxkbcommon - libappindicator-gtk3 - xorg.libX11 - xorg.libxcb - xorg.libXcomposite - xorg.libXcursor - xorg.libXdamage - xorg.libXext - xorg.libXfixes - xorg.libXi - xorg.libXrandr - xorg.libXrender - xorg.libXScrnSaver - xorg.libxshmfence - xorg.libXtst - wayland - pipewire - ]; - - sourceRoot = "."; - unpackCmd = "dpkg-deb -x $src ."; - - installPhase = '' - runHook preInstall - - mkdir -p "$out/bin" - cp -R "opt" "$out" - cp -R "usr/share" "$out/share" - chmod -R g-w "$out" - - # Wrap the startup command - makeBinaryWrapper $out/opt/ArmCord/armcord $out/bin/armcord \ - "''${gappsWrapperArgs[@]}" \ - --prefix XDG_DATA_DIRS : "${gtk3}/share/gsettings-schemas/${gtk3.name}/" \ - --add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform=wayland --enable-features=UseOzonePlatform --enable-features=WebRTCPipeWireCapturer }}" \ - --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath buildInputs}" \ - --suffix PATH : ${lib.makeBinPath [ xdg-utils ]} - - # Fix desktop link - substituteInPlace $out/share/applications/armcord.desktop \ - --replace /opt/ArmCord/ $out/bin/ - - runHook postInstall - ''; - - meta = with lib; { - description = "Lightweight, alternative desktop client for Discord"; - homepage = "https://armcord.app"; - downloadPage = "https://github.com/ArmCord/ArmCord"; - sourceProvenance = with sourceTypes; [ binaryNativeCode ]; - license = licenses.osl3; - maintainers = with maintainers; [ wrmilling ]; - platforms = [ "x86_64-linux" "aarch64-linux" ]; - mainProgram = "armcord"; - }; -} diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index 4e5a8edb0b1eb..1fce31a50ee93 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -84,6 +84,7 @@ mapAliases ({ archiveopteryx = throw "archiveopteryx depended on an unsupported version of OpenSSL and was unmaintained"; # Added 2024-01-03 ardour_6 = throw "ardour_6 has been removed in favor of newer versions"; # Added 2023-10-13 aria = aria2; # Added 2024-03-26 + armcord = throw "ArmCord was renamed to legcord by the upstream developers. Action is required to migrate configurations between the two applications. Please see this PR for more details: https://github.com/NixOS/nixpkgs/pull/347971"; # Added 2024-10-11 aseprite-unfree = aseprite; # Added 2023-08-26 asls = throw "asls has been removed: abandoned by upstream"; # Added 2023-03-16 asterisk_16 = throw "asterisk_16: Asterisk 16 is end of life and has been removed"; # Added 2023-04-19 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index b816765816206..79be9b219577d 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -29720,9 +29720,6 @@ with pkgs; boost = boost175; }; - - armcord = callPackage ../applications/networking/instant-messengers/armcord { }; - aumix = callPackage ../applications/audio/aumix { gtkGUI = false; };