commit
f629d36560
38
pkgs/os-specific/linux/kernel/linux-libre.nix
Normal file
38
pkgs/os-specific/linux/kernel/linux-libre.nix
Normal file
@ -0,0 +1,38 @@
|
||||
{ stdenv, lib, fetchsvn, linux
|
||||
, scripts ? fetchsvn {
|
||||
url = "https://www.fsfla.org/svn/fsfla/software/linux-libre/releases/tags/";
|
||||
rev = "r15295";
|
||||
sha256 = "03kqbjy7w9zg6ry86h9sxa33z0rblznhba109lwmjwy0wx7yk1cs";
|
||||
}
|
||||
, ...
|
||||
}:
|
||||
|
||||
let
|
||||
majorMinor = lib.versions.majorMinor linux.modDirVersion;
|
||||
|
||||
major = lib.versions.major linux.modDirVersion;
|
||||
minor = lib.versions.minor linux.modDirVersion;
|
||||
patch = lib.versions.patch linux.modDirVersion;
|
||||
|
||||
in linux.override {
|
||||
argsOverride = {
|
||||
modDirVersion = "${linux.modDirVersion}-gnu";
|
||||
|
||||
src = stdenv.mkDerivation {
|
||||
name = "${linux.name}-libre-src";
|
||||
src = linux.src;
|
||||
buildPhase = ''
|
||||
${scripts}/${majorMinor}-gnu/deblob-${majorMinor} \
|
||||
${major} ${minor} ${patch}
|
||||
'';
|
||||
checkPhase = ''
|
||||
${scripts}/deblob-check
|
||||
'';
|
||||
installPhase = ''
|
||||
cp -r . "$out"
|
||||
'';
|
||||
};
|
||||
|
||||
maintainers = [ lib.maintainers.qyliss ];
|
||||
};
|
||||
}
|
@ -41,7 +41,7 @@ in stdenv.mkDerivation rec {
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p ${modDestDir}
|
||||
cp src/libafs/MODLOAD-*/libafs-${kernel.version}.* ${modDestDir}/libafs.ko
|
||||
cp src/libafs/MODLOAD-*/libafs-${kernel.modDirVersion}.* ${modDestDir}/libafs.ko
|
||||
xz -f ${modDestDir}/libafs.ko
|
||||
'';
|
||||
|
||||
|
@ -44,7 +44,7 @@ in stdenv.mkDerivation rec {
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p ${modDestDir}
|
||||
cp src/libafs/MODLOAD-*/libafs-${kernel.version}.* ${modDestDir}/libafs.ko
|
||||
cp src/libafs/MODLOAD-*/libafs-${kernel.modDirVersion}.* ${modDestDir}/libafs.ko
|
||||
xz -f ${modDestDir}/libafs.ko
|
||||
'';
|
||||
|
||||
|
@ -14257,6 +14257,12 @@ with pkgs;
|
||||
linuxPackages_hardkernel_latest = linuxPackages_hardkernel_4_14;
|
||||
linux_hardkernel_latest = linuxPackages_hardkernel_latest.kernel;
|
||||
|
||||
# GNU Linux-libre kernels
|
||||
linuxPackages-libre = recurseIntoAttrs (linuxPackagesFor linux-libre);
|
||||
linux-libre = callPackage ../os-specific/linux/kernel/linux-libre.nix {};
|
||||
linuxPackages_latest-libre = recurseIntoAttrs (linuxPackagesFor linux_latest-libre);
|
||||
linux_latest-libre = linux-libre.override { linux = linux_latest; };
|
||||
|
||||
# A function to build a manually-configured kernel
|
||||
linuxManualConfig = makeOverridable (callPackage ../os-specific/linux/kernel/manual-config.nix {});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user