shell.nix: update glasgow
Requires nixos 19.09 for yosys
This commit is contained in:
parent
aa8a2f19d0
commit
2822f7c01e
62
shell.nix
62
shell.nix
@ -1,41 +1,14 @@
|
||||
let
|
||||
yosys_overlay = self: super:
|
||||
rec {
|
||||
yosys = super.yosys.overrideAttrs(oa: rec {
|
||||
name = "yosys-${version}";
|
||||
version = "0.9";
|
||||
srcs = [
|
||||
(super.fetchFromGitHub {
|
||||
owner = "yosyshq";
|
||||
repo = "yosys";
|
||||
rev = "yosys-${version}";
|
||||
sha256 = "0lb9r055h8y1vj2z8gm4ip0v06j5mk7f9zx9gi67kkqb7g4rhjli";
|
||||
name = "yosys";
|
||||
})
|
||||
# NOTE: the version of abc used here is synchronized with
|
||||
# the one in the yosys Makefile of the version above;
|
||||
# keep them the same for quality purposes.
|
||||
(super.fetchFromGitHub {
|
||||
owner = "berkeley-abc";
|
||||
repo = "abc";
|
||||
rev = "3709744c60696c5e3f4cc123939921ce8107fe04";
|
||||
sha256 = "18a9cjng3qfalq8m9az5ck1y5h4l2pf9ycrvkzs9hn82b1j7vrax";
|
||||
name = "yosys-abc";
|
||||
})
|
||||
];
|
||||
buildInputs = oa.buildInputs ++ [ super.zlib ];
|
||||
});
|
||||
};
|
||||
pkgs = import <nixpkgs> { overlays = [ yosys_overlay ]; };
|
||||
pkgs = import <nixpkgs> { };
|
||||
fx2 = pkgs.python3Packages.buildPythonPackage rec {
|
||||
pname = "fx2";
|
||||
version = "0.7";
|
||||
version = "0.8";
|
||||
# not using Pypi as it lacks the firmware sources
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "whitequark";
|
||||
repo = "libfx2";
|
||||
rev = "v${version}";
|
||||
sha256 = "0xvlmx6ym0ylrvnlqzf18d475wa0mfci7wkdbv30gl3hgdhsppjz";
|
||||
sha256 = "0b3zp50mschsxi2v3192dmnpw32gwblyl8aswlz9a0vx1qg3ibzn";
|
||||
};
|
||||
nativeBuildInputs = with pkgs; [ gnumake sdcc ];
|
||||
propagatedBuildInputs = with pkgs.python3Packages; [ libusb1 crcmod ];
|
||||
@ -46,31 +19,32 @@ let
|
||||
};
|
||||
nmigen = pkgs.python3Packages.buildPythonPackage {
|
||||
name = "nmigen";
|
||||
version = "2019-08-26";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "m-labs";
|
||||
repo = "nmigen";
|
||||
rev = "2168ff512bfe04806b35c09d3b1d265a16c4ddbc";
|
||||
sha256 = "0ij9idvlqsjzzr50vyg2ziabj7lv7yi8s0826g3acrn45hfv4535";
|
||||
version = "2019-10-06";
|
||||
src = pkgs.fetchgit {
|
||||
url = "https://github.com/m-labs/nmigen";
|
||||
rev = "2512a9a12d2c062b8f34330c379ec523b125f38d";
|
||||
sha256 = "0mi2snd8daabdmcbmc10hxzjmnmx85rnx1njqmrj1ll2jin3ncq7";
|
||||
leaveDotGit = true;
|
||||
};
|
||||
checkPhase = "PATH=${pkgs.yosys}/bin:${pkgs.symbiyosys}/bin:${pkgs.yices}/bin:$PATH python -m unittest discover nmigen.test -v";
|
||||
nativeBuildInputs = with pkgs; [ pkgs.python3Packages.setuptools_scm git ];
|
||||
propagatedBuildInputs = with pkgs.python3Packages; [ bitarray pyvcd jinja2 ];
|
||||
};
|
||||
glasgow = pkgs.python3Packages.buildPythonApplication rec {
|
||||
pname = "glasgow";
|
||||
version = "2019-08-28";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "GlasgowEmbedded";
|
||||
repo = "Glasgow";
|
||||
rev = "c103a8fc7945a0e46fb8b50fab63c51efe27e242";
|
||||
sha256 = "0mfzjf74w71yasbj9jvdx86ipc3wrmxiqa819b586k9dsskzgw32";
|
||||
version = "2019-10-07";
|
||||
src = pkgs.fetchgit {
|
||||
url = "https://github.com/GlasgowEmbedded/Glasgow";
|
||||
rev = "bfe49bebc4483b32eed8ec127a98a9fa2e77e7d4";
|
||||
sha256 = "0wvn7ysixgxm35ghdp0cdqfp5pxpbxvr1r9d5amcz3ss6bd2844c";
|
||||
fetchSubmodules = true;
|
||||
leaveDotGit = true;
|
||||
};
|
||||
patches = [ ./glasgow-applet.diff ];
|
||||
nativeBuildInputs = with pkgs; [ gnumake sdcc ];
|
||||
nativeBuildInputs = with pkgs; [ pkgs.python3Packages.setuptools_scm git gnumake sdcc ];
|
||||
propagatedBuildInputs = (
|
||||
[ fx2 nmigen ] ++
|
||||
(with pkgs.python3Packages; [ libusb1 aiohttp pyvcd bitarray crcmod ]) ++
|
||||
(with pkgs.python3Packages; [ setuptools libusb1 aiohttp pyvcd bitarray crcmod ]) ++
|
||||
(with pkgs; [ yosys nextpnr icestorm ]));
|
||||
preBuild = ''
|
||||
cd software
|
||||
|
Loading…
Reference in New Issue
Block a user