Skip to content

Commit c4b3ed3

Browse files
authored
chore: update magic, netgen, cocotb (#33)
- cocotb to 2.0.0 (+ vhdl support on mac) - netgen to 1.5.300 - magic to 8.3.554
1 parent 396cbc9 commit c4b3ed3

File tree

4 files changed

+25
-29
lines changed

4 files changed

+25
-29
lines changed

flake.nix

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,12 @@
6262
self.composePythonOverlay (pkgs': pkgs: pypkgs': pypkgs: let
6363
callPythonPackage = lib.callPackageWith (pkgs' // pypkgs');
6464
in {
65-
cocotb = callPythonPackage ./nix/cocotb.nix {};
65+
cocotb = callPythonPackage ./nix/cocotb.nix {
66+
ghdl =
67+
if (lib.lists.any (el: el == pkgs'.system) pkgs'.ghdl-bin.meta.platforms)
68+
then pkgs'.ghdl-bin
69+
else pkgs'.ghdl-llvm;
70+
};
6671
kfactory = pypkgs.kfactory.overrideAttrs (attrs': attrs: {
6772
version = "1.9.3";
6873
src = pypkgs'.fetchPypi {

nix/cocotb.nix

Lines changed: 15 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Copyright (c) 2025 nix-eda Contributors
22
#
3+
# Adapted from nixpkgs
4+
#
5+
# Copyright (c) 2003-2025 Eelco Dolstra and the Nixpkgs/NixOS contributors
6+
#
37
# Permission is hereby granted, free of charge, to any person obtaining
48
# a copy of this software and associated documentation files (the
59
# "Software"), to deal in the Software without restriction, including
@@ -30,10 +34,10 @@
3034
swig,
3135
iverilog,
3236
ghdl,
33-
stdenv,
37+
zlib,
3438
# Metadata
35-
version ? "1.9.2",
36-
sha256 ? "sha256-7KCo7g2I1rfm8QDHRm3ZKloHwjDIICnJCF8KhaFdvqY=",
39+
version ? "2.0.0",
40+
sha256 ? "sha256-BpshczKA83ZeytGDrHEg6IAbI5FxciAUnzwE10hgPC0=",
3741
}: let
3842
self = buildPythonPackage {
3943
pname = "cocotb";
@@ -48,33 +52,20 @@
4852
inherit sha256;
4953
};
5054

51-
buildInputs = [setuptools];
55+
buildInputs = [setuptools zlib];
5256
propagatedBuildInputs = [find-libpython];
5357

5458
postPatch = ''
5559
patchShebangs bin/*.py
5660
'';
5761

58-
disabledTests =
59-
[
60-
"test_cocotb_parallel"
61-
"test_cocotb"
62-
]
63-
++ (lib.lists.optionals (!stdenv.isLinux) ["test_vhdl"]);
64-
65-
nativeCheckInputs =
66-
[
67-
cocotb-bus
68-
pytestCheckHook
69-
swig
70-
iverilog
71-
]
72-
++ (lib.lists.optionals stdenv.isLinux [ghdl]);
73-
74-
preCheck = ''
75-
export PATH=$out/bin:$PATH
76-
mv cocotb cocotb.hidden
77-
'';
62+
nativeCheckInputs = [
63+
cocotb-bus
64+
pytestCheckHook
65+
swig
66+
iverilog
67+
ghdl
68+
];
7869

7970
pythonImportsCheck = ["cocotb"];
8071

nix/magic.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@
4545
cairo,
4646
python3,
4747
gnused,
48-
version ? "8.3.528",
48+
version ? "8.3.554",
4949
rev ? null,
50-
sha256 ? "sha256-TcNzmWH3YAYmhU6E3Cru2bNjCazk+UAESrDjWvYBLfY=",
50+
sha256 ? "sha256-5eGaQdLD3Z8GwnsC0esGldxcXLAW1vByldTPVFOf8a4=",
5151
}:
5252
clangStdenv.mkDerivation {
5353
pname = "magic-vlsi";

nix/netgen.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@
1919
tk,
2020
m4,
2121
python3,
22-
version ? "1.5.295",
22+
version ? "1.5.300",
2323
rev ? null,
24-
sha256 ? "sha256-e/Vld5euQrm2oc9Ijs2CXWDmr3tfmnO3BTR8Co8la6E=",
24+
sha256 ? "sha256-LM6u3ovhIwbHMWmQP/Ajde4f99mN0SHG+cuhrCAfQBs=",
2525
}:
2626
clangStdenv.mkDerivation {
2727
pname = "netgen";

0 commit comments

Comments
 (0)