commit
454041a557
@ -1,31 +1,35 @@
|
|||||||
{ stdenv, fetchFromGitHub, bc, python, fuse, libarchive }:
|
{ stdenv, fetchFromGitHub, bc, python, fuse, libarchive }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "lkl-${stdenv.lib.substring 0 7 rev}";
|
name = "lkl-2017-03-24";
|
||||||
rev = "d74707304d4e4614081ae2a612a833aeb46622b5";
|
rev = "a063e1631db5e2b9b04f184c5e6d185c1cd645cb";
|
||||||
|
|
||||||
buildInputs = [ bc python fuse libarchive ];
|
outputs = [ "dev" "lib" "out" ];
|
||||||
|
|
||||||
|
nativeBuildInputs = [ bc python ];
|
||||||
|
|
||||||
|
buildInputs = [ fuse libarchive ];
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
inherit rev;
|
inherit rev;
|
||||||
owner = "lkl";
|
owner = "lkl";
|
||||||
repo = "linux";
|
repo = "linux";
|
||||||
sha256 = "0x1hdjsrj6hfk1sgfw11ihm00fmp6g158sr2q3cgjy2b6jnsr4hp";
|
sha256 = "07dmira76i0ki577sra4fdl1wvzfzxzd75252lza0sc6jdzrrwvj";
|
||||||
};
|
};
|
||||||
|
|
||||||
# Fix a /usr/bin/env reference in here that breaks sandboxed builds
|
# Fix a /usr/bin/env reference in here that breaks sandboxed builds
|
||||||
prePatch = "patchShebangs arch/lkl/scripts";
|
prePatch = "patchShebangs arch/lkl/scripts";
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
mkdir -p $out/{bin,lib}
|
mkdir -p $out/bin $lib/lib $dev
|
||||||
|
|
||||||
# This tool assumes a different directory structure so let's point it at the right location
|
|
||||||
cp tools/lkl/bin/lkl-hijack.sh $out/bin
|
cp tools/lkl/bin/lkl-hijack.sh $out/bin
|
||||||
substituteInPlace $out/bin/lkl-hijack.sh --replace '/../' '/../lib'
|
sed -i $out/bin/lkl-hijack.sh \
|
||||||
|
-e "s,LD_LIBRARY_PATH=.*,LD_LIBRARY_PATH=$lib/lib,"
|
||||||
|
|
||||||
cp tools/lkl/{cptofs,cpfromfs,fs2tar,lklfuse} $out/bin
|
cp tools/lkl/{cptofs,cpfromfs,fs2tar,lklfuse} $out/bin
|
||||||
cp -r tools/lkl/include $out
|
cp -r tools/lkl/include $dev/
|
||||||
cp tools/lkl/liblkl*.{a,so} $out/lib
|
cp tools/lkl/liblkl*.{a,so} $lib/lib
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# We turn off format and fortify because of these errors (fortify implies -O2, which breaks the jitter entropy code):
|
# We turn off format and fortify because of these errors (fortify implies -O2, which breaks the jitter entropy code):
|
||||||
@ -38,7 +42,13 @@ stdenv.mkDerivation rec {
|
|||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
description = "LKL (Linux Kernel Library) aims to allow reusing the Linux kernel code as extensively as possible with minimal effort and reduced maintenance overhead";
|
description = "The Linux kernel as a library";
|
||||||
|
longDescription = ''
|
||||||
|
LKL (Linux Kernel Library) aims to allow reusing the Linux kernel code as
|
||||||
|
extensively as possible with minimal effort and reduced maintenance
|
||||||
|
overhead
|
||||||
|
'';
|
||||||
|
homepage = https://github.com/lkl/linux/;
|
||||||
platforms = [ "x86_64-linux" ]; # Darwin probably works too but I haven't tested it
|
platforms = [ "x86_64-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…
x
Reference in New Issue
Block a user