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 .. 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"; }; 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."); 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"; diff --git a/pkgs/os-specific/linux/kernel/kernels-org.json b/pkgs/os-specific/linux/kernel/kernels-org.json index bc585f07c021..3506d0937af8 100644 --- a/pkgs/os-specific/linux/kernel/kernels-org.json +++ b/pkgs/os-specific/linux/kernel/kernels-org.json @@ -4,39 +4,39 @@ "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", - "hash": "sha256:00mkipkhz0i5xld7kyaxcj8cj8faw4gmjl5fribg832nn7ccfpq2" + "version": "5.15.164", + "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", - "hash": "sha256:0hix0dywf2ybvzxkijjsjmkrj7sx61hwq6mg1wqsq317p1zccxm9" + "version": "5.4.281", + "hash": "sha256:1ckja83km101h2dwlp86xrnnlzdzvjly48iywhy53xric3kw7824" }, "4.19": { - "version": "4.19.318", - "hash": "sha256:14vl0288apl76rvxa9yxfggrc4600bjsn4gw097m4gy5ldiaapqd" + "version": "4.19.319", + "hash": "sha256:0c7bhb31hpbbw1is1ykppk9lm0x025yyd4hrmlg1s6yg75rxqkal" }, "6.6": { - "version": "6.6.42", - "hash": "sha256:10z6fjvpiv3l11rpsd6fgi7dr6a3d38c6zlp8ihffx6pjz1ch0c8" + "version": "6.6.43", + "hash": "sha256:0pha226h5011kl5r2iiddxi0rib3xraslmcdjjnil2kq38d3pn0a" }, "6.8": { "version": "6.8.12", "hash": "sha256:0fb0m0fv4521g63gq04d7lm6hy8169s1rykiav5bkd99s9b1kcqr" }, "6.9": { - "version": "6.9.11", - "hash": "sha256:1q8kyn9cxc1ykf3cvifmfqk2p2p4x53l7h704hh92gichgh89pyy" + "version": "6.9.12", + "hash": "sha256:08ngskni7d9wi93vlwcmbdg7sb2jl1drhhzn62k9nsrg1r7crrss" }, "6.10": { - "version": "6.10.1", - "hash": "sha256:0szpkhrwfqwj068vz032daf3zycv5c93gjxiisjziifi3kyrs43h" + "version": "6.10.2", + "hash": "sha256:0w4vsb0c8bp34j90l89qms50nx6r6mmyf23jbvyar9fbv46m5n3k" } } 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; 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), }