Loading files
This file is pinned to the selected release. Download the original to open it in your design tool.
aaf7a9387This file is pinned to the selected release. Download the original to open it in your design tool.
# SPDX-License-Identifier: MIT
# Copyright (c) 2025 LibreLane Contributors
# Copyright (c) 2023-2025 UmbraLogic Technologies LLC
{
description = "open-source infrastructure for implementing chip design flows";
inputs = {
nix-eda.url = "github:fossi-foundation/nix-eda/7.8.0";
ciel.url = "github:fossi-foundation/ciel/3.0.0";
devshell.url = "github:numtide/devshell";
flake-compat = {
url = "github:NixOS/flake-compat";
flake = false;
};
};
inputs.ciel.inputs.nix-eda.follows = "nix-eda";
inputs.devshell.inputs.nixpkgs.follows = "nix-eda/nixpkgs";
outputs =
{
self,
nix-eda,
ciel,
devshell,
...
}:
let
nixpkgs = nix-eda.inputs.nixpkgs;
lib = nixpkgs.lib;
in
{
# Common
overlays = {
default = lib.composeManyExtensions [
(ciel.overlays.default)
(
pkgs': pkgs:
let
callPackage = lib.callPackageWith pkgs';
in
{
or-tools_9_14 = callPackage ./nix/or-tools_9_14.nix {
inherit (pkgs'.darwin) DarwinTools;
};
colab-env = callPackage ./nix/colab-env.nix { };
opensta = callPackage ./nix/opensta.nix { };
openroad-abc = callPackage ./nix/openroad-abc.nix { };
openroad = callPackage ./nix/openroad.nix { };
}
)
(nix-eda.composePythonOverlay (
pkgs': pkgs: pypkgs': pypkgs:
let
callPythonPackage = lib.callPackageWith (pkgs' // pypkgs');
in
{
libparse = callPythonPackage ./nix/libparse.nix { };
sphinx-tippy = callPythonPackage ./nix/sphinx-tippy.nix { };
sphinx-subfigure = callPythonPackage ./nix/sphinx-subfigure.nix { };
py-mon = callPythonPackage ./nix/py-mon.nix { };
# ---
librelane = callPythonPackage ./default.nix {
flake = self;
};
}
))
(
pkgs': pkgs:
let
callPackage = lib.callPackageWith pkgs';
in
{
librelane-shell = callPackage ./nix/create-shell.nix { };
}
// lib.optionalAttrs pkgs.stdenv.isLinux {
librelane-docker = callPackage ./nix/docker.nix {
createDockerImage = nix-eda.createDockerImage;
librelane = pkgs'.python3.pkgs.librelane;
};
}
)
];
};
# Formatters
formatter = nix-eda.formatter;
# Packages
legacyPackages = nix-eda.forAllSystems (
system:
import nix-eda.inputs.nixpkgs {
inherit system;
overlays = [
devshell.overlays.default
nix-eda.overlays.default
self.overlays.default
];
}
);
packages = nix-eda.forAllSystems (
system:
let
pkgs = self.legacyPackages."${system}";
in
{
inherit (pkgs)
colab-env
opensta
openroad-abc
openroad
;
inherit (pkgs.python3.pkgs) librelane;
default = pkgs.python3.pkgs.librelane;
}
// lib.optionalAttrs pkgs.stdenv.isLinux {
inherit (pkgs) librelane-docker;
}
);
# Development Shells
devShells = nix-eda.forAllSystems (
system:
let
pkgs = self.legacyPackages."${system}";
callPackage = lib.callPackageWith pkgs;
in
{
# These devShells are rather unorthodox for Nix devShells in that they
# include the package itself. For a proper devShell, try .#dev.
default = pkgs.librelane-shell;
notebook = pkgs.librelane-shell.override ({
extra-packages = with pkgs; [
jupyter
];
});
dev = pkgs.librelane-shell.override ({
extra-packages = with pkgs; [
alejandra
];
extra-python-packages =
ps: with ps; [
pyfakefs
pytest
pytest-xdist
pytest-cov
pillow
mdformat
black
ipython
tokenize-rt
flake8
mypy
types-deprecated
types-pyyaml
types-psutil
types-lxml
];
include-librelane = false;
});
docs = pkgs.librelane-shell.override ({
extra-packages = with pkgs; [
alejandra
imagemagick
watchexec
];
extra-python-packages =
ps: with ps; [
pyfakefs
pytest
pytest-xdist
pillow
mdformat
furo
docutils
sphinx
sphinx-autobuild
sphinx-autodoc-typehints
sphinx-design
myst-parser
docstring-parser
sphinx-copybutton
sphinxcontrib-spelling
sphinxcontrib-bibtex
sphinx-tippy
sphinx-subfigure
];
include-librelane = false;
});
}
);
};
}