Dear Members,
I was trying to compile latest drm-tip kernel using Nix, below is the code
boot.kernelPackages =
let
linux_pkg =
{ fetchgit, buildLinux, ... }@args:
buildLinux (
args
// rec {
version = "6.11.0";
modDirVersion = version;
src = fetchgit {
url = "https://anongit.freedesktop.org/git/drm-tip.git/";
rev = "e159ed9ab3ec08042286fb8af2560dbc540beccb";
sha256 = "sha256-52ixYCXYFIQLAB11eIEAlQXSFdltd0PKl2kGwnzPun8=";
};
kernelPatches = [ ];
}
// (args.argsOverride or { })
);
linux_6-11-0 = pkgs.callPackage linux_pkg { };
in
pkgs.recurseIntoAttrs (pkgs.linuxPackagesFor linux_6-11-0);
Getting below errors:
perf-linux> unpacking source archive /nix/store/cwy0r2nrqv48v44wfgc1ycwj4p9q7059-drm-tip-e159ed9
perf-linux> calling 'unpackCmd' function hook '_defaultUnpack' /nix/store/cwy0r2nrqv48v44wfgc1ycwj4p9q7059-drm-tip-e159ed9
perf-linux> source root is drm-tip-e159ed9
linux-config> source root is drm-tip-e159ed9
linux-config> calling 'postUnpack' function hook '_updateSourceDateEpochFromSourceRoot'
perf-linux> calling 'postUnpack' function hook '_updateSourceDateEpochFromSourceRoot'
perf-linux> Running phase: patchPhase
linux-config> Running phase: patchPhase
perf-linux> applying patch /nix/store/cklsdshnrdvfifqvh9v1wn403n18yds6-?id=0f0e1f44569061e3dc590cd0b8cb74d8fd53706b
linux-config> applying patch /nix/store/23728y7zgh1jb55kpwxv5qnjbq0ykca6-randstruct-provide-seed-5.19.patch
perf-linux> patching file tools/build/feature/test-libtracefs.c
linux-config> patching file scripts/gen-randstruct-seed.sh
perf-linux> Reversed (or previously applied) patch detected! Assume -R? [n]
perf-linux> Apply anyway? [n]
perf-linux> Skipping patch.
perf-linux> 1 out of 1 hunk ignored -- saving rejects to file tools/build/feature/test-libtracefs.c.rej
perf-linux> patching file tools/perf/Makefile.config
perf-linux> Hunk #1 FAILED at 183.
perf-linux> Hunk #2 FAILED at 1178.
linux-config> evaling implicit 'postPatch' string hook
perf-linux> Hunk #3 FAILED at 1194.
perf-linux> Hunk #4 FAILED at 1315.
perf-linux> 4 out of 4 hunks FAILED -- saving rejects to file tools/perf/Makefile.config.rej
error: builder for '/nix/store/i9s5m8064i7zc5fpaca1w77rjchnjq8d-perf-linux-6.11.0.drv' failed with exit code 1;
last 10 log lines:
> Reversed (or previously applied) patch detected! Assume -R? [n]
> Apply anyway? [n]
> Skipping patch.
> 1 out of 1 hunk ignored -- saving rejects to file tools/build/feature/test-libtracefs.c.rej
> patching file tools/perf/Makefile.config
> Hunk #1 FAILED at 183.
> Hunk #2 FAILED at 1178.
> Hunk #3 FAILED at 1194.
> Hunk #4 FAILED at 1315.
> 4 out of 4 hunks FAILED -- saving rejects to file tools/perf/Makefile.config.rej
For full logs, run 'nix log /nix/store/i9s5m8064i7zc5fpaca1w77rjchnjq8d-perf-linux-6.11.0.drv'.
error: 1 dependencies of derivation '/nix/store/lizcadgl8fppdq1jmfbafab0vycq94f9-system-path.drv' failed to build
error: 1 dependencies of derivation '/nix/store/ang3qdlcggm99awja9mqjjp99vywfmh7-nixos-system-gui-vm-24.11pre-git.drv' failed to build
error: 1 dependencies of derivation '/nix/store/x5iq3z5dycfkfdx0xbph41zvjssh7hc7-X-Restart-Triggers-microvm-gui-vm.drv' failed to build
error: 1 dependencies of derivation '/nix/store/c6kgprhqxqc42kxnjxiy0c2p76ga0f1r-unit-script-install-microvm-gui-vm-start.drv' failed to build
error: 1 dependencies of derivation '/nix/store/4ml10n18k5yk4hdifjbwgmibayk5nbmw-unit-install-microvm-gui-vm.service.drv' failed to build
error: 1 dependencies of derivation '/nix/store/4sfq2r44vifmjx2dg41yqaj6ba0lz88f-system-units.drv' failed to build
error: 1 dependencies of derivation '/nix/store/3lhwxqfgfy2vp5fzkwk7lscjpjfv8rfs-etc.drv' failed to build
error: 1 dependencies of derivation '/nix/store/ia2parwdk39a1rllgx3s3wlr0ic3ihz7-ghaf-host-disko-images.drv' failed to build
Additional Findings
I have tried adding postUnpack =":";
but it didn’t helped. Could NOT find way to skip applying patches.