discord: make update script work for all branches

This commit is contained in:
Artturin 2022-10-24 21:43:06 +03:00
parent 7b0122aede
commit 4433179127
3 changed files with 4 additions and 3 deletions

View file

@ -1,4 +1,4 @@
{ pname, version, src, openasar, meta, stdenv, binaryName, desktopName, lib, undmg, makeWrapper, withOpenASAR ? false }:
{ pname, version, src, openasar, meta, stdenv, binaryName, desktopName, lib, undmg, makeWrapper, branch, withOpenASAR ? false }:
stdenv.mkDerivation {
inherit pname version src meta;

View file

@ -69,7 +69,7 @@ let
(_: value:
callPackage package (value
// {
inherit src version openasar;
inherit src version openasar branch;
meta = meta // { mainProgram = value.binaryName; };
}))
{

View file

@ -5,6 +5,7 @@
, libXScrnSaver, libXcomposite, libXcursor, libXdamage, libXext, libXfixes
, libXi, libXrandr, libXrender, libXtst, libxcb, libxshmfence, mesa, nspr, nss
, pango, systemd, libappindicator-gtk3, libdbusmenu, writeScript, python3, runCommand
, branch
, common-updater-scripts, withOpenASAR ? false }:
let
@ -141,7 +142,7 @@ stdenv.mkDerivation rec {
}?platform=linux&format=tar.gz" | grep -oP 'location: \K\S+')
version=''${url##https://dl*.discordapp.net/apps/linux/}
version=''${version%%/*.tar.gz}
update-source-version ${pname} "$version" --file=./pkgs/applications/networking/instant-messengers/discord/default.nix
update-source-version ${pname} "$version" --file=./pkgs/applications/networking/instant-messengers/discord/default.nix --version-key=${branch}
'';
};
}