reorganize

This commit is contained in:
Sebastien Bourdeauducq 2019-04-01 11:05:08 +08:00
parent 3dd10e6b9b
commit 466d85e719
12 changed files with 60 additions and 56 deletions

48
compilers/llvm-hx.nix Normal file
View File

@ -0,0 +1,48 @@
{ stdenv
, git
, callPackage
, perl, groff, cmake, libxml2, python, libffi, valgrind
, ...
}:
let
llvm-src = callPackage ./fetch-llvm-clang.nix {};
in
stdenv.mkDerivation rec {
name = "llvm-hx";
src = llvm-src;
buildInputs = [ perl groff cmake libxml2 python libffi ] ++ stdenv.lib.optional stdenv.isLinux valgrind;
preBuild = ''
NIX_BUILD_CORES=4
makeFlagsArray=(-j''$NIX_BUILD_CORES)
mkdir -p $out/
'';
cmakeFlags = with stdenv; [
"-DCMAKE_BUILD_TYPE=Release"
"-DLLVM_BUILD_LLVM_DYLIB=ON"
"-DLLVM_LINK_LLVM_DYLIB=ON"
"-DLLVM_TARGETS_TO_BUILD=X86"
"-DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=RISCV;OR1K"
"-DLLVM_ENABLE_ASSERTIONS=OFF"
"-DLLVM_INSTALL_UTILS=ON"
"-DLLVM_INCLUDE_TESTS=OFF"
"-DLLVM_INCLUDE_DOCS=OFF"
"-DLLVM_INCLUDE_EXAMPLES=OFF"
"-DCLANG_ENABLE_ARCMT=OFF"
"-DCLANG_ENABLE_STATIC_ANALYZER=OFF"
"-DCLANG_INCLUDE_TESTS=OFF"
"-DCLANG_INCLUDE_DOCS=OFF"
];
enableParallelBuilding = true;
meta = {
description = "Collection of modular and reusable compiler and toolchain technologies";
homepage = http://llvm.org/;
license = stdenv.lib.licenses.bsd3;
maintainers = with stdenv.lib.maintainers; [ sb0 ];
platforms = stdenv.lib.platforms.all;
};
}

View File

@ -1,4 +1,4 @@
{ pkgs ? import <nixpkgs> {}}: { pkgs ? import <nixpkgs> {}}:
(import ./derivations.nix { inherit pkgs; }) // { (import ./derivations.nix { inherit pkgs; }) // {
vivado = import ./vivado.nix { inherit pkgs; }; vivado = import ./eda/vivado.nix { inherit pkgs; };
} }

View File

@ -1,14 +1,15 @@
{ pkgs }: { pkgs }:
let rec {
llvm-src = pkgs.callPackage ./fetch-llvm-clang.nix {}; yosys = pkgs.callPackage ./eda/yosys.nix {};
in rec {
yosys = pkgs.callPackage ./yosys.nix {};
symbiyosys = pkgs.symbiyosys.override { inherit yosys; }; symbiyosys = pkgs.symbiyosys.override { inherit yosys; };
nmigen = pkgs.callPackage ./nmigen.nix { inherit yosys; }; nmigen = pkgs.callPackage ./eda/nmigen.nix { inherit yosys; };
jtagtap = pkgs.callPackage ./jtagtap.nix { inherit nmigen; };
minerva = pkgs.callPackage ./minerva.nix { inherit nmigen; inherit jtagtap; }; jtagtap = pkgs.callPackage ./cores/jtagtap.nix { inherit nmigen; };
minerva = pkgs.callPackage ./cores/minerva.nix { inherit nmigen; inherit jtagtap; };
heavycomps = pkgs.callPackage ./heavycomps.nix { inherit nmigen; }; heavycomps = pkgs.callPackage ./heavycomps.nix { inherit nmigen; };
binutils-riscv = pkgs.callPackage ./binutils.nix { platform = "riscv32"; };
binutils-or1k = pkgs.callPackage ./binutils.nix { platform = "or1k"; }; binutils-riscv = pkgs.callPackage ./compilers/binutils.nix { platform = "riscv32"; };
llvm-hx = pkgs.callPackage ./llvm-hx.nix { inherit llvm-src; }; binutils-or1k = pkgs.callPackage ./compilers/binutils.nix { platform = "or1k"; };
llvm-hx = pkgs.callPackage ./compilers/llvm-hx.nix {};
} }

View File

@ -1,45 +0,0 @@
{ stdenv
, git
, llvm-src
, perl, groff, cmake, libxml2, python, libffi, valgrind
, ...
}:
stdenv.mkDerivation rec {
name = "llvm-hx";
src = llvm-src;
buildInputs = [ perl groff cmake libxml2 python libffi ] ++ stdenv.lib.optional stdenv.isLinux valgrind;
preBuild = ''
NIX_BUILD_CORES=4
makeFlagsArray=(-j''$NIX_BUILD_CORES)
mkdir -p $out/
'';
cmakeFlags = with stdenv; [
"-DCMAKE_BUILD_TYPE=Release"
"-DLLVM_BUILD_LLVM_DYLIB=ON"
"-DLLVM_LINK_LLVM_DYLIB=ON"
"-DLLVM_TARGETS_TO_BUILD=X86"
"-DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=RISCV;OR1K"
"-DLLVM_ENABLE_ASSERTIONS=OFF"
"-DLLVM_INSTALL_UTILS=ON"
"-DLLVM_INCLUDE_TESTS=OFF"
"-DLLVM_INCLUDE_DOCS=OFF"
"-DLLVM_INCLUDE_EXAMPLES=OFF"
"-DCLANG_ENABLE_ARCMT=OFF"
"-DCLANG_ENABLE_STATIC_ANALYZER=OFF"
"-DCLANG_INCLUDE_TESTS=OFF"
"-DCLANG_INCLUDE_DOCS=OFF"
];
enableParallelBuilding = true;
meta = {
description = "Collection of modular and reusable compiler and toolchain technologies";
homepage = http://llvm.org/;
license = stdenv.lib.licenses.bsd3;
maintainers = with stdenv.lib.maintainers; [ sb0 ];
platforms = stdenv.lib.platforms.all;
};
}