Browse Source

reorganize

pull/1/head
parent
commit
466d85e719
  1. 0
      compilers/binutils.nix
  2. 0
      compilers/fetch-llvm-clang.nix
  3. 48
      compilers/llvm-hx.nix
  4. 0
      cores/jtagtap.nix
  5. 0
      cores/minerva.nix
  6. 2
      default.nix
  7. 21
      derivations.nix
  8. 0
      eda/nmigen.nix
  9. 0
      eda/vivado.nix
  10. 0
      eda/yosys.nix
  11. 0
      eda/yosys_726.patch
  12. 45
      llvm-hx.nix

0
binutils.nix → compilers/binutils.nix

0
fetch-llvm-clang.nix → compilers/fetch-llvm-clang.nix

48
compilers/llvm-hx.nix

@ -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;
};
}

0
jtagtap.nix → cores/jtagtap.nix

0
minerva.nix → cores/minerva.nix

2
default.nix

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

21
derivations.nix

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

0
nmigen.nix → eda/nmigen.nix

0
vivado.nix → eda/vivado.nix

0
yosys.nix → eda/yosys.nix

0
yosys_726.patch → eda/yosys_726.patch

45
llvm-hx.nix

@ -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;
};
}
Loading…
Cancel
Save