format
This commit is contained in:
@@ -1,53 +1,54 @@
|
||||
{ pkgs, config, ... }:
|
||||
let
|
||||
#amdgpu_module_pkg =
|
||||
# { pkgs, lib, fetchurl, kernel ? pkgs.linuxPackages_latest.kernel, ... }:
|
||||
#
|
||||
# pkgs.stdenv.mkDerivation {
|
||||
# pname = "amdgpu-kernel-module";
|
||||
# inherit (kernel) version postPatch nativeBuildInputs;
|
||||
# src = fetchurl {
|
||||
# url =
|
||||
# "https://gitlab.freedesktop.org/agd5f/linux/-/archive/amd-drm-next-6.15-2025-03-14/linux-amd-drm-next-6.15-2025-03-14.tar.gz";
|
||||
# # After the first build attempt, look for "hash mismatch" and then 2 lines below at the "got:" line.
|
||||
# # Use "sha256-....." value here.
|
||||
# hash = "sha256-/9EvJNBSKteXljrZzmaQkbZ7o4etCe0yFM3JJg/jD7o=";
|
||||
# };
|
||||
#
|
||||
# kernel_dev = kernel.dev;
|
||||
# kernelVersion = kernel.modDirVersion;
|
||||
#
|
||||
# modulePath = "drivers/gpu/drm/amd/amdgpu";
|
||||
#
|
||||
# buildPhase = ''
|
||||
# BUILT_KERNEL=$kernel_dev/lib/modules/$kernelVersion/build
|
||||
#
|
||||
# cp $BUILT_KERNEL/Module.symvers .
|
||||
# cp $BUILT_KERNEL/.config .
|
||||
# cp $kernel_dev/vmlinux .
|
||||
#
|
||||
# make "-j$NIX_BUILD_CORES" modules_prepare
|
||||
# make "-j$NIX_BUILD_CORES" M=$modulePath modules
|
||||
# '';
|
||||
#
|
||||
# installPhase = ''
|
||||
# make \
|
||||
# INSTALL_MOD_PATH="$out" \
|
||||
# XZ="xz -T$NIX_BUILD_CORES" \
|
||||
# M="$modulePath" \
|
||||
# modules_install
|
||||
# '';
|
||||
#
|
||||
# meta = {
|
||||
# description = "AMD GPU kernel module";
|
||||
# license = lib.licenses.gpl3;
|
||||
# };
|
||||
# };
|
||||
# amdgpu_module = pkgs.callPackage amdgpu_module_pkg {
|
||||
# kernel = config.boot.kernelPackages.kernel;
|
||||
# };
|
||||
#amdgpu_module_pkg =
|
||||
# { pkgs, lib, fetchurl, kernel ? pkgs.linuxPackages_latest.kernel, ... }:
|
||||
#
|
||||
# pkgs.stdenv.mkDerivation {
|
||||
# pname = "amdgpu-kernel-module";
|
||||
# inherit (kernel) version postPatch nativeBuildInputs;
|
||||
# src = fetchurl {
|
||||
# url =
|
||||
# "https://gitlab.freedesktop.org/agd5f/linux/-/archive/amd-drm-next-6.15-2025-03-14/linux-amd-drm-next-6.15-2025-03-14.tar.gz";
|
||||
# # After the first build attempt, look for "hash mismatch" and then 2 lines below at the "got:" line.
|
||||
# # Use "sha256-....." value here.
|
||||
# hash = "sha256-/9EvJNBSKteXljrZzmaQkbZ7o4etCe0yFM3JJg/jD7o=";
|
||||
# };
|
||||
#
|
||||
# kernel_dev = kernel.dev;
|
||||
# kernelVersion = kernel.modDirVersion;
|
||||
#
|
||||
# modulePath = "drivers/gpu/drm/amd/amdgpu";
|
||||
#
|
||||
# buildPhase = ''
|
||||
# BUILT_KERNEL=$kernel_dev/lib/modules/$kernelVersion/build
|
||||
#
|
||||
# cp $BUILT_KERNEL/Module.symvers .
|
||||
# cp $BUILT_KERNEL/.config .
|
||||
# cp $kernel_dev/vmlinux .
|
||||
#
|
||||
# make "-j$NIX_BUILD_CORES" modules_prepare
|
||||
# make "-j$NIX_BUILD_CORES" M=$modulePath modules
|
||||
# '';
|
||||
#
|
||||
# installPhase = ''
|
||||
# make \
|
||||
# INSTALL_MOD_PATH="$out" \
|
||||
# XZ="xz -T$NIX_BUILD_CORES" \
|
||||
# M="$modulePath" \
|
||||
# modules_install
|
||||
# '';
|
||||
#
|
||||
# meta = {
|
||||
# description = "AMD GPU kernel module";
|
||||
# license = lib.licenses.gpl3;
|
||||
# };
|
||||
# };
|
||||
# amdgpu_module = pkgs.callPackage amdgpu_module_pkg {
|
||||
# kernel = config.boot.kernelPackages.kernel;
|
||||
# };
|
||||
|
||||
in {
|
||||
in
|
||||
{
|
||||
#boot.extraModulePackages = [ amdgpu_module ];
|
||||
#boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||
#boot.kernelPackages = pkgs.linuxPackages_testing;
|
||||
@@ -62,24 +63,26 @@ in {
|
||||
# };
|
||||
#});
|
||||
|
||||
boot.kernelPackages = let
|
||||
amd_drm_next_pkg = { fetchurl, buildLinux, ... }@args:
|
||||
boot.kernelPackages =
|
||||
let
|
||||
amd_drm_next_pkg = { fetchurl, buildLinux, ... }@args:
|
||||
|
||||
buildLinux (args // rec {
|
||||
version = "6.14.0-rc4";
|
||||
modDirVersion = version;
|
||||
buildLinux (args // rec {
|
||||
version = "6.14.0-rc4";
|
||||
modDirVersion = version;
|
||||
|
||||
src = fetchurl {
|
||||
url =
|
||||
"https://gitlab.freedesktop.org/agd5f/linux/-/archive/amd-drm-next-6.15-2025-03-14/linux-amd-drm-next-6.15-2025-03-14.tar.gz";
|
||||
# After the first build attempt, look for "hash mismatch" and then 2 lines below at the "got:" line.
|
||||
# Use "sha256-....." value here.
|
||||
hash = "sha256-/9EvJNBSKteXljrZzmaQkbZ7o4etCe0yFM3JJg/jD7o=";
|
||||
};
|
||||
kernelPatches = [ ];
|
||||
src = fetchurl {
|
||||
url =
|
||||
"https://gitlab.freedesktop.org/agd5f/linux/-/archive/amd-drm-next-6.15-2025-03-14/linux-amd-drm-next-6.15-2025-03-14.tar.gz";
|
||||
# After the first build attempt, look for "hash mismatch" and then 2 lines below at the "got:" line.
|
||||
# Use "sha256-....." value here.
|
||||
hash = "sha256-/9EvJNBSKteXljrZzmaQkbZ7o4etCe0yFM3JJg/jD7o=";
|
||||
};
|
||||
kernelPatches = [ ];
|
||||
|
||||
extraMeta.branch = "6.14.0-rc4";
|
||||
} // (args.argsOverride or { }));
|
||||
linux_amd_drm_next = pkgs.callPackage amd_drm_next_pkg { };
|
||||
in pkgs.recurseIntoAttrs (pkgs.linuxPackagesFor linux_amd_drm_next);
|
||||
extraMeta.branch = "6.14.0-rc4";
|
||||
} // (args.argsOverride or { }));
|
||||
linux_amd_drm_next = pkgs.callPackage amd_drm_next_pkg { };
|
||||
in
|
||||
pkgs.recurseIntoAttrs (pkgs.linuxPackagesFor linux_amd_drm_next);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user