11 python3.pkgs.buildPythonApplication rec {
13 version = "0-unstable-2024-10-24";
16 tag = builtins.elemAt (lib.splitString "-" version) 0;
17 rev = lib.substring 0 7 src.rev;
18 in "${tag}.1.dev2085+g${rev}";
22 src = fetchFromGitHub {
23 owner = "GlasgowEmbedded";
25 rev = "3d7a14165f9f5179bcd2a2a119ab4bbf9d81326c";
26 sha256 = "sha256-fhT5xRq4VE8lOTJI470E2PPTSPSUHh90S17MdilFWAA=";
30 python3.pkgs.pdm-backend
34 propagatedBuildInputs = with python3.pkgs; [
46 python3.pkgs.unittestCheckHook
52 enableParallelBuilding = true;
54 __darwinAllowLocalNetworking = true;
57 make -C firmware LIBFX2=${python3.pkgs.fx2}/share/libfx2
58 cp firmware/glasgow.ihex software/glasgow
60 export PDM_BUILD_SCM_VERSION="${realVersion}"
63 # installCheck tries to build_ext again
64 doInstallCheck = false;
67 mkdir -p $out/etc/udev/rules.d
68 cp $src/config/*.rules $out/etc/udev/rules.d
72 export PYTHONWARNINGS="ignore::DeprecationWarning"
73 # tests attempt to cache bitstreams
75 export XDG_CACHE_HOME=$TMPDIR
81 "--set" "YOSYS" "${yosys}/bin/yosys"
82 "--set" "ICEPACK" "${icestorm}/bin/icepack"
83 "--set" "NEXTPNR_ICE40" "${nextpnr}/bin/nextpnr-ice40"
86 passthru.updateScript = unstableGitUpdater {
87 hardcodeZeroVersion = true;
91 description = "Software for Glasgow, a digital interface multitool";
92 homepage = "https://github.com/GlasgowEmbedded/Glasgow";
93 license = licenses.bsd0;
94 maintainers = with maintainers; [ thoughtpolice ];
95 mainProgram = "glasgow";