linux-firmware: fix build, add explicit revision

K900 5a5ddf79 9516089c

+13 -4
+1 -1
pkgs/os-specific/linux/firmware/linux-firmware/default.nix
··· 11 version = source.version; 12 13 src = fetchzip { 14 - url = "https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/snapshot/linux-firmware-${version}.tar.gz"; 15 hash = source.sourceHash; 16 }; 17
··· 11 version = source.version; 12 13 src = fetchzip { 14 + url = "https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/snapshot/linux-firmware-${source.revision}.tar.gz"; 15 hash = source.sourceHash; 16 }; 17
+1
pkgs/os-specific/linux/firmware/linux-firmware/source.nix
··· 1 # This file is autogenerated! Run ./update.sh to regenerate. 2 { 3 version = "unstable-2023-07-24"; 4 sourceHash = "sha256-WyO/+fxQljfo6OXLC8/BomGmKtUQaJ1Lt9V5Fdv172g="; 5 outputHash = "sha256-wHWPSyqxP+MGmerbc2v/hclFFJ7qKCDsupK5GASjp8s="; 6 }
··· 1 # This file is autogenerated! Run ./update.sh to regenerate. 2 { 3 version = "unstable-2023-07-24"; 4 + revision = "59fbffa9ec8e4b0b31d2d13e715cf6580ad0e99c"; 5 sourceHash = "sha256-WyO/+fxQljfo6OXLC8/BomGmKtUQaJ1Lt9V5Fdv172g="; 6 outputHash = "sha256-wHWPSyqxP+MGmerbc2v/hclFFJ7qKCDsupK5GASjp8s="; 7 }
+11 -3
pkgs/os-specific/linux/firmware/linux-firmware/update.sh
··· 6 7 # step 1: figure out the latest version from the tags 8 if [ -z "${1:-}" ]; then 9 - version="$(git ls-remote --refs --tags --sort refname "$repo" | tail -n1 | cut -f2 | cut -d '/' -f3)" 10 else 11 - version=$1 12 fi 13 14 # step 2: prefetch the source tarball 15 - snapshotUrl="$repo/snapshot/linux-firmware-$version.tar.gz" 16 hash="$(nix-prefetch-url --unpack "$snapshotUrl")" 17 sriHash="$(nix --experimental-features nix-command hash to-sri "sha256:$hash")" 18 ··· 20 cat > source.nix << EOF 21 { 22 version = "$version"; 23 sourceHash = "$sriHash"; 24 outputHash = null; 25 } ··· 33 # This file is autogenerated! Run ./update.sh to regenerate. 34 { 35 version = "$version"; 36 sourceHash = "$sriHash"; 37 outputHash = "$outHash"; 38 }
··· 6 7 # step 1: figure out the latest version from the tags 8 if [ -z "${1:-}" ]; then 9 + revision="$(git ls-remote --refs --tags --sort refname "$repo" | tail -n1 | cut -f2 | cut -d '/' -f3)" 10 + version=$revision 11 else 12 + revision=$1 13 + if [ -z "${2:-}" ]; then 14 + version="unstable-$(date "+%Y-%m-%d")" 15 + else 16 + version=$2 17 + fi 18 fi 19 20 # step 2: prefetch the source tarball 21 + snapshotUrl="$repo/snapshot/linux-firmware-$revision.tar.gz" 22 hash="$(nix-prefetch-url --unpack "$snapshotUrl")" 23 sriHash="$(nix --experimental-features nix-command hash to-sri "sha256:$hash")" 24 ··· 26 cat > source.nix << EOF 27 { 28 version = "$version"; 29 + revision = "$revision"; 30 sourceHash = "$sriHash"; 31 outputHash = null; 32 } ··· 40 # This file is autogenerated! Run ./update.sh to regenerate. 41 { 42 version = "$version"; 43 + revision = "$revision"; 44 sourceHash = "$sriHash"; 45 outputHash = "$outHash"; 46 }