Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ stdenv, lib, fetchsvn, linux 2, scripts ? fetchsvn { 3 url = "https://www.fsfla.org/svn/fsfla/software/linux-libre/releases/branches/"; 4 rev = "19308"; 5 sha256 = "1rhg43z4fyyac12c1z9h83xlh7ar0k2lfzrs40q061jlmx8mkpbb"; 6 } 7, ... 8}: 9 10let 11 majorMinor = lib.versions.majorMinor linux.modDirVersion; 12 13 major = lib.versions.major linux.modDirVersion; 14 minor = lib.versions.minor linux.modDirVersion; 15 patch = lib.versions.patch linux.modDirVersion; 16 17 # See http://linux-libre.fsfla.org/pub/linux-libre/releases 18 versionPrefix = if linux.kernelOlder "5.14" then 19 "gnu1" 20 else 21 "gnu"; 22in linux.override { 23 argsOverride = { 24 modDirVersion = "${linux.modDirVersion}-${versionPrefix}"; 25 isLibre = true; 26 27 src = stdenv.mkDerivation { 28 name = "${linux.name}-libre-src"; 29 src = linux.src; 30 buildPhase = '' 31 # --force flag to skip empty files after deblobbing 32 ${scripts}/${majorMinor}/deblob-${majorMinor} --force \ 33 ${major} ${minor} ${patch} 34 ''; 35 checkPhase = '' 36 ${scripts}/deblob-check 37 ''; 38 installPhase = '' 39 cp -r . "$out" 40 ''; 41 }; 42 43 passthru.updateScript = ./update-libre.sh; 44 45 maintainers = with lib.maintainers; [ qyliss ivar ]; 46 }; 47}