2021-08-16 12:06:47 -05:00
|
|
|
{
|
|
|
|
description = "Coriolis is a free database, placement tool and routing tool for VLSI design.";
|
|
|
|
|
|
|
|
# Nixpkgs / NixOS version to use.
|
|
|
|
inputs.nixpkgs.url = "github:NixOS/nixpkgs?ref=nixos-21.05";
|
|
|
|
|
|
|
|
outputs = { self, nixpkgs }:
|
|
|
|
let
|
|
|
|
|
|
|
|
# Generate a user-friendly version numer.
|
2021-08-27 09:26:33 -05:00
|
|
|
#version = builtins.substring 0 8 self.lastModifiedDate;
|
|
|
|
version = "unstable";
|
2021-08-16 12:06:47 -05:00
|
|
|
|
|
|
|
# System types to support.
|
|
|
|
supportedSystems = [ "x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin" ];
|
|
|
|
|
|
|
|
# Helper function to generate an attrset '{ x86_64-linux = f "x86_64-linux"; ... }'.
|
|
|
|
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
|
|
|
|
|
|
|
|
# Nixpkgs instantiated for supported system types.
|
|
|
|
nixpkgsFor = forAllSystems (system: import nixpkgs { inherit system; overlays = [ self.overlay ]; });
|
|
|
|
|
2021-08-22 05:54:22 -05:00
|
|
|
meta = with nixpkgs.lib; {
|
|
|
|
description = "Coriolis is a free database, placement tool and routing tool for VLSI design.";
|
|
|
|
homepage = "http://coriolis.lip6.fr/";
|
|
|
|
license = licenses.gpl3;
|
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
2021-08-16 12:06:47 -05:00
|
|
|
|
2021-08-27 09:26:33 -05:00
|
|
|
override = drv: drv.overrideAttrs (o: {
|
|
|
|
preConfigure = ''
|
|
|
|
cmakeFlagsArray+=(-DCMAKE_MODULE_PATH="$(sed -e 's|:|/share/cmake/Modules;|g' <<< "$CMAKE_PREFIX_PATH:")")
|
|
|
|
'' + (o.preConfigure or "");
|
|
|
|
});
|
|
|
|
|
|
|
|
components = [ "vlsisapd" "lefdef" "bootstrap" "hurricane" "crlcore" "cumulus" "flute" "etesian" "anabatic" "coloquinte" ];
|
2021-08-23 03:44:07 -05:00
|
|
|
|
2021-08-16 12:06:47 -05:00
|
|
|
in
|
|
|
|
|
|
|
|
rec {
|
2021-08-23 03:44:07 -05:00
|
|
|
overlay = final: prev:
|
|
|
|
builtins.foldl'
|
|
|
|
(acc: elem: acc // {
|
2021-08-27 09:26:33 -05:00
|
|
|
"coriolis-${elem}" = override (final.callPackage (
|
2021-08-23 03:44:07 -05:00
|
|
|
import "${self}/nix/${elem}.nix" { inherit version meta; }
|
2021-08-27 09:26:33 -05:00
|
|
|
) {});
|
2021-08-23 03:44:07 -05:00
|
|
|
}) {} components;
|
|
|
|
|
|
|
|
packages = forAllSystems (system: builtins.foldl' (acc: elem: acc // {
|
|
|
|
${elem} = nixpkgsFor.${system}.${"coriolis-${elem}"};
|
|
|
|
}) {} components);
|
2021-08-16 12:06:47 -05:00
|
|
|
|
|
|
|
defaultPackage = forAllSystems (system: self.packages.${system}.coriolis);
|
|
|
|
devShell = defaultPackage;
|
|
|
|
|
2021-08-22 05:54:22 -05:00
|
|
|
#hydraJobs.coriolis = self.defaultPackage;
|
2021-08-16 12:06:47 -05:00
|
|
|
};
|
|
|
|
}
|