summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfpi2024-03-29 13:51:52 +0100
committerfpi2024-03-29 14:27:46 +0100
commit166abaf80034739c1118a3678b28ef2c45beb129 (patch)
tree435a80e4efb22fc10428e9f19da6c5e537fef2ba
parentInitial version (diff)
Add cicsim
-rw-r--r--flake.lock17
-rw-r--r--flake.nix45
2 files changed, 60 insertions, 2 deletions
diff --git a/flake.lock b/flake.lock
index 1bf288f..2d3b53b 100644
--- a/flake.lock
+++ b/flake.lock
@@ -32,6 +32,22 @@
"type": "github"
}
},
+ "cicsim": {
+ "flake": false,
+ "locked": {
+ "lastModified": 1710677709,
+ "narHash": "sha256-p69rroxTh2nsR7UjVb0kBlQ/USD/mskmKy76yEKZ82g=",
+ "owner": "wulffern",
+ "repo": "cicsim",
+ "rev": "06240aa1e4519ad02cbd7d14cad95c883f747420",
+ "type": "github"
+ },
+ "original": {
+ "owner": "wulffern",
+ "repo": "cicsim",
+ "type": "github"
+ }
+ },
"efabless_mpw_precheck": {
"flake": false,
"locked": {
@@ -157,6 +173,7 @@
},
"root": {
"inputs": {
+ "cicsim": "cicsim",
"nixpkgs": "nixpkgs",
"open_pdks": "open_pdks"
}
diff --git a/flake.nix b/flake.nix
index 2df09e3..c18b158 100644
--- a/flake.nix
+++ b/flake.nix
@@ -8,17 +8,54 @@
url = "github:fpiper/open_pdks-flake";
inputs.nixpkgs.follows = "nixpkgs";
};
+ cicsim = {
+ url = "github:wulffern/cicsim";
+ flake = false;
+ };
};
- outputs = { self, nixpkgs, open_pdks }:
+ outputs = { self, nixpkgs, open_pdks, cicsim }:
let
pkgs = import nixpkgs {
system = "x86_64-linux";
};
in {
+ packages.x86_64-linux.cicsim =
+ let pkgs = import nixpkgs {
+ system = "x86_64-linux";
+ };
+ in pkgs.python3.pkgs.buildPythonPackage rec {
+ name = "cicsim";
+ format = "setuptools";
+ src = cicsim;
+ doCheck = false;
+
+ propagatedBuildInputs = with pkgs.python311Packages; [
+ pandas
+ tabulate
+ click
+ matplotlib
+ numpy
+ pyyaml
+ jinja2
+ ];
+ buildInputs = with pkgs.python311Packages; [
+ pip
+ wheel
+ setuptools
+ # tikzplotlib # broken with matplotlib 3.8
+ ];
+ };
+
devShells.x86_64-linux.default = self.devShells.x86_64-linux.osic;
- devShells.x86_64-linux.osic = pkgs.mkShell {
+ devShells.x86_64-linux.osic = let
+ finalPython = pkgs.python3.override {
+ packageOverrides = python-self: python-super: {
+ cicsim = self.packages.x86_64-linux.cicsim;
+ };
+ };
+ in pkgs.mkShell {
shellHook = ''
export PS1="osic $ "
export PDK_ROOT="${open_pdks.outputs.packages.x86_64-linux.open_pdks}/pdk"
@@ -27,6 +64,10 @@
pkgs.ngspice
pkgs.magic-vlsi
pkgs.xschem
+ (finalPython.withPackages (ps: [
+ ps.cicsim
+ ]))
+ pkgs.pandoc
];
};
};