Merge pull request #45411 from alyssais/linux-libre

linux-libre: init
This commit is contained in:
xeji 2018-08-30 09:01:00 +02:00 committed by GitHub
commit f629d36560
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 46 additions and 2 deletions

View 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 ];
};
}

View File

@ -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
'';

View File

@ -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
'';

View File

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