mrustc: init at 0.9
mrustc is mostly patched to use shared LLVM sources but still uses in-tree source for compiler-rt from LLVM 7. This needs to be patched to compile under glibc 2.31 or later. It's easy enough to reapply all our compiler-rt patches here.
This commit is contained in:
committed by
Alyssa Ross
parent
9bb6bf650e
commit
92c77733ac
@@ -0,0 +1,39 @@
|
||||
{ lib, stdenv
|
||||
, makeWrapper
|
||||
, mrustc
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "mrustc-minicargo";
|
||||
inherit (mrustc) src version;
|
||||
|
||||
strictDeps = true;
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
makefile = "minicargo.mk";
|
||||
makeFlags = [ "tools/bin/minicargo" ];
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
mkdir -p $out/bin
|
||||
cp tools/bin/minicargo $out/bin
|
||||
|
||||
# without it, minicargo defaults to "<minicargo_path>/../../bin/mrustc"
|
||||
wrapProgram "$out/bin/minicargo" --set MRUSTC_PATH ${mrustc}/bin/mrustc
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "A minimalist builder for Rust";
|
||||
longDescription = ''
|
||||
A minimalist builder for Rust, similar to Cargo but written in C++.
|
||||
Designed to work with mrustc to build Rust projects
|
||||
(like the Rust compiler itself).
|
||||
'';
|
||||
inherit (src.meta) homepage;
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ progval r-burns ];
|
||||
platforms = [ "x86_64-linux" ];
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user