reorganize Nix files to expose lib functions and derivations properly

This commit is contained in:
Sebastien Bourdeauducq 2019-03-25 16:07:50 +08:00
parent 0f512c762b
commit 38ccee5c01
4 changed files with 17 additions and 8 deletions

View File

@ -1,9 +1,4 @@
{ pkgs ? import <nixpkgs> {}}:
rec {
yosys = pkgs.callPackage ./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; };
heavycomps = pkgs.callPackage ./heavycomps.nix { inherit nmigen; };
(import ./derivations.nix { inherit pkgs; }) // {
vivado = import ./vivado.nix { inherit pkgs; };
}

9
derivations.nix Normal file
View File

@ -0,0 +1,9 @@
{ pkgs }:
rec {
yosys = pkgs.callPackage ./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; };
heavycomps = pkgs.callPackage ./heavycomps.nix { inherit nmigen; };
}

5
release.nix Normal file
View File

@ -0,0 +1,5 @@
{ pkgs ? import <nixpkgs> {}}:
let
derivations = import ./derivations.nix { inherit pkgs; };
in
builtins.mapAttrs (name: value: pkgs.lib.hydraJob value) derivations

View File

@ -22,7 +22,7 @@ let
};
in
{
buildBitstream = { name, src, vivadoPath ? "/opt/Xilinx/Vivado/2018.3" }:
buildBitstream = { name, src, vivadoPath ? "/home/sb/opt/Xilinx/Vivado/2018.3" }:
pkgs.stdenv.mkDerivation {
inherit name src;
phases = [ "buildPhase" ];