mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-25 00:12:56 +00:00
755b915a15
nix run nixpkgs#silver-searcher -- -G '\.nix$' -0l 'description.*"[Aa]n?' pkgs \ | xargs -0 nix run nixpkgs#gnused -- -i '' -Ee 's/(description.*")[Aa]n? (.)/\1\U\2/'
41 lines
1.0 KiB
Nix
41 lines
1.0 KiB
Nix
{ lib, stdenv
|
|
, makeWrapper
|
|
, mrustc
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "mrustc-minicargo";
|
|
inherit (mrustc) src version;
|
|
|
|
strictDeps = true;
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
enableParallelBuilding = true;
|
|
makefile = "minicargo.mk";
|
|
makeFlags = [ "bin/minicargo" ];
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
mkdir -p $out/bin
|
|
cp 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 = "Minimalist builder for Rust";
|
|
mainProgram = "minicargo";
|
|
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" ];
|
|
};
|
|
}
|