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