summary refs log tree commit diff
path: root/pkgs/development/misc
diff options
context:
space:
mode:
authorFrederik Rietdijk <fridh@fridh.nl>2019-11-25 21:51:57 +0100
committerFrederik Rietdijk <fridh@fridh.nl>2019-11-25 21:51:57 +0100
commit06a054e6eb9d5ad395aa89e598205aa2c56afb61 (patch)
tree91254460e5216addfcfa8aa457d3d480ed448b47 /pkgs/development/misc
parent2a2d3de78c950d46922f9aa13c3ff531cb142310 (diff)
parent646b279c55780fa8cfe79b2a3b1e3ab53b445be7 (diff)
downloadnixpkgs-06a054e6eb9d5ad395aa89e598205aa2c56afb61.tar
nixpkgs-06a054e6eb9d5ad395aa89e598205aa2c56afb61.tar.gz
nixpkgs-06a054e6eb9d5ad395aa89e598205aa2c56afb61.tar.bz2
nixpkgs-06a054e6eb9d5ad395aa89e598205aa2c56afb61.tar.lz
nixpkgs-06a054e6eb9d5ad395aa89e598205aa2c56afb61.tar.xz
nixpkgs-06a054e6eb9d5ad395aa89e598205aa2c56afb61.tar.zst
nixpkgs-06a054e6eb9d5ad395aa89e598205aa2c56afb61.zip
Merge master into staging-next
Diffstat (limited to 'pkgs/development/misc')
-rw-r--r--pkgs/development/misc/vc4/newlib.nix28
1 files changed, 28 insertions, 0 deletions
diff --git a/pkgs/development/misc/vc4/newlib.nix b/pkgs/development/misc/vc4/newlib.nix
new file mode 100644
index 00000000000..e1a8b2eeaa6
--- /dev/null
+++ b/pkgs/development/misc/vc4/newlib.nix
@@ -0,0 +1,28 @@
+{ stdenv, texinfo, flex, bison, fetchFromGitHub, crossLibcStdenv, buildPackages }:
+
+crossLibcStdenv.mkDerivation {
+  name = "newlib";
+  src = fetchFromGitHub {
+    owner = "itszor";
+    repo = "newlib-vc4";
+    rev = "89abe4a5263d216e923fbbc80495743ff269a510";
+    sha256 = "131r4v0nn68flnqibjcvhsrys3hs89bn0i4vwmrzgjd7v1rbgqav";
+  };
+  dontUpdateAutotoolsGnuConfigScripts = true;
+  configurePlatforms = [ "target" ];
+  enableParallelBuilding = true;
+
+  nativeBuildInputs = [ texinfo flex bison ];
+  depsBuildBuild = [ buildPackages.stdenv.cc ];
+  # newlib expects CC to build for build platform, not host platform
+  preConfigure = ''
+    export CC=cc
+  '';
+
+  dontStrip = true;
+
+  passthru = {
+    incdir = "/${stdenv.targetPlatform.config}/include";
+    libdir = "/${stdenv.targetPlatform.config}/lib";
+  };
+}