glasgow: unstable-2019-08-31 -> unstable-2019-09-28

This commit is contained in:
Emily 2019-09-27 15:07:31 +01:00 committed by Austin Seipp
parent 32c6c0ef30
commit abcd56bd77

View File

@ -1,6 +1,8 @@
{ lib { lib
, buildPythonPackage , buildPythonPackage
, fetchFromGitHub , fetchFromGitHub
, setuptools
, setuptools_scm
, sdcc , sdcc
, nmigen , nmigen
, fx2 , fx2
@ -16,19 +18,21 @@
buildPythonPackage rec { buildPythonPackage rec {
pname = "glasgow"; pname = "glasgow";
version = "unstable-2019-08-31"; version = "unstable-2019-09-28";
realVersion = lib.substring 0 7 src.rev; # python setup.py --version
realVersion = "0.1.dev1234+g${lib.substring 0 7 src.rev}";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "GlasgowEmbedded"; owner = "GlasgowEmbedded";
repo = "Glasgow"; repo = "Glasgow";
rev = "21641a13c6a0daaf8618aff3c5bfffcb26ef6cca"; rev = "a1cc0333315847980806fd0330021c6de05c5395";
sha256 = "1dpm1jmm4fg8xf17s6h9g5sc09gq8b6xq955sv2x11nrbqf98l4v"; sha256 = "0rdx7fymz828i73bc559sr67aikydz1m8s2a0i6c86gznh1s3cfk";
}; };
nativeBuildInputs = [ sdcc ]; nativeBuildInputs = [ setuptools_scm sdcc ];
propagatedBuildInputs = [ propagatedBuildInputs = [
setuptools
nmigen nmigen
fx2 fx2
libusb1 libusb1
@ -38,15 +42,11 @@ buildPythonPackage rec {
crcmod crcmod
]; ];
postPatch = ''
substituteInPlace software/setup.py \
--replace 'versioneer.get_version()' '"${realVersion}"'
'';
preBuild = '' preBuild = ''
make -C firmware LIBFX2=${fx2}/share/libfx2 make -C firmware LIBFX2=${fx2}/share/libfx2
cp firmware/glasgow.ihex software/glasgow cp firmware/glasgow.ihex software/glasgow
cd software cd software
export SETUPTOOLS_SCM_PRETEND_VERSION="${realVersion}"
''; '';
# a couple failing tests and also installCheck tries to build_ext again # a couple failing tests and also installCheck tries to build_ext again