lkl: move all patching to postPatch, simplify meta.platforms, cleanup
This commit is contained in:
parent
a71597f9b0
commit
f355889075
1 changed files with 14 additions and 12 deletions
|
@ -4,25 +4,27 @@
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "lkl";
|
pname = "lkl";
|
||||||
version = "2019-10-04";
|
version = "2019-10-04";
|
||||||
rev = "06ca3ddb74dc5b84fa54fa1746737f2df502e047";
|
|
||||||
|
|
||||||
outputs = [ "dev" "lib" "out" ];
|
outputs = [ "dev" "lib" "out" ];
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "lkl";
|
||||||
|
repo = "linux";
|
||||||
|
rev = "06ca3ddb74dc5b84fa54fa1746737f2df502e047";
|
||||||
|
sha256 = "0qjp0r338bwgrqdsvy5mkdh7ryas23m47yvxfwdknfyl0k3ylq62";
|
||||||
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ bc bison flex python3 ];
|
nativeBuildInputs = [ bc bison flex python3 ];
|
||||||
|
|
||||||
buildInputs = [ fuse libarchive ];
|
buildInputs = [ fuse libarchive ];
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
postPatch = ''
|
||||||
inherit rev;
|
# Fix a /usr/bin/env reference in here that breaks sandboxed builds
|
||||||
owner = "lkl";
|
patchShebangs arch/lkl/scripts
|
||||||
repo = "linux";
|
|
||||||
sha256 = "0qjp0r338bwgrqdsvy5mkdh7ryas23m47yvxfwdknfyl0k3ylq62";
|
|
||||||
};
|
|
||||||
|
|
||||||
# Fix a /usr/bin/env reference in here that breaks sandboxed builds
|
# Fixup build with newer Linux headers: https://github.com/lkl/linux/pull/484
|
||||||
prePatch = "patchShebangs arch/lkl/scripts";
|
sed '1i#include <linux/sockios.h>' -i tools/lkl/lib/hijack/xlate.c
|
||||||
# Fixup build with newer Linux headers: https://github.com/lkl/linux/pull/484
|
'';
|
||||||
postPatch = "sed '1i#include <linux/sockios.h>' -i tools/lkl/lib/hijack/xlate.c";
|
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
mkdir -p $out/bin $lib/lib $dev
|
mkdir -p $out/bin $lib/lib $dev
|
||||||
|
@ -61,7 +63,7 @@ stdenv.mkDerivation rec {
|
||||||
overhead
|
overhead
|
||||||
'';
|
'';
|
||||||
homepage = "https://github.com/lkl/linux/";
|
homepage = "https://github.com/lkl/linux/";
|
||||||
platforms = [ "x86_64-linux" "aarch64-linux" "armv7l-linux" "armv6l-linux" ]; # Darwin probably works too but I haven't tested it
|
platforms = platforms.linux; # Darwin probably works too but I haven't tested it
|
||||||
license = licenses.gpl2;
|
license = licenses.gpl2;
|
||||||
maintainers = with maintainers; [ copumpkin ];
|
maintainers = with maintainers; [ copumpkin ];
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue