NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.4k stars 13.62k forks source link

Package request: gccrs #237636

Open Skallwar opened 1 year ago

Skallwar commented 1 year ago

Project description

gccrs is a full alternative implementation of the Rust language ontop of GCC with the goal to become fully upstream with the GNU toolchain.

Metadata

dit7ya commented 1 year ago

A wip derivation with some progress

{ lib
, gccMultiStdenv
, fetchFromGitHub
, gmp
, mpfr
, libmpc
, flex
, bison
, autogen
, dejagnu
, stdenv
}:

gccMultiStdenv.mkDerivation rec {
  pname = "gccrs";
  version = "unstable-2023-08-03";

  src = fetchFromGitHub {
    owner = "Rust-GCC";
    repo = "gccrs";
    rev = "f7d937321b2426eba5dd5fd0d288967324256f04";
    hash = "sha256-2OSTe7CtfD1XEMt/UCs0eq7JGYFB6DfwhfL/g4WM4no=";
  };

  configureFlags = [
    "--disable-bootstrap"
    "--enable-multilib"
    "--enable-languages=rust"
    "--with-native-system-header-dir=${lib.getDev stdenv.cc.libc}/include"
  ];

  env.NIX_CFLAGS_COMPILE = "-Wno-error=format-security";

  nativeBuildInputs = [
    gmp
    flex
    bison
    autogen
    dejagnu
  ];

  buildInputs = [
    mpfr
    libmpc
  ];

  meta = with lib; {
    description = "GCC Front-End for Rust";
    homepage = "https://github.com/Rust-GCC/gccrs";
    changelog = "https://github.com/Rust-GCC/gccrs/blob/${src.rev}/ChangeLog";
    license = with licenses; [ gpl2Only lgpl21Only gpl3Only ];
    maintainers = with maintainers; [ ];
  };
}
nagy commented 1 month ago

Related:

That PR allows to build the gccrs version, that has already been upstreamed into gcc.

AndersonTorres commented 3 weeks ago

Is this closed?

Skallwar commented 2 weeks ago

Is this closed?

Not really since #332738 track the up-streamed gcc version not the one on github