Skip to content

Commit ba1eb1f

Browse files
committed
make docs with nix works. nix fmt.
1 parent 81472ea commit ba1eb1f

3 files changed

Lines changed: 143 additions & 53 deletions

File tree

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ just_test:
1414
make -C test
1515
test: generate_verilog just_test
1616
docs:
17-
tt/tt_tool.py --create-pdf
17+
python3 tt/tt_tool.py --create-pdf
1818
nix:
19-
nix-shell --pure --run 'make docs'
19+
nix develop --command make all
2020

21-
.PHONY: all docs generate_verilog just_test nix test
21+
.PHONY: all docs generate_verilog just_test test docs nix

flake.lock

Lines changed: 100 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 40 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,49 @@
11
{
2-
# 1. Inputs: Define the sources for dependencies
32
inputs = {
4-
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
3+
nixpkgs.url = "github:eljamm/nixpkgs/init/gdstk";
4+
alejandra.url = "github:kamadorueda/alejandra/4.0.0";
55
};
6-
# ... (rest of the file)
76

8-
# 2. Outputs: Define what this flake provides
9-
outputs = { self, nixpkgs }:
10-
let
11-
# Define the system architecture
12-
system = "x86_64-linux";
7+
outputs = {
8+
self,
9+
nixpkgs,
10+
alejandra,
11+
}: let
12+
system = "x86_64-linux";
13+
pkgs = nixpkgs.legacyPackages.${system};
1314

14-
# Access the specific nixpkgs instance for the defined system
15-
pkgs = nixpkgs.legacyPackages.${system};
15+
pythonEnv = pkgs.python313.withPackages (p: [
16+
p.cairosvg
17+
p.cocotb
18+
p.chevron
19+
p.gitpython
20+
p.klayout
21+
p.matplotlib
22+
p.mistune
23+
p.pip
24+
p.pyaml
25+
p.requests
1626

17-
# 4. Define the complete Python environment
18-
pythonEnv = pkgs.python313.withPackages (p: [
19-
p.cairosvg
20-
p.cocotb
21-
p.chevron
22-
p.gitpython
23-
p.klayout
24-
p.matplotlib
25-
p.mistune
26-
p.pip
27-
p.pyaml
28-
p.requests
29-
]);
27+
pkgs.python3Packages.gdstk
28+
]);
29+
in {
30+
devShells.${system}.default = pkgs.mkShell {
31+
buildInputs = [
32+
pkgs.gnumake
33+
pkgs.bash-completion
34+
pkgs.jdk25
35+
pkgs.sbt
36+
pkgs.cmake
37+
pkgs.iverilog
38+
pythonEnv
39+
];
3040

31-
in {
32-
# 5. Define the development shell
33-
devShells.${system}.default = pkgs.mkShell {
34-
# Core tools and the Python environment
35-
buildInputs = [
36-
pkgs.gnumake
37-
pkgs.bash-completion
38-
pkgs.jdk25
39-
pkgs.sbt
40-
pkgs.cmake # Needed for running manual CMake if necessary
41-
pkgs.iverilog
42-
pythonEnv
43-
];
44-
45-
# Optional: Set a prompt prefix
46-
shellHook = ''
47-
export GONSOLO_PROJECT="TinyQV-GPU"
48-
echo "Entering $GONSOLO_PROJECT development shell..."
49-
'';
50-
};
41+
shellHook = ''
42+
export GONSOLO_PROJECT="TinyQV-GPU"
43+
echo "Entering $GONSOLO_PROJECT development shell..."
44+
'';
5145
};
46+
47+
formatter.${system} = alejandra.defaultPackage.${system};
48+
};
5249
}

0 commit comments

Comments
 (0)