linux-libre: init

This commit is contained in:
Alyssa Ross 2018-08-21 00:32:29 +02:00
parent 33a1044c32
commit 34a7e678b2
No known key found for this signature in database
GPG Key ID: D9FFE7F0C4B8BF50
2 changed files with 40 additions and 0 deletions

View 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"
'';
};
};
}

View File

@ -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 {});