diff options
author | Aaron Lindsay <aerialx@users.noreply.github.com> | 2019-03-25 22:12:52 -0700 |
---|---|---|
committer | Aaron Lindsay <aerialx@users.noreply.github.com> | 2019-03-25 22:14:41 -0700 |
commit | e3f6b083078c6948be9dedfca735d9fae30337c2 (patch) | |
tree | 8e94adb0a945e7223eaed3fb2229576052b59ce8 /pkgs/development/misc | |
parent | 1c7bb464d99301e42cbb0fe438c927c1440800c6 (diff) |
wip: better packaging?
Diffstat (limited to 'pkgs/development/misc')
-rw-r--r-- | pkgs/development/misc/msp430/gcc-support.nix | 2 | ||||
-rw-r--r-- | pkgs/development/misc/msp430/newlib.nix | 23 |
2 files changed, 16 insertions, 9 deletions
diff --git a/pkgs/development/misc/msp430/gcc-support.nix b/pkgs/development/misc/msp430/gcc-support.nix index c24af99201989..8e3bfd7a1dc2c 100644 --- a/pkgs/development/misc/msp430/gcc-support.nix +++ b/pkgs/development/misc/msp430/gcc-support.nix @@ -24,7 +24,7 @@ in stdenvNoCC.mkDerivation { ''; homepage = https://www.ti.com/tool/msp430-gcc-opensource; license = licenses.bsd3; - platforms = platforms.all; + platforms = [ "msp430-none" ]; maintainers = with maintainers; [ aerialx ]; }; } diff --git a/pkgs/development/misc/msp430/newlib.nix b/pkgs/development/misc/msp430/newlib.nix index 9586a2ff21d39..4ea98bfc8b2e9 100644 --- a/pkgs/development/misc/msp430/newlib.nix +++ b/pkgs/development/misc/msp430/newlib.nix @@ -1,18 +1,25 @@ -{ runCommand, lndir, newlib, msp430GccSupport }: +{ stdenvNoCC, lndir, newlib, msp430GccSupport }: -runCommand "msp430-${newlib.name}" { +stdenvNoCC.mkDerivation { + name = "msp430-${newlib.name}"; inherit newlib; inherit msp430GccSupport; preferLocalBuild = true; allowSubstitutes = false; + buildCommand = '' + 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} + ''; + 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} -'' + + meta = { + platforms = [ "msp430-none" ]; + }; +} |