linux-libre: init
This commit is contained in:
parent
33a1044c32
commit
34a7e678b2
34
pkgs/os-specific/linux/kernel/linux-libre.nix
Normal file
34
pkgs/os-specific/linux/kernel/linux-libre.nix
Normal file
@ -0,0 +1,34 @@
|
||||
{ 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"
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
@ -14210,6 +14210,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