diff options
author | Jörg Thalheim <Mic92@users.noreply.github.com> | 2021-08-19 09:17:44 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-19 09:17:44 +0100 |
commit | de5b6e117d15a067255109c8be46d4dab181b9a6 (patch) | |
tree | 11341f21528c468caf4eff9f16a05b66c341ded7 /pkgs/os-specific/linux/kernel | |
parent | cc5d3181c7c2d4dfd18184bff97ccb383b5ab868 (diff) | |
parent | e4db1c88471229f71aa529ff388e490e087f2cfe (diff) | |
download | nixpkgs-de5b6e117d15a067255109c8be46d4dab181b9a6.tar nixpkgs-de5b6e117d15a067255109c8be46d4dab181b9a6.tar.gz nixpkgs-de5b6e117d15a067255109c8be46d4dab181b9a6.tar.bz2 nixpkgs-de5b6e117d15a067255109c8be46d4dab181b9a6.tar.lz nixpkgs-de5b6e117d15a067255109c8be46d4dab181b9a6.tar.xz nixpkgs-de5b6e117d15a067255109c8be46d4dab181b9a6.tar.zst nixpkgs-de5b6e117d15a067255109c8be46d4dab181b9a6.zip |
Merge pull request #134708 from Mic92/zen
linuxPackages_zen: 5.13.9-zen1 -> 5.13.10-zen1
Diffstat (limited to 'pkgs/os-specific/linux/kernel')
-rw-r--r-- | pkgs/os-specific/linux/kernel/linux-zen.nix | 19 | ||||
-rwxr-xr-x | pkgs/os-specific/linux/kernel/update-zen.sh | 21 |
2 files changed, 33 insertions, 7 deletions
diff --git a/pkgs/os-specific/linux/kernel/linux-zen.nix b/pkgs/os-specific/linux/kernel/linux-zen.nix index 712f3f08895..70a9ecc6028 100644 --- a/pkgs/os-specific/linux/kernel/linux-zen.nix +++ b/pkgs/os-specific/linux/kernel/linux-zen.nix @@ -1,20 +1,25 @@ { lib, fetchFromGitHub, buildLinux, ... } @ args: let - version = "5.13.9"; - suffix = "zen1"; + # having the full version string here makes it easier to update + modDirVersion = "5.13.10-zen1"; + parts = lib.splitString "-" modDirVersion; + version = lib.elemAt parts 0; + suffix = lib.elemAt parts 1; + + numbers = lib.splitString "." version; + branch = "${lib.elemAt numbers 0}.${lib.elemAt numbers 1}"; in buildLinux (args // { - modDirVersion = "${version}-${suffix}"; - inherit version; + inherit version modDirVersion; isZen = true; src = fetchFromGitHub { owner = "zen-kernel"; repo = "zen-kernel"; - rev = "v${version}-${suffix}"; - sha256 = "sha256-RuY6ZIIKU56R+IGMtQDV6mIubGDqonRpsIdlrpAHFXM="; + rev = "v${modDirVersion}"; + sha256 = "sha256-0QNRWKB7tAWZR3wuKJf+es6WqjScSKnDrMwH74o2oOA="; }; structuredExtraConfig = with lib.kernel; { @@ -22,7 +27,7 @@ buildLinux (args // { }; extraMeta = { - branch = "5.13"; + inherit branch; maintainers = with lib.maintainers; [ atemu andresilva ]; description = "Built using the best configuration and kernel sources for desktop, multimedia, and gaming workloads."; }; diff --git a/pkgs/os-specific/linux/kernel/update-zen.sh b/pkgs/os-specific/linux/kernel/update-zen.sh new file mode 100755 index 00000000000..1532d7be02b --- /dev/null +++ b/pkgs/os-specific/linux/kernel/update-zen.sh @@ -0,0 +1,21 @@ +#! /usr/bin/env nix-shell +#! nix-shell -I nixpkgs=../../../.. -i bash -p nix-prefetch git gnused gnugrep nix curl +set -euo pipefail -x + +nixpkgs="$(git rev-parse --show-toplevel)" +old=$(nix-instantiate --eval -A linuxPackages_zen.kernel.modDirVersion "$nixpkgs") +old="${old%\"}" +old="${old#\"}" +new=$(curl https://github.com/zen-kernel/zen-kernel/releases.atom | grep -m1 -o -E '[0-9.]+-zen[0-9]+') +if [[ "$new" == "$old" ]]; then + echo "already up-to-date" + exit 0 +fi + +path="$nixpkgs/pkgs/os-specific/linux/kernel/linux-zen.nix" + +sed -i -e "s!modDirVersion = \".*\"!modDirVersion = \"${new}\"!" "$path" +checksum=$(nix-prefetch "(import ${nixpkgs} {}).linuxPackages_zen.kernel") +sed -i -e "s!sha256 = \".*\"!sha256 = \"${checksum}\"!" "$path" + +git commit -m "linux_zen: ${old} -> ${new}" $path |