1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-25 07:00:43 +00:00

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