From 44331791273ba9250d5511b2d2881ca642c1f645 Mon Sep 17 00:00:00 2001 From: Artturin Date: Mon, 24 Oct 2022 21:43:06 +0300 Subject: [PATCH 1/5] discord: make update script work for all branches --- .../networking/instant-messengers/discord/darwin.nix | 2 +- .../networking/instant-messengers/discord/default.nix | 2 +- .../networking/instant-messengers/discord/linux.nix | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/networking/instant-messengers/discord/darwin.nix b/pkgs/applications/networking/instant-messengers/discord/darwin.nix index fc75da46a388..7b1c2b9be9f8 100644 --- a/pkgs/applications/networking/instant-messengers/discord/darwin.nix +++ b/pkgs/applications/networking/instant-messengers/discord/darwin.nix @@ -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; diff --git a/pkgs/applications/networking/instant-messengers/discord/default.nix b/pkgs/applications/networking/instant-messengers/discord/default.nix index 3a2eae2a3fc4..4ede5a1a13d8 100644 --- a/pkgs/applications/networking/instant-messengers/discord/default.nix +++ b/pkgs/applications/networking/instant-messengers/discord/default.nix @@ -69,7 +69,7 @@ let (_: value: callPackage package (value // { - inherit src version openasar; + inherit src version openasar branch; meta = meta // { mainProgram = value.binaryName; }; })) { diff --git a/pkgs/applications/networking/instant-messengers/discord/linux.nix b/pkgs/applications/networking/instant-messengers/discord/linux.nix index 9ac36b66ff85..a6f0063efe4a 100644 --- a/pkgs/applications/networking/instant-messengers/discord/linux.nix +++ b/pkgs/applications/networking/instant-messengers/discord/linux.nix @@ -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} ''; }; } From f869098b67550eaf1752dc9592cc4daaef771c52 Mon Sep 17 00:00:00 2001 From: Artturin Date: Mon, 24 Oct 2022 21:45:33 +0300 Subject: [PATCH 2/5] discord-ptb: 0.0.29 -> 0.0.34 --- .../networking/instant-messengers/discord/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/networking/instant-messengers/discord/default.nix b/pkgs/applications/networking/instant-messengers/discord/default.nix index 4ede5a1a13d8..cee8eafbc9c5 100644 --- a/pkgs/applications/networking/instant-messengers/discord/default.nix +++ b/pkgs/applications/networking/instant-messengers/discord/default.nix @@ -2,7 +2,7 @@ let versions = if stdenv.isLinux then { stable = "0.0.21"; - ptb = "0.0.29"; + ptb = "0.0.34"; canary = "0.0.140"; } else { stable = "0.0.264"; @@ -18,7 +18,7 @@ let }; ptb = fetchurl { url = "https://dl-ptb.discordapp.net/apps/linux/${version}/discord-ptb-${version}.tar.gz"; - sha256 = "d78NnQZ3MkLje8mHrI6noH2iD2oEvSJ3cDnsmzQsUYc="; + sha256 = "CD6dLoBnlvhpwEFfLI9OqjhviZPj3xNDyPK9qBJUqck="; }; canary = fetchurl { url = "https://dl-canary.discordapp.net/apps/linux/${version}/discord-canary-${version}.tar.gz"; From ae54952c4e2d8e3cdebd2947bc07afb9ace4fee6 Mon Sep 17 00:00:00 2001 From: Artturin Date: Mon, 24 Oct 2022 21:59:19 +0300 Subject: [PATCH 3/5] nwg-wrapper: 0.1.2 -> 0.1.3 strictDeps can now be enabled because I fixed gobject-introspection's hook just make sure that gobject-introspection is in nativeBuildInputs --- pkgs/applications/misc/nwg-wrapper/default.nix | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/pkgs/applications/misc/nwg-wrapper/default.nix b/pkgs/applications/misc/nwg-wrapper/default.nix index 4e7f864f3eaa..2ff04c09b82e 100644 --- a/pkgs/applications/misc/nwg-wrapper/default.nix +++ b/pkgs/applications/misc/nwg-wrapper/default.nix @@ -2,13 +2,13 @@ python3Packages.buildPythonPackage rec { pname = "nwg-wrapper"; - version = "0.1.2"; + version = "0.1.3"; src = fetchFromGitHub { owner = "nwg-piotr"; repo = pname; - rev = "v${version}"; - sha256 = "114y55mv2rgnp75a3c7rk46v5v84d1zqb6wkha7x16ab6xa9phzl"; + rev = "refs/tags/v${version}"; + sha256 = "sha256-GKDAdjO67aedCEFHKDukQ+oPMomTPwFE/CvJu112fus="; }; nativeBuildInputs = [ gobject-introspection wrapGAppsHook ]; @@ -17,9 +17,6 @@ python3Packages.buildPythonPackage rec { propagatedBuildInputs = with python3Packages; [ i3ipc pygobject3 ]; - # ValueError: Namespace GtkLayerShell not available - strictDeps = false; - # No tests doCheck = false; From 6444c18e9ce2d4bc883b9b356952d701f77f2d6a Mon Sep 17 00:00:00 2001 From: Artturin Date: Mon, 24 Oct 2022 22:25:37 +0300 Subject: [PATCH 4/5] flashfocus: 2.2.3 -> 2.3.1 add updateScript --- pkgs/misc/flashfocus/default.nix | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/pkgs/misc/flashfocus/default.nix b/pkgs/misc/flashfocus/default.nix index b74464de4f68..67cde0924c29 100644 --- a/pkgs/misc/flashfocus/default.nix +++ b/pkgs/misc/flashfocus/default.nix @@ -1,12 +1,12 @@ -{ lib, python3, netcat-openbsd }: +{ lib, python3, netcat-openbsd, nix-update-script }: python3.pkgs.buildPythonApplication rec { pname = "flashfocus"; - version = "2.2.3"; + version = "2.3.1"; src = python3.pkgs.fetchPypi { inherit pname version; - sha256 = "0cn44hryvz2wl7xklaslxsb3l2i3f8jkgmml0n9v2ks22j5l4r4h"; + sha256 = "sha256-XT3CKJWn1uKnPPsJC+MWlEAd8sWdVTEXz5b3n0UUedY="; }; postPatch = '' @@ -36,6 +36,10 @@ python3.pkgs.buildPythonApplication rec { pythonImportsCheck = [ "flashfocus" ]; + passthru.updateScript = nix-update-script { + attrPath = pname; + }; + meta = with lib; { homepage = "https://github.com/fennerm/flashfocus"; description = "Simple focus animations for tiling window managers"; From 2900412c48d9859890dc9e28ef05e238ec44cd3f Mon Sep 17 00:00:00 2001 From: Artturin Date: Mon, 24 Oct 2022 22:42:50 +0300 Subject: [PATCH 5/5] libvarlink: 22 -> 23 --- .../libraries/libvarlink/default.nix | 26 ++++++++++++++----- 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/pkgs/development/libraries/libvarlink/default.nix b/pkgs/development/libraries/libvarlink/default.nix index 099fae07dac1..6bd397ff0d1a 100644 --- a/pkgs/development/libraries/libvarlink/default.nix +++ b/pkgs/development/libraries/libvarlink/default.nix @@ -4,17 +4,19 @@ , meson , ninja , python3 +, nix-update-script +, testers }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "libvarlink"; - version = "22"; + version = "23"; src = fetchFromGitHub { owner = "varlink"; - repo = pname; - rev = version; - sha256 = "1i15227vlc9k4276r833ndhxrcys9305pf6dga1j0alx2vj85yz2"; + repo = finalAttrs.pname; + rev = finalAttrs.version; + sha256 = "sha256-oUy9HhybNMjRBWoqqal1Mw8cC5RddgN4izxAl0cgnKE="; }; nativeBuildInputs = [ meson ninja ]; @@ -33,6 +35,18 @@ stdenv.mkDerivation rec { doCheck = true; + passthru = { + updateScript = nix-update-script { + attrPath = finalAttrs.pname; + }; + tests = { + version = testers.testVersion { + package = finalAttrs.finalPackage; + command = "varlink --version"; + }; + }; + }; + meta = with lib; { description = "C implementation of the Varlink protocol and command line tool"; homepage = "https://github.com/varlink/libvarlink"; @@ -40,4 +54,4 @@ stdenv.mkDerivation rec { maintainers = with maintainers; [ artturin ]; platforms = platforms.linux; }; -} +})