shell.nix: update glasgow

Requires nixos 19.09 for yosys
This commit is contained in:
Sebastien Bourdeauducq 2019-10-08 17:00:04 +08:00
parent aa8a2f19d0
commit 2822f7c01e

View File

@ -1,41 +1,14 @@
let let
yosys_overlay = self: super: pkgs = import <nixpkgs> { };
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 ]; };
fx2 = pkgs.python3Packages.buildPythonPackage rec { fx2 = pkgs.python3Packages.buildPythonPackage rec {
pname = "fx2"; pname = "fx2";
version = "0.7"; version = "0.8";
# not using Pypi as it lacks the firmware sources # not using Pypi as it lacks the firmware sources
src = pkgs.fetchFromGitHub { src = pkgs.fetchFromGitHub {
owner = "whitequark"; owner = "whitequark";
repo = "libfx2"; repo = "libfx2";
rev = "v${version}"; rev = "v${version}";
sha256 = "0xvlmx6ym0ylrvnlqzf18d475wa0mfci7wkdbv30gl3hgdhsppjz"; sha256 = "0b3zp50mschsxi2v3192dmnpw32gwblyl8aswlz9a0vx1qg3ibzn";
}; };
nativeBuildInputs = with pkgs; [ gnumake sdcc ]; nativeBuildInputs = with pkgs; [ gnumake sdcc ];
propagatedBuildInputs = with pkgs.python3Packages; [ libusb1 crcmod ]; propagatedBuildInputs = with pkgs.python3Packages; [ libusb1 crcmod ];
@ -46,31 +19,32 @@ let
}; };
nmigen = pkgs.python3Packages.buildPythonPackage { nmigen = pkgs.python3Packages.buildPythonPackage {
name = "nmigen"; name = "nmigen";
version = "2019-08-26"; version = "2019-10-06";
src = pkgs.fetchFromGitHub { src = pkgs.fetchgit {
owner = "m-labs"; url = "https://github.com/m-labs/nmigen";
repo = "nmigen"; rev = "2512a9a12d2c062b8f34330c379ec523b125f38d";
rev = "2168ff512bfe04806b35c09d3b1d265a16c4ddbc"; sha256 = "0mi2snd8daabdmcbmc10hxzjmnmx85rnx1njqmrj1ll2jin3ncq7";
sha256 = "0ij9idvlqsjzzr50vyg2ziabj7lv7yi8s0826g3acrn45hfv4535"; leaveDotGit = true;
}; };
checkPhase = "PATH=${pkgs.yosys}/bin:${pkgs.symbiyosys}/bin:${pkgs.yices}/bin:$PATH python -m unittest discover nmigen.test -v"; 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 ]; propagatedBuildInputs = with pkgs.python3Packages; [ bitarray pyvcd jinja2 ];
}; };
glasgow = pkgs.python3Packages.buildPythonApplication rec { glasgow = pkgs.python3Packages.buildPythonApplication rec {
pname = "glasgow"; pname = "glasgow";
version = "2019-08-28"; version = "2019-10-07";
src = pkgs.fetchFromGitHub { src = pkgs.fetchgit {
owner = "GlasgowEmbedded"; url = "https://github.com/GlasgowEmbedded/Glasgow";
repo = "Glasgow"; rev = "bfe49bebc4483b32eed8ec127a98a9fa2e77e7d4";
rev = "c103a8fc7945a0e46fb8b50fab63c51efe27e242"; sha256 = "0wvn7ysixgxm35ghdp0cdqfp5pxpbxvr1r9d5amcz3ss6bd2844c";
sha256 = "0mfzjf74w71yasbj9jvdx86ipc3wrmxiqa819b586k9dsskzgw32";
fetchSubmodules = true; fetchSubmodules = true;
leaveDotGit = true;
}; };
patches = [ ./glasgow-applet.diff ]; patches = [ ./glasgow-applet.diff ];
nativeBuildInputs = with pkgs; [ gnumake sdcc ]; nativeBuildInputs = with pkgs; [ pkgs.python3Packages.setuptools_scm git gnumake sdcc ];
propagatedBuildInputs = ( propagatedBuildInputs = (
[ fx2 nmigen ] ++ [ fx2 nmigen ] ++
(with pkgs.python3Packages; [ libusb1 aiohttp pyvcd bitarray crcmod ]) ++ (with pkgs.python3Packages; [ setuptools libusb1 aiohttp pyvcd bitarray crcmod ]) ++
(with pkgs; [ yosys nextpnr icestorm ])); (with pkgs; [ yosys nextpnr icestorm ]));
preBuild = '' preBuild = ''
cd software cd software