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/";
|
2021-10-28 06:52:43 +00:00
|
|
|
rev = "18413";
|
|
|
|
sha256 = "1s0nr3pnczr1ijv86307mfhmkk7xn5ah46wx6jrx857agcd73fzq";
|
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;
|
|
|
|
|
|
|
|
in linux.override {
|
|
|
|
argsOverride = {
|
2021-10-17 02:12:59 +00:00
|
|
|
modDirVersion = "${linux.modDirVersion}-gnu1";
|
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;
|
|
|
|
|
|
|
|
maintainers = [ lib.maintainers.qyliss ];
|
|
|
|
};
|
|
|
|
}
|