Skip to content

Commit

Permalink
klibc: 2.0.4 -> 2.0.7
Browse files Browse the repository at this point in the history
  • Loading branch information
fpletz committed Feb 8, 2020
1 parent ea7d024 commit 4ba8086
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
13 changes: 8 additions & 5 deletions pkgs/os-specific/linux/klibc/default.nix
@@ -1,4 +1,4 @@
{ stdenv, fetchurl, linuxHeaders, perl }:
{ lib, stdenv, fetchurl, linuxHeaders, perl }:

let
commonMakeFlags = [
Expand All @@ -9,11 +9,11 @@ in

stdenv.mkDerivation rec {
pname = "klibc";
version = "2.0.4";
version = "2.0.7";

src = fetchurl {
url = "mirror://kernel/linux/libs/klibc/2.0/klibc-${version}.tar.xz";
sha256 = "7f9a0850586def7cf4faeeb75e5d0f66e613674c524f6e77b0f4d93a26c801cb";
sha256 = "08li3aj9bvzabrih98jdxi3m19h85cp53s8cr7cqad42r8vjdvxb";
};

patches = [ ./no-reinstall-kernel-headers.patch ];
Expand All @@ -35,14 +35,17 @@ stdenv.mkDerivation rec {
dir=$out/lib/klibc/bin.static
mkdir $dir
cp $(find $(find . -name static) -type f ! -name "*.g" -a ! -name ".*") $dir/
cp usr/dash/sh $dir/
for file in ${linuxHeaders}/include/*; do
ln -sv $file $out/lib/klibc/include
done
'';

meta = {
platforms = [ "x86_64-linux" ];
description = "Minimalistic libc subset for initramfs usage";
homepage = "https://kernel.org/pub/linux/libs/klibc/";
maintainers = with lib.maintainers; [ fpletz ];
license = lib.licenses.bsd3;
platforms = lib.platforms.linux;
};
}
Expand Up @@ -5,7 +5,7 @@ diff -Naur klibc-2.0.3-orig/scripts/Kbuild.install klibc-2.0.3/scripts/Kbuild.in
$(Q)mkdir -p $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)include
$(Q)mkdir -p $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)lib
$(Q)mkdir -p $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)bin
- $(Q)$(MAKE) -C $(KLIBCKERNELSRC) ARCH=$(KLIBCARCH) INSTALL_HDR_PATH=$(INSTALLROOT)$(INSTALLDIR)/$(KCROSS) headers_install
- $(Q)cp -rfL $(KLIBCKERNELSRC)/include/. $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)include/.
$(Q)cp -rf usr/include/. $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)include/.
$(Q)chmod -R a+rX $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)include
$(Q)$(install-data) $(srctree)/klcc/klcc.1 $(INSTALLROOT)$(mandir)/man1/$(KCROSS)klcc.1

0 comments on commit 4ba8086

Please sign in to comment.