about summary refs log tree commit diff
path: root/pkgs/development/misc
diff options
context:
space:
mode:
authorAaron Lindsay <aerialx@users.noreply.github.com>2019-03-25 20:33:39 -0700
committerAaron Lindsay <aerialx@users.noreply.github.com>2019-03-25 20:39:51 -0700
commit1c7bb464d99301e42cbb0fe438c927c1440800c6 (patch)
treeab9626a3e3823b0d0b6d56bac7dda39ef6e568b1 /pkgs/development/misc
parent02a1d3b24a94a21844ae545a9eb9ee00b61e0f63 (diff)
msp430: include vendor headers with stdenv
Diffstat (limited to 'pkgs/development/misc')
-rw-r--r--pkgs/development/misc/msp430/newlib.nix18
1 files changed, 18 insertions, 0 deletions
diff --git a/pkgs/development/misc/msp430/newlib.nix b/pkgs/development/misc/msp430/newlib.nix
new file mode 100644
index 0000000000000..9586a2ff21d39
--- /dev/null
+++ b/pkgs/development/misc/msp430/newlib.nix
@@ -0,0 +1,18 @@
+{ runCommand, lndir, newlib, msp430GccSupport }:
+
+runCommand "msp430-${newlib.name}" {
+  inherit newlib;
+  inherit msp430GccSupport;
+
+  preferLocalBuild = true;
+  allowSubstitutes = false;
+
+  passthru = {
+    inherit (newlib) incdir libdir;
+  };
+} ''
+  mkdir $out
+  ${lndir}/bin/lndir -silent $newlib $out
+  ${lndir}/bin/lndir -silent $msp430GccSupport/include $out/${newlib.incdir}
+  ${lndir}/bin/lndir -silent $msp430GccSupport/lib $out/${newlib.libdir}
+''