{glasgow,libfx2}: init at 2018-{09-01,08-27}
This commit is contained in:
parent
321efae699
commit
cb5b674b58
4 changed files with 119 additions and 0 deletions
45
pkgs/development/python-modules/fx2/default.nix
Normal file
45
pkgs/development/python-modules/fx2/default.nix
Normal file
|
@ -0,0 +1,45 @@
|
|||
{ lib
|
||||
, buildPythonPackage
|
||||
, python
|
||||
, fetchFromGitHub
|
||||
, sdcc
|
||||
, libusb1
|
||||
, crcmod
|
||||
}:
|
||||
|
||||
buildPythonPackage {
|
||||
pname = "fx2";
|
||||
version = "unstable-2019-08-27";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "whitequark";
|
||||
repo = "libfx2";
|
||||
rev = "dd1e42c7b46ff410dbb18beab46111bb5491400c";
|
||||
sha256 = "0xvlmx6ym0ylrvnlqzf18d475wa0mfci7wkdbv30gl3hgdhsppjz";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ sdcc ];
|
||||
|
||||
propagatedBuildInputs = [ libusb1 crcmod ];
|
||||
|
||||
preBuild = ''
|
||||
cd software
|
||||
${python.pythonForBuild.interpreter} setup.py build_ext
|
||||
'';
|
||||
|
||||
preInstall = ''
|
||||
mkdir -p $out/share/libfx2
|
||||
cp -R ../firmware/library/{.stamp,lib,include,fx2{rules,conf}.mk} \
|
||||
$out/share/libfx2
|
||||
'';
|
||||
|
||||
# installCheckPhase tries to run build_ext again and there are no tests
|
||||
doCheck = false;
|
||||
|
||||
meta = with lib; {
|
||||
description = "Chip support package for Cypress EZ-USB FX2 series microcontrollers";
|
||||
homepage = https://github.com/whitequark/libfx2;
|
||||
license = licenses.bsd0;
|
||||
maintainers = with maintainers; [ emily ];
|
||||
};
|
||||
}
|
66
pkgs/development/python-modules/glasgow/default.nix
Normal file
66
pkgs/development/python-modules/glasgow/default.nix
Normal file
|
@ -0,0 +1,66 @@
|
|||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchFromGitHub
|
||||
, sdcc
|
||||
, nmigen
|
||||
, fx2
|
||||
, libusb1
|
||||
, aiohttp
|
||||
, pyvcd
|
||||
, bitarray
|
||||
, crcmod
|
||||
, yosys
|
||||
, icestorm
|
||||
, nextpnr
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "glasgow";
|
||||
version = "unstable-2019-08-31";
|
||||
realVersion = lib.substring 0 7 src.rev;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "GlasgowEmbedded";
|
||||
repo = "Glasgow";
|
||||
rev = "21641a13c6a0daaf8618aff3c5bfffcb26ef6cca";
|
||||
sha256 = "1dpm1jmm4fg8xf17s6h9g5sc09gq8b6xq955sv2x11nrbqf98l4v";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ sdcc ];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
nmigen
|
||||
fx2
|
||||
libusb1
|
||||
aiohttp
|
||||
pyvcd
|
||||
bitarray
|
||||
crcmod
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace software/setup.py \
|
||||
--replace 'versioneer.get_version()' '"${realVersion}"'
|
||||
'';
|
||||
|
||||
preBuild = ''
|
||||
make -C firmware LIBFX2=${fx2}/share/libfx2
|
||||
cp firmware/glasgow.ihex software/glasgow
|
||||
cd software
|
||||
'';
|
||||
|
||||
# a couple failing tests and also installCheck tries to build_ext again
|
||||
doInstallCheck = false;
|
||||
doCheck = false;
|
||||
|
||||
checkPhase = ''
|
||||
python -m unittest discover
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Software for Glasgow, a digital interface multitool";
|
||||
homepage = https://github.com/GlasgowEmbedded/Glasgow;
|
||||
license = licenses.bsd0;
|
||||
maintainers = with maintainers; [ emily ];
|
||||
};
|
||||
}
|
|
@ -818,6 +818,8 @@ in
|
|||
|
||||
ezstream = callPackage ../tools/audio/ezstream { };
|
||||
|
||||
libfx2 = with python3Packages; toPythonApplication fx2;
|
||||
|
||||
fxlinuxprintutil = callPackage ../tools/misc/fxlinuxprintutil { };
|
||||
|
||||
genymotion = callPackage ../development/mobile/genymotion { };
|
||||
|
@ -842,6 +844,8 @@ in
|
|||
|
||||
gitter = callPackage ../applications/networking/instant-messengers/gitter { };
|
||||
|
||||
glasgow = with python3Packages; toPythonApplication glasgow;
|
||||
|
||||
gucci = callPackage ../tools/text/gucci { };
|
||||
|
||||
grc = callPackage ../tools/misc/grc { };
|
||||
|
|
|
@ -2338,6 +2338,8 @@ in {
|
|||
|
||||
future-fstrings = callPackage ../development/python-modules/future-fstrings { };
|
||||
|
||||
fx2 = callPackage ../development/python-modules/fx2 { };
|
||||
|
||||
gateone = callPackage ../development/python-modules/gateone { };
|
||||
|
||||
# TODO: Remove after 19.03 is branched off:
|
||||
|
@ -2348,6 +2350,8 @@ in {
|
|||
|
||||
GeoIP = callPackage ../development/python-modules/GeoIP { };
|
||||
|
||||
glasgow = callPackage ../development/python-modules/glasgow { };
|
||||
|
||||
gmpy = callPackage ../development/python-modules/gmpy { };
|
||||
|
||||
gmpy2 = callPackage ../development/python-modules/gmpy2 { };
|
||||
|
|
Loading…
Reference in a new issue