Files
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

63 lines
1.5 KiB
Nix

{
stdenvNoCC,
fetchFromGitLab,
lib,
python3,
rdfind,
which,
writeShellScriptBin,
}:
let
# check-whence.py attempts to call `git ls-files`, but we don't have a .git,
# because we've just downloaded a snapshot. We do, however, know that we're
# in a perfectly pristine tree, so we can fake just enough of git to run it.
gitStub = writeShellScriptBin "git" ''
if [ "$1" == "ls-files" ]; then
find -type f -printf "%P\n"
else
echo "Git stub called with unexpected arguments $@" >&2
exit 1
fi
'';
in
stdenvNoCC.mkDerivation rec {
pname = "linux-firmware";
version = "20250917";
src = fetchFromGitLab {
owner = "kernel-firmware";
repo = "linux-firmware";
tag = version;
hash = "sha256-tecFB6WYEfBK9FB7Rv8nHLdefIoaFnHrpzXBl+iSd08=";
};
postUnpack = ''
patchShebangs .
'';
nativeBuildInputs = [
gitStub
python3
rdfind
which
];
installTargets = [
"install"
"dedup"
];
makeFlags = [ "DESTDIR=$(out)" ];
# Firmware blobs do not need fixing and should not be modified
dontFixup = true;
meta = with lib; {
description = "Binary firmware collection packaged by kernel.org";
homepage = "https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git";
license = licenses.unfreeRedistributableFirmware;
platforms = platforms.linux;
maintainers = with maintainers; [ fpletz ];
priority = 6; # give precedence to kernel firmware
};
}