Browse Source

reorganize Nix files to expose lib functions and derivations properly

pull/1/head
parent
commit
38ccee5c01
  1. 9
      default.nix
  2. 9
      derivations.nix
  3. 5
      release.nix
  4. 2
      vivado.nix

9
default.nix

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

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

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

2
vivado.nix

@ -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" ];

Loading…
Cancel
Save