From 4363d5a0f58fb6f1e46520e8435efe4620dfc7a4 Mon Sep 17 00:00:00 2001 From: K900 Date: Sat, 27 Jul 2024 17:50:21 +0300 Subject: [PATCH 01/14] linux/update-mainline: always pick the latest kernel on a branch Also clean up stringy version handling a bit --- .../linux/kernel/update-mainline.py | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/pkgs/os-specific/linux/kernel/update-mainline.py b/pkgs/os-specific/linux/kernel/update-mainline.py index bf5001ee378a..79ac283faab6 100755 --- a/pkgs/os-specific/linux/kernel/update-mainline.py +++ b/pkgs/os-specific/linux/kernel/update-mainline.py @@ -1,5 +1,6 @@ #!/usr/bin/env nix-shell #!nix-shell -i python3 -p "python3.withPackages (ps: [ ps.beautifulsoup4 ps.lxml ps.packaging ])" +from itertools import groupby import json import os import pathlib @@ -11,7 +12,7 @@ from enum import Enum from bs4 import BeautifulSoup, NavigableString, Tag from packaging.version import parse as parse_version, Version -from typing import List + HERE = pathlib.Path(__file__).parent ROOT = HERE.parent.parent.parent.parent @@ -41,7 +42,7 @@ def parse_release(release: Tag) -> KernelRelease | None: except KeyError: return None - version = columns[1].get_text().rstrip(" [EOL]") + version = parse_version(columns[1].get_text().rstrip(" [EOL]")) date = columns[2].get_text() link = columns[3].find("a") if link is not None and isinstance(link, Tag): @@ -59,13 +60,12 @@ def parse_release(release: Tag) -> KernelRelease | None: ) -def get_branch(version: str): +def get_branch(version: Version): # This is a testing kernel. - if "rc" in version: + if version.is_prerelease: return "testing" else: - major, minor, *_ = version.split(".") - return f"{major}.{minor}" + return f"{version.major}.{version.minor}" def get_hash(kernel: KernelRelease): @@ -113,11 +113,11 @@ def main(): oldest_branch = get_oldest_branch() - for kernel in parsed_releases: - branch = get_branch(kernel.version) + for (branch, kernels) in groupby(parsed_releases, lambda kernel: get_branch(kernel.version)): + kernel = max(kernels, key=lambda kernel: kernel.version) nixpkgs_branch = branch.replace(".", "_") - old_version = all_kernels.get(branch, {}).get("version") + old_version = parse_version(all_kernels.get(branch, {}).get("version")) if old_version == kernel.version: print(f"linux_{nixpkgs_branch}: {kernel.version} is latest, skipping...") continue @@ -144,7 +144,7 @@ def main(): print(message, file=sys.stderr) all_kernels[branch] = { - "version": kernel.version, + "version": str(kernel.version), "hash": get_hash(kernel), } From bb712c9d21ab282adf644fff3fa3109263df528c Mon Sep 17 00:00:00 2001 From: K900 Date: Sat, 27 Jul 2024 17:55:12 +0300 Subject: [PATCH 02/14] linux_6_10: 6.10.1 -> 6.10.2 --- pkgs/os-specific/linux/kernel/kernels-org.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/linux/kernel/kernels-org.json b/pkgs/os-specific/linux/kernel/kernels-org.json index bc585f07c021..e18ed6884807 100644 --- a/pkgs/os-specific/linux/kernel/kernels-org.json +++ b/pkgs/os-specific/linux/kernel/kernels-org.json @@ -36,7 +36,7 @@ "hash": "sha256:1q8kyn9cxc1ykf3cvifmfqk2p2p4x53l7h704hh92gichgh89pyy" }, "6.10": { - "version": "6.10.1", - "hash": "sha256:0szpkhrwfqwj068vz032daf3zycv5c93gjxiisjziifi3kyrs43h" + "version": "6.10.2", + "hash": "sha256:0w4vsb0c8bp34j90l89qms50nx6r6mmyf23jbvyar9fbv46m5n3k" } } From a0213dc9eec14d96b00978d378b3a98370db1ac8 Mon Sep 17 00:00:00 2001 From: K900 Date: Sat, 27 Jul 2024 17:59:43 +0300 Subject: [PATCH 03/14] linux_6_9: 6.9.11 -> 6.9.12 --- pkgs/os-specific/linux/kernel/kernels-org.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/linux/kernel/kernels-org.json b/pkgs/os-specific/linux/kernel/kernels-org.json index e18ed6884807..1b741d4665cd 100644 --- a/pkgs/os-specific/linux/kernel/kernels-org.json +++ b/pkgs/os-specific/linux/kernel/kernels-org.json @@ -32,8 +32,8 @@ "hash": "sha256:0fb0m0fv4521g63gq04d7lm6hy8169s1rykiav5bkd99s9b1kcqr" }, "6.9": { - "version": "6.9.11", - "hash": "sha256:1q8kyn9cxc1ykf3cvifmfqk2p2p4x53l7h704hh92gichgh89pyy" + "version": "6.9.12", + "hash": "sha256:08ngskni7d9wi93vlwcmbdg7sb2jl1drhhzn62k9nsrg1r7crrss" }, "6.10": { "version": "6.10.2", From 09be196858c98e9c82602e509a0566ec64de292a Mon Sep 17 00:00:00 2001 From: K900 Date: Sat, 27 Jul 2024 18:02:00 +0300 Subject: [PATCH 04/14] linux_6_6: 6.6.42 -> 6.6.43 --- pkgs/os-specific/linux/kernel/kernels-org.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/linux/kernel/kernels-org.json b/pkgs/os-specific/linux/kernel/kernels-org.json index 1b741d4665cd..3fbf40f939ee 100644 --- a/pkgs/os-specific/linux/kernel/kernels-org.json +++ b/pkgs/os-specific/linux/kernel/kernels-org.json @@ -24,8 +24,8 @@ "hash": "sha256:14vl0288apl76rvxa9yxfggrc4600bjsn4gw097m4gy5ldiaapqd" }, "6.6": { - "version": "6.6.42", - "hash": "sha256:10z6fjvpiv3l11rpsd6fgi7dr6a3d38c6zlp8ihffx6pjz1ch0c8" + "version": "6.6.43", + "hash": "sha256:0pha226h5011kl5r2iiddxi0rib3xraslmcdjjnil2kq38d3pn0a" }, "6.8": { "version": "6.8.12", From 4325dfa68b8557170437d409c458a52c1d70f03e Mon Sep 17 00:00:00 2001 From: K900 Date: Sat, 27 Jul 2024 18:05:31 +0300 Subject: [PATCH 05/14] linux_6_1: 6.1.101 -> 6.1.102 --- pkgs/os-specific/linux/kernel/kernels-org.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/linux/kernel/kernels-org.json b/pkgs/os-specific/linux/kernel/kernels-org.json index 3fbf40f939ee..74593ce6b03a 100644 --- a/pkgs/os-specific/linux/kernel/kernels-org.json +++ b/pkgs/os-specific/linux/kernel/kernels-org.json @@ -4,8 +4,8 @@ "hash": "sha256:0i29ga9lzqd4zcsbr4bbb122i8nyfhcalihnq3bgsg04dwb36s19" }, "6.1": { - "version": "6.1.101", - "hash": "sha256:0k5kjb2n78dcfpqqj8n76fxqbmifs2gqd2z1g9had7s2d2m9yigi" + "version": "6.1.102", + "hash": "sha256:1v4p4i8pfg4i6v90dr7m65npkxjnqv3fxcj8zs3pbb8y84xzk98v" }, "5.15": { "version": "5.15.163", From 8001e344d5661995b9d7ad9d7e7e2c9902c0afc5 Mon Sep 17 00:00:00 2001 From: K900 Date: Sat, 27 Jul 2024 18:09:22 +0300 Subject: [PATCH 06/14] linux_5_15: 5.15.163 -> 5.15.164 --- pkgs/os-specific/linux/kernel/kernels-org.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/linux/kernel/kernels-org.json b/pkgs/os-specific/linux/kernel/kernels-org.json index 74593ce6b03a..d8f589bd26b2 100644 --- a/pkgs/os-specific/linux/kernel/kernels-org.json +++ b/pkgs/os-specific/linux/kernel/kernels-org.json @@ -8,8 +8,8 @@ "hash": "sha256:1v4p4i8pfg4i6v90dr7m65npkxjnqv3fxcj8zs3pbb8y84xzk98v" }, "5.15": { - "version": "5.15.163", - "hash": "sha256:00mkipkhz0i5xld7kyaxcj8cj8faw4gmjl5fribg832nn7ccfpq2" + "version": "5.15.164", + "hash": "sha256:11linb9jzarr8wz0vim3g9gkhi5ldqm82bkpl5xs9f34xpx9hq7c" }, "5.10": { "version": "5.10.222", From 36936581908f32cda4cbe9b4f52b42238c20d2df Mon Sep 17 00:00:00 2001 From: K900 Date: Sat, 27 Jul 2024 18:10:27 +0300 Subject: [PATCH 07/14] linux_5_10: 5.10.222 -> 5.10.223 --- pkgs/os-specific/linux/kernel/kernels-org.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/linux/kernel/kernels-org.json b/pkgs/os-specific/linux/kernel/kernels-org.json index d8f589bd26b2..19d3e964fa6a 100644 --- a/pkgs/os-specific/linux/kernel/kernels-org.json +++ b/pkgs/os-specific/linux/kernel/kernels-org.json @@ -12,8 +12,8 @@ "hash": "sha256:11linb9jzarr8wz0vim3g9gkhi5ldqm82bkpl5xs9f34xpx9hq7c" }, "5.10": { - "version": "5.10.222", - "hash": "sha256:1jshn64g165rdshyjvq38ni6pkbskp50048pbz407fss7f00cbbv" + "version": "5.10.223", + "hash": "sha256:189b3yl4lsjzh6qpza0phj8hgsvnyh38cgrd70rnqw3rddmdh2fa" }, "5.4": { "version": "5.4.280", From 4ab6a7935deec4f6c37e44bf34ad4ffb4bf6dd01 Mon Sep 17 00:00:00 2001 From: K900 Date: Sat, 27 Jul 2024 18:10:30 +0300 Subject: [PATCH 08/14] linux_5_4: 5.4.280 -> 5.4.281 --- pkgs/os-specific/linux/kernel/kernels-org.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/linux/kernel/kernels-org.json b/pkgs/os-specific/linux/kernel/kernels-org.json index 19d3e964fa6a..7a295d99a466 100644 --- a/pkgs/os-specific/linux/kernel/kernels-org.json +++ b/pkgs/os-specific/linux/kernel/kernels-org.json @@ -16,8 +16,8 @@ "hash": "sha256:189b3yl4lsjzh6qpza0phj8hgsvnyh38cgrd70rnqw3rddmdh2fa" }, "5.4": { - "version": "5.4.280", - "hash": "sha256:0hix0dywf2ybvzxkijjsjmkrj7sx61hwq6mg1wqsq317p1zccxm9" + "version": "5.4.281", + "hash": "sha256:1ckja83km101h2dwlp86xrnnlzdzvjly48iywhy53xric3kw7824" }, "4.19": { "version": "4.19.318", From db09f89018e38b432418b938d8dc534847256527 Mon Sep 17 00:00:00 2001 From: K900 Date: Sat, 27 Jul 2024 18:10:33 +0300 Subject: [PATCH 09/14] linux_4_19: 4.19.318 -> 4.19.319 --- pkgs/os-specific/linux/kernel/kernels-org.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/linux/kernel/kernels-org.json b/pkgs/os-specific/linux/kernel/kernels-org.json index 7a295d99a466..3506d0937af8 100644 --- a/pkgs/os-specific/linux/kernel/kernels-org.json +++ b/pkgs/os-specific/linux/kernel/kernels-org.json @@ -20,8 +20,8 @@ "hash": "sha256:1ckja83km101h2dwlp86xrnnlzdzvjly48iywhy53xric3kw7824" }, "4.19": { - "version": "4.19.318", - "hash": "sha256:14vl0288apl76rvxa9yxfggrc4600bjsn4gw097m4gy5ldiaapqd" + "version": "4.19.319", + "hash": "sha256:0c7bhb31hpbbw1is1ykppk9lm0x025yyd4hrmlg1s6yg75rxqkal" }, "6.6": { "version": "6.6.43", From 1e5a635100917cd2cdafc2a932dd0b716beb7eaa Mon Sep 17 00:00:00 2001 From: K900 Date: Sat, 27 Jul 2024 18:10:51 +0300 Subject: [PATCH 10/14] linux-rt_5_15: 5.15.160-rt77 -> 5.15.163-rt78 --- pkgs/os-specific/linux/kernel/linux-rt-5.15.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/os-specific/linux/kernel/linux-rt-5.15.nix b/pkgs/os-specific/linux/kernel/linux-rt-5.15.nix index 127d7e663513..070a5714ee83 100644 --- a/pkgs/os-specific/linux/kernel/linux-rt-5.15.nix +++ b/pkgs/os-specific/linux/kernel/linux-rt-5.15.nix @@ -6,7 +6,7 @@ , ... } @ args: let - version = "5.15.160-rt77"; # updated by ./update-rt.sh + version = "5.15.163-rt78"; # updated by ./update-rt.sh branch = lib.versions.majorMinor version; kversion = builtins.elemAt (lib.splitString "-" version) 0; in buildLinux (args // { @@ -19,14 +19,14 @@ in buildLinux (args // { src = fetchurl { url = "mirror://kernel/linux/kernel/v5.x/linux-${kversion}.tar.xz"; - sha256 = "018v19a7rhzc4szybzzn86jlnk42x7jm6xkadfd2d3xq6f7727pl"; + sha256 = "00mkipkhz0i5xld7kyaxcj8cj8faw4gmjl5fribg832nn7ccfpq2"; }; kernelPatches = let rt-patch = { name = "rt"; patch = fetchurl { url = "mirror://kernel/linux/kernel/projects/rt/${branch}/older/patch-${version}.patch.xz"; - sha256 = "0id4m1k1xq84bxgnchm8r2iwfqw6nacv5n1ksgyzj6q6v66ik3wk"; + sha256 = "030aycnrcnjhylkqj0wrfi992v2l26v17rgvxl16514zpdjmiv1x"; }; }; in [ rt-patch ] ++ kernelPatches; From a0ffb41a103b0a77cf0006bc75f6bebb9234004d Mon Sep 17 00:00:00 2001 From: PPHyperion <38666687+PPHyperion@users.noreply.github.com> Date: Sat, 27 Jul 2024 18:44:46 +0200 Subject: [PATCH 11/14] osu-lazer: 2024.726.0 -> 2024.727.0 --- pkgs/games/osu-lazer/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/games/osu-lazer/default.nix b/pkgs/games/osu-lazer/default.nix index 392836f9cfa8..831cb35bea64 100644 --- a/pkgs/games/osu-lazer/default.nix +++ b/pkgs/games/osu-lazer/default.nix @@ -17,13 +17,13 @@ buildDotnetModule rec { pname = "osu-lazer"; - version = "2024.726.0"; + version = "2024.727.0"; src = fetchFromGitHub { owner = "ppy"; repo = "osu"; rev = version; - hash = "sha256-SakrmL8Cx+r2C1cNV0ZARwsdC2D8saO1TibDJbAyzxI="; + hash = "sha256-pw1UkP3VktQ2xFTBOcFAOGQuAOF+uGiU7rZsxKBQ10w="; }; projectFile = "osu.Desktop/osu.Desktop.csproj"; From cd4ec50142b993a277f86886721a0f93265480e6 Mon Sep 17 00:00:00 2001 From: PPHyperion <38666687+PPHyperion@users.noreply.github.com> Date: Sat, 27 Jul 2024 18:45:42 +0200 Subject: [PATCH 12/14] osu-lazer-bin: 2024.726.0 -> 2024.727.0 --- pkgs/games/osu-lazer/bin.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/games/osu-lazer/bin.nix b/pkgs/games/osu-lazer/bin.nix index 42ba68c851ed..016705ec962a 100644 --- a/pkgs/games/osu-lazer/bin.nix +++ b/pkgs/games/osu-lazer/bin.nix @@ -7,22 +7,22 @@ let pname = "osu-lazer-bin"; - version = "2024.726.0"; + version = "2024.727.0"; src = { aarch64-darwin = fetchzip { url = "https://github.com/ppy/osu/releases/download/${version}/osu.app.Apple.Silicon.zip"; - hash = "sha256-XsgKTBXfGFxbWyBdr/1BNP58p6VwMiTo3gblSkrilbY="; + hash = "sha256-yoNtCfL0wrwAUrwYTZLDsR7udUa82Jh1CIcgVQ8TBX4="; stripRoot = false; }; x86_64-darwin = fetchzip { url = "https://github.com/ppy/osu/releases/download/${version}/osu.app.Intel.zip"; - hash = "sha256-eeLrbaS/IiwLaRymwpQrHVDirCWcUBmVLHxA/K4V2SM="; + hash = "sha256-rdRGwD9tDxZFR8Qbd1bVG/YsbuMGZAj0roA9vRO+wQE="; stripRoot = false; }; x86_64-linux = fetchurl { url = "https://github.com/ppy/osu/releases/download/${version}/osu.AppImage"; - hash = "sha256-GhX0qSicoRbmHvtyAB37AGr2dWh4OCDJApi9RcUVzwY="; + hash = "sha256-wRahb7XvhdfP42iwyVsDGR8gFdsK9G8vDANS6Q3RySM="; }; }.${stdenv.system} or (throw "${pname}-${version}: ${stdenv.system} is unsupported."); From f31b6e87b767ad8297b172271c10e83b622f23ae Mon Sep 17 00:00:00 2001 From: Albert Safin Date: Sat, 27 Jul 2024 13:27:00 +0000 Subject: [PATCH 13/14] libreoffice-collabora: fix Hydra failure by splitting src derivation The Hydra build of the libreoffice-collabora derivation introduced in ab5bdfd3c67f ("libreoffice-collabora: init at 24.04.5-4") fails with the status "Output limit exceeded" [1], particularly at fetchgit of its sources. Indeed, the full checkout of the git repo along with its submodules takes 4.2 GB which is past the 3.4 GB Hydra's max_output_size [2]. Unfortunately, the Collabora branch lacks the tarball releases like the upstream fresh/still variants, so we still have to fetch these submodules. This commit gives up on the usage of fetchSubmodules and instead fetches the submodules using separate fetchgit calls. This makes the structure of the nix expression for the collabora variant closer to the fresh/still variants than the initial version of the collabora variant. [1]: https://hydra.nixos.org/build/267358376 [2]: https://github.com/NixOS/infra/blob/4b5dd4f974d3f707b64ad60793b8182e645631ed/build/hydra.nix#L51 --- .../office/libreoffice/default.nix | 12 +++--- .../office/libreoffice/src-collabora/help.nix | 6 +++ .../office/libreoffice/src-collabora/main.nix | 4 +- .../src-collabora/translations.nix | 6 +++ .../office/libreoffice/src-fresh/help.nix | 3 +- .../libreoffice/src-fresh/translations.nix | 3 +- .../office/libreoffice/src-still/help.nix | 3 +- .../libreoffice/src-still/translations.nix | 3 +- .../applications/office/libreoffice/update.sh | 41 +++++++++++++------ 9 files changed, 57 insertions(+), 24 deletions(-) create mode 100644 pkgs/applications/office/libreoffice/src-collabora/help.nix create mode 100644 pkgs/applications/office/libreoffice/src-collabora/translations.nix diff --git a/pkgs/applications/office/libreoffice/default.nix b/pkgs/applications/office/libreoffice/default.nix index 8b063ad6c70e..d5d48219beb7 100644 --- a/pkgs/applications/office/libreoffice/default.nix +++ b/pkgs/applications/office/libreoffice/default.nix @@ -200,9 +200,8 @@ let }) // { inherit (x) md5name md5; }) srcsAttributes.deps; - } // optionalAttrs (variant != "collabora") { - translations = fetchurl srcsAttributes.translations; - help = fetchurl srcsAttributes.help; + translations = srcsAttributes.translations { inherit fetchurl fetchgit; }; + help = srcsAttributes.help { inherit fetchurl fetchgit; }; }; qtMajor = lib.versions.major qtbase.version; @@ -235,14 +234,17 @@ in stdenv.mkDerivation (finalAttrs: { ln -sfv ${f} $sourceRoot/${tarballPath}/${f.md5name} ln -sfv ${f} $sourceRoot/${tarballPath}/${f.name} '')} - '' + optionalString (variant != "collabora") '' + '' + (if (variant != "collabora") then '' ln -sv ${srcs.help} $sourceRoot/${tarballPath}/${srcs.help.name} ln -svf ${srcs.translations} $sourceRoot/${tarballPath}/${srcs.translations.name} tar -xf ${srcs.help} tar -xf ${srcs.translations} - ''; + '' else '' + cp -r --no-preserve=mode ${srcs.help}/. $sourceRoot/helpcontent2/ + cp -r --no-preserve=mode ${srcs.translations}/. $sourceRoot/translations/ + ''); patches = [ # Skip some broken tests: diff --git a/pkgs/applications/office/libreoffice/src-collabora/help.nix b/pkgs/applications/office/libreoffice/src-collabora/help.nix new file mode 100644 index 000000000000..fc5d4a3fa2a0 --- /dev/null +++ b/pkgs/applications/office/libreoffice/src-collabora/help.nix @@ -0,0 +1,6 @@ +{ fetchgit, ... }: +fetchgit { + url = "https://gerrit.libreoffice.org/help"; + rev = "27f62cdb52fe23f6090a3249fcd1433777b2598d"; + hash = "sha256-lyBuj7FI1jwVLLBkB6JJcmQVtm1FKExYWvRUoGqRbJ0="; +} diff --git a/pkgs/applications/office/libreoffice/src-collabora/main.nix b/pkgs/applications/office/libreoffice/src-collabora/main.nix index 7e4bf5f4fdd0..ef4d5d77bfc1 100644 --- a/pkgs/applications/office/libreoffice/src-collabora/main.nix +++ b/pkgs/applications/office/libreoffice/src-collabora/main.nix @@ -2,6 +2,6 @@ fetchgit { url = "https://gerrit.libreoffice.org/core"; rev = "refs/tags/cp-24.04.5-4"; - hash = "sha256-27uLK1u8XWNigxZUCUu8nNZP3p5eFUsS2gCcfSYJK2k="; - fetchSubmodules = true; + hash = "sha256-OJ3R8qs8/R8QnXGCRgn/ZJK7Nn8cWwYbZxjEWg0VpBc="; + fetchSubmodules = false; } diff --git a/pkgs/applications/office/libreoffice/src-collabora/translations.nix b/pkgs/applications/office/libreoffice/src-collabora/translations.nix new file mode 100644 index 000000000000..06f5fe5a3624 --- /dev/null +++ b/pkgs/applications/office/libreoffice/src-collabora/translations.nix @@ -0,0 +1,6 @@ +{ fetchgit, ... }: +fetchgit { + url = "https://gerrit.libreoffice.org/translations"; + rev = "5fd34a953e6861cb8e392363c0a3500059ed6b01"; + hash = "sha256-1j0kTvPbytsCWszXz+xFE+n53zPkR8gNgVaawn+rjfI="; +} diff --git a/pkgs/applications/office/libreoffice/src-fresh/help.nix b/pkgs/applications/office/libreoffice/src-fresh/help.nix index 164121f06165..0f9f54905270 100644 --- a/pkgs/applications/office/libreoffice/src-fresh/help.nix +++ b/pkgs/applications/office/libreoffice/src-fresh/help.nix @@ -1,4 +1,5 @@ -{ +{ fetchurl, ... }: +fetchurl { sha256 = "090pi8dnj5izpvng94hgmjid14n7xvy3rlqqvang3pqdn35xnpsl"; url = "https://download.documentfoundation.org/libreoffice/src/24.2.5/libreoffice-help-24.2.5.2.tar.xz"; } diff --git a/pkgs/applications/office/libreoffice/src-fresh/translations.nix b/pkgs/applications/office/libreoffice/src-fresh/translations.nix index 82291fab8326..b96943060182 100644 --- a/pkgs/applications/office/libreoffice/src-fresh/translations.nix +++ b/pkgs/applications/office/libreoffice/src-fresh/translations.nix @@ -1,4 +1,5 @@ -{ +{ fetchurl, ... }: +fetchurl { sha256 = "0fri41y59zhm8lq0kh6hvf5rpdjdqx0lg1sl40mhh1d6lf1izc1w"; url = "https://download.documentfoundation.org/libreoffice/src/24.2.5/libreoffice-translations-24.2.5.2.tar.xz"; } diff --git a/pkgs/applications/office/libreoffice/src-still/help.nix b/pkgs/applications/office/libreoffice/src-still/help.nix index f9e71ea79936..8bdc4617e148 100644 --- a/pkgs/applications/office/libreoffice/src-still/help.nix +++ b/pkgs/applications/office/libreoffice/src-still/help.nix @@ -1,4 +1,5 @@ -{ +{ fetchurl, ... }: +fetchurl { sha256 = "1l543k603mbr3rnwlnv9j52mblmvkgj9y49w4v7w3xm8b15331rs"; url = "https://download.documentfoundation.org/libreoffice/src/7.6.7/libreoffice-help-7.6.7.2.tar.xz"; } diff --git a/pkgs/applications/office/libreoffice/src-still/translations.nix b/pkgs/applications/office/libreoffice/src-still/translations.nix index 9604ad622e21..fffb89108f09 100644 --- a/pkgs/applications/office/libreoffice/src-still/translations.nix +++ b/pkgs/applications/office/libreoffice/src-still/translations.nix @@ -1,4 +1,5 @@ -{ +{ fetchurl, ... }: +fetchurl { sha256 = "1bzmpa04bv8afhl3p68dlicamh0zyckmbdgqb3v72fjmx2h8i64a"; url = "https://download.documentfoundation.org/libreoffice/src/7.6.7/libreoffice-translations-7.6.7.2.tar.xz"; } diff --git a/pkgs/applications/office/libreoffice/update.sh b/pkgs/applications/office/libreoffice/update.sh index 6f9612dd7090..9f7a580ad56e 100755 --- a/pkgs/applications/office/libreoffice/update.sh +++ b/pkgs/applications/office/libreoffice/update.sh @@ -47,7 +47,8 @@ case $variant in echo \"$full_version\" > version.nix for t in help translations; do - echo "{" > $t.nix + echo "{ fetchurl, ... }:" > $t.nix + echo "fetchurl {" >> $t.nix echo " sha256 = "\"$(nix-prefetch-url $baseurl/libreoffice-$t-$full_version.tar.xz)'";' >> $t.nix echo " url = "\"$baseurl/libreoffice-$t-$full_version.tar.xz'";' >> $t.nix echo "}" >> $t.nix @@ -56,7 +57,7 @@ case $variant in # Out of loop nix-prefetch-url, because there is no $t, and we want the output # path as well, to get the download.lst file from there afterwards. main_path_hash=($(nix-prefetch-url --print-path $baseurl/libreoffice-$full_version.tar.xz)) - echo "{ fetchurl, ...}:" > main.nix + echo "{ fetchurl, ... }:" > main.nix echo "fetchurl {" >> main.nix echo " sha256 = "\"${main_path_hash[0]}'";' >> main.nix echo " url = "\"$baseurl/libreoffice-$full_version.tar.xz'";' >> main.nix @@ -78,27 +79,41 @@ case $variant in ;; (collabora) - full_version=$(git ls-remote --tags --sort -v:refname https://gerrit.libreoffice.org/core | grep -Pom1 'refs/tags/cp-\K\d+\.\d+\.\d+-\d+$') + all_tags=$(git ls-remote --tags --sort -v:refname https://gerrit.libreoffice.org/core) + rev=$(grep --perl-regexp --only-matching --max-count=1 \ + '\Krefs/tags/cp-\d+\.\d+\.\d+-\d+$' <<< "$all_tags") + full_version=${rev#refs/tags/cp-} echoerr full version is $full_version echo \"$full_version\" > version.nix - rev="refs/tags/cp-$full_version" + # The full checkout including the submodules is too big for Hydra, so we fetch + # submodules separately. + declare -A dirnames=([help]=helpcontent2 [translations]=translations) + for t in help translations; do + sub_rev=$(curl --silent "https://git.libreoffice.org/core/+/$rev/${dirnames[$t]}" |\ + pup '.gitlink-detail text{}' |\ + sed -n 's/^Submodule link to \([0-9a-f]\{40\}\) of .*/\1/p') + echoerr got rev $sub_rev for $t + prefetch_output=$(nix-prefetch-git "https://gerrit.libreoffice.org/$t" --rev "$sub_rev") + echo "{ fetchgit, ... }:" > $t.nix + echo "fetchgit {" >> $t.nix + echo " url = \"$(jq -r '.url' <<< "$prefetch_output")\";" >> $t.nix + echo " rev = \"$rev\";" >> $t.nix + echo " hash = \"$(jq -r '.hash' <<< "$prefetch_output")\";" >> $t.nix + echo "}" + done - prefetch_output=$(nix-prefetch-git https://gerrit.libreoffice.org/core --rev "$rev" --fetch-submodules) - fetched_git_path=$(echo "$prefetch_output" | jq -r '.path') - hash=$(echo "$prefetch_output" | jq -r '.hash') - - # Generate main.nix + local prefetch_output=$(nix-prefetch-git "https://gerrit.libreoffice.org/core" --rev "$rev") echo "{ fetchgit, ... }:" > main.nix echo "fetchgit {" >> main.nix - echo " url = \"https://gerrit.libreoffice.org/core\";" >> main.nix + echo " url = \"$(jq -r '.url' <<< "$prefetch_output")\";" >> main.nix echo " rev = \"$rev\";" >> main.nix - echo " hash = \"$hash\";" >> main.nix - echo " fetchSubmodules = true;" >> main.nix + echo " hash = \"$(jq -r '.hash' <<< "$prefetch_output")\";" >> main.nix + echo " fetchSubmodules = false;" >> main.nix echo "}" >> main.nix # Environment variable required by ../generate-libreoffice-srcs.py - export downloadList="$fetched_git_path/download.lst" + export downloadList=$(jq -r '.path' <<< "$prefetch_output")/download.lst esac cd .. From 9e330e9464f71a50985325137e178d9d508df4ec Mon Sep 17 00:00:00 2001 From: Sigmanificient Date: Sat, 27 Jul 2024 17:37:52 +0200 Subject: [PATCH 14/14] python312Packages.pysrt: drop nose dependency --- .../python-modules/pysrt/default.nix | 22 +++++++++++++------ 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/pkgs/development/python-modules/pysrt/default.nix b/pkgs/development/python-modules/pysrt/default.nix index d94e1fec3a74..9be5028a8787 100644 --- a/pkgs/development/python-modules/pysrt/default.nix +++ b/pkgs/development/python-modules/pysrt/default.nix @@ -2,14 +2,16 @@ lib, buildPythonPackage, fetchFromGitHub, + setuptools, chardet, - nose, + pytestCheckHook, + fetchpatch2, }: buildPythonPackage rec { pname = "pysrt"; version = "1.1.2"; - format = "setuptools"; + pyproject = true; src = fetchFromGitHub { owner = "byroot"; @@ -18,16 +20,22 @@ buildPythonPackage rec { sha256 = "1f5hxyzlh5mdvvi52qapys9qcinffr6ghgivb6k4jxa92cbs3mfg"; }; - nativeCheckInputs = [ nose ]; - checkPhase = '' - nosetests -v - ''; + patches = [ + (fetchpatch2 { + url = "https://github.com/byroot/pysrt/commit/93f52f6d4f70f4e18dc71deeaae0ec1e9100a50f.patch?full_index=1"; + hash = "sha256-nikMPwj3OHvl6LunAfRk6ZbFUvVgPwF696Dt8R7BY4U="; + }) + ]; + + build-system = [ setuptools ]; propagatedBuildInputs = [ chardet ]; + nativeCheckInputs = [ pytestCheckHook ]; + meta = with lib; { homepage = "https://github.com/byroot/pysrt"; - license = licenses.gpl3; + license = licenses.gpl3Only; description = "Python library used to edit or create SubRip files"; mainProgram = "srt"; };