2020-04-24 23:36:52 +00:00
|
|
|
{ stdenv, lib, fetchsvn, linux
|
|
|
|
, scripts ? fetchsvn {
|
|
|
|
url = "https://www.fsfla.org/svn/fsfla/software/linux-libre/releases/branches/";
|
2023-07-15 17:15:38 +00:00
|
|
|
rev = "19337";
|
|
|
|
sha256 = "1ps7f7dfxjsl6xj6fiz5nw01an44aqsjmfmjzs8y2h0jpb7il9s5";
|
2020-04-24 23:36:52 +00:00
|
|
|
}
|
|
|
|
, ...
|
|
|
|
}:
|
|
|
|
|
|
|
|
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;
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
# See http://linux-libre.fsfla.org/pub/linux-libre/releases
|
|
|
|
versionPrefix = if linux.kernelOlder "5.14" then
|
|
|
|
"gnu1"
|
|
|
|
else
|
|
|
|
"gnu";
|
2020-04-24 23:36:52 +00:00
|
|
|
in linux.override {
|
|
|
|
argsOverride = {
|
2021-12-06 16:07:01 +00:00
|
|
|
modDirVersion = "${linux.modDirVersion}-${versionPrefix}";
|
2020-11-03 02:18:15 +00:00
|
|
|
isLibre = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = stdenv.mkDerivation {
|
|
|
|
name = "${linux.name}-libre-src";
|
|
|
|
src = linux.src;
|
|
|
|
buildPhase = ''
|
|
|
|
# --force flag to skip empty files after deblobbing
|
|
|
|
${scripts}/${majorMinor}/deblob-${majorMinor} --force \
|
|
|
|
${major} ${minor} ${patch}
|
|
|
|
'';
|
|
|
|
checkPhase = ''
|
|
|
|
${scripts}/deblob-check
|
|
|
|
'';
|
|
|
|
installPhase = ''
|
|
|
|
cp -r . "$out"
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
|
|
|
passthru.updateScript = ./update-libre.sh;
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
maintainers = with lib.maintainers; [ qyliss ivar ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|