This repository was archived by the owner on Oct 23, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +75
-62
lines changed
Expand file tree Collapse file tree 4 files changed +75
-62
lines changed Original file line number Diff line number Diff line change 2323 flake = false ;
2424 } ;
2525 abc = {
26- url = github:YosysHQ/abc?rev=0cd90d0d2c5338277d832a1d890bed286486bcf5 ;
26+ url = github:YosysHQ/abc?rev=03da96f12fb4deb153cc0dc73936df346ecd4bcf ;
2727 flake = false ;
2828 } ;
2929 } ;
Original file line number Diff line number Diff line change 3737
3838 doCheck = true ;
3939 } ;
40+
41+ pdmBackend = python . pkgs . buildPythonPackage rec {
42+ pname = "pdm_backend" ;
43+ version = "2.2.1" ;
44+ format = "wheel" ;
45+ src = fetchPypi {
46+ inherit pname version format ;
47+ sha256 = "oz+Clcp9gSDviHGLm2hijozKQQJoa+DweDv1hEOZ8pY=" ;
48+ dist = "py3" ;
49+ python = "py3" ;
50+ } ;
51+
52+ nativeBuildInputs = [ ] ;
53+
54+ doCheck = true ;
55+ } ;
4056in
4157 python . pkgs . buildPythonPackage rec {
4258 pname = "amaranth" ;
4662
4763 nativeBuildInputs = [
4864 git
49- python . pkgs . pdm-backend
65+ pdmBackend
5066 ] ;
5167
5268 propagatedBuildInputs =
5874
5975 buildInputs = [ yosys ] ;
6076
77+ PDM_BUILD_SCM_VERSION = version ;
6178 AMARANTH_USE_YOSYS = "system" ;
6279
6380 doCheck = true ;
Original file line number Diff line number Diff line change 4343
4444 pythonImportsCheck = opts . pythonImportsCheck or [ name ] ;
4545
46- passthru = {
47- inherit devShells ;
46+ passthru . devShells = {
47+ default = self ;
48+
49+ yosys = self . overridePythonAttrs ( prev : {
50+ # TODO: deduplicate with ../flake.nix's devShells.amaranth-yosys.
51+ name = "${ name } +yosys" ;
52+ src = null ;
53+
54+ nativeBuildInputs =
55+ prev . nativeBuildInputs
56+ ++ yosys . nativeBuildInputs
57+ ++ [
58+ (
59+ if stdenv . isDarwin
60+ then lldb
61+ else gdb
62+ )
63+ verilog
64+ ] ;
65+
66+ buildInputs =
67+ ( prev . buildInputs or [ ] )
68+ ++ yosys . buildInputs ;
69+
70+ preShellHook =
71+ lib . replaceStrings [ "@Makefile.conf.hdx@" ] [
72+ ( yosys . overrideAttrs {
73+ makefileConfPrefix = "$(HDX_OUT)" ;
74+ extraMakefileConf = ''
75+ ENABLE_DEBUG=1
76+ STRIP=echo hdx: Not doing this: strip
77+ '' ;
78+ } )
79+ . makefileConf
80+ ]
81+ ( builtins . readFile
82+ ../yosys-shell-hook.sh ) ;
83+
84+ inherit ( amaranth ) AMARANTH_USE_YOSYS ;
85+ } ) ;
4886 } ;
4987
5088 checkPhase = ''
67105 env
68106 '' ;
69107 } ) ;
70-
71- devShells = {
72- default = self ;
73-
74- yosys = self . overridePythonAttrs ( prev : {
75- # TODO: deduplicate with ../flake.nix's devShells.amaranth-yosys.
76- name = "${ name } +yosys" ;
77- src = null ;
78-
79- nativeBuildInputs =
80- prev . nativeBuildInputs
81- ++ yosys . nativeBuildInputs
82- ++ [
83- (
84- if stdenv . isDarwin
85- then lldb
86- else gdb
87- )
88- verilog
89- ] ;
90-
91- buildInputs =
92- ( prev . buildInputs or [ ] )
93- ++ yosys . buildInputs ;
94-
95- preShellHook =
96- lib . replaceStrings [ "@Makefile.conf.hdx@" ] [
97- ( yosys . overrideAttrs {
98- makefileConfPrefix = "$(HDX_OUT)" ;
99- extraMakefileConf = ''
100- ENABLE_DEBUG=1
101- STRIP=echo hdx: Not doing this: strip
102- '' ;
103- } )
104- . makefileConf
105- ]
106- ( builtins . readFile
107- ../yosys-shell-hook.sh ) ;
108-
109- inherit ( amaranth ) AMARANTH_USE_YOSYS ;
110- } ) ;
111- } ;
112108 in
113109 self ;
114110in
You can’t perform that action at this time.
0 commit comments