Skip to content

Instantly share code, notes, and snippets.

@edef1c
Last active February 3, 2019 18:25
Show Gist options
  • Save edef1c/90a48e3fdff8130b2981079ead785c2a to your computer and use it in GitHub Desktop.
Save edef1c/90a48e3fdff8130b2981079ead785c2a to your computer and use it in GitHub Desktop.
the software for Glasgow, the Scottish Army Knife for electronics, packaged for Nix
{ python3Packages, fetchgit, fetchFromGitHub, sdcc, makeWrapper, yosys, nextpnr, icestorm }:
let
self = python3Packages // (with self; {
fx2 = buildPythonPackage rec {
pname = "fx2";
version = "0.6";
src = fetchPypi {
inherit pname version;
sha256 = "c2126cd9fff71e399d664ac0e40958d609e80209ac8950b4e2ca07d2e8fb06d9";
};
propagatedBuildInputs = [ libusb1 ];
};
migen = buildPythonPackage {
pname = "migen";
version = "2019-01-31";
src = fetchFromGitHub {
owner = "m-labs";
repo = "migen";
rev = "afe4405becdbc76539f0195c319367187012b05e";
sha256 = "1f288a7ll1d1gjmml716wsjf1jyq9y903i2312bxb8pwrg7fwgvz";
};
propagatedBuildInputs = [ colorama sphinx sphinx_rtd_theme ];
};
glasgow = buildPythonPackage {
pname = "glasgow";
version = "2019-01-23";
src = fetchgit {
url = https://github.com/whitequark/Glasgow;
rev = "c6ae4e6b5f361e99161e9931b8f1bc287c8afac1";
sha256 = "1fl60z7hbg10ppwars4ria82fj1m6g7i73ypvpni5066yf11ja2n";
fetchSubmodules = true;
};
preConfigure = "cd software";
propagatedBuildInputs = [
versioneer migen fx2 libusb1 pyvcd bitarray crcmod
yosys nextpnr icestorm
];
buildInputs = [ sdcc makeWrapper ];
doCheck = false;
};
});
in self.glasgow
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment