wip
This commit is contained in:
parent
f1668cec5f
commit
82b6604e2b
|
@ -0,0 +1,27 @@
|
|||
{
|
||||
"nodes": {
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1628776130,
|
||||
"narHash": "sha256-EyzdilgzoO8YCgck1lkOF1Bp+QVEazJBtuG5GkVY6xg=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "ad6e733d633802620b5eec9be91e837973eac18a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-21.05",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
|
@ -0,0 +1,80 @@
|
|||
{
|
||||
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.
|
||||
version = builtins.substring 0 8 self.lastModifiedDate;
|
||||
|
||||
# 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 ]; });
|
||||
|
||||
coriolis =
|
||||
{ lib, stdenv, python2, cmake, boost, bison, flex, libxml2, rapidjson, which, qt4 }:
|
||||
let boostWithPython = boost.override { enablePython = true; python = python2; }; in
|
||||
stdenv.mkDerivation {
|
||||
name = "coriolis-${version}";
|
||||
|
||||
src = ./.;
|
||||
|
||||
postPatch = ''
|
||||
patchShebangs .
|
||||
export HOME=/build
|
||||
mkdir -p /build/coriolis-2.x/src
|
||||
dir="$PWD"
|
||||
mv "$PWD" -T /build/coriolis-2.x/src/coriolis
|
||||
'';
|
||||
|
||||
configurePhase = "runHook preConfigure; runHook postConfigure";
|
||||
|
||||
hardeningDisable = [ "format" ];
|
||||
|
||||
buildPhase = ''
|
||||
runHook preBuild
|
||||
./bootstrap/ccb.py --project=coriolis --make="-j$NIX_BUILD_CORES install"
|
||||
runHook postBuild
|
||||
'';
|
||||
|
||||
installPhase = "true";
|
||||
|
||||
checkPhase = "true";
|
||||
|
||||
buildInputs = [ python2 boostWithPython libxml2 rapidjson qt4 ];
|
||||
nativeBuildInputs = [ cmake bison flex which ];
|
||||
|
||||
meta = with 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;
|
||||
};
|
||||
};
|
||||
|
||||
in
|
||||
|
||||
rec {
|
||||
overlay = final: prev: {
|
||||
coriolis = final.callPackage coriolis {};
|
||||
};
|
||||
|
||||
packages = forAllSystems (system:
|
||||
{
|
||||
inherit (nixpkgsFor.${system}) coriolis;
|
||||
});
|
||||
|
||||
defaultPackage = forAllSystems (system: self.packages.${system}.coriolis);
|
||||
devShell = defaultPackage;
|
||||
|
||||
hydraJobs.coriolis = self.defaultPackage;
|
||||
};
|
||||
}
|
|
@ -81,7 +81,7 @@
|
|||
add_custom_command ( OUTPUT def.tab.cpp
|
||||
DEPENDS ${DefParserGrammar}
|
||||
COMMAND ${BISON_EXECUTABLE} -v -p defyy -d ${DefParserGrammar} -o def.tab.cpp
|
||||
COMMAND mv def.tab.hpp ${LEFDEF_SOURCE_DIR}/src/def/def/def.tab.h
|
||||
COMMAND cp def.tab.hpp ${LEFDEF_SOURCE_DIR}/src/def/def/def.tab.h
|
||||
#COMMAND mv def.tab.cpp ${LEFDEF_SOURCE_DIR}/src/def/def/def.tab.cpp
|
||||
COMMENT "Generating DEF parser (bison)"
|
||||
)
|
||||
|
|
|
@ -61,8 +61,8 @@
|
|||
add_custom_command ( OUTPUT lef.tab.cpp
|
||||
DEPENDS ${LefParserGrammar}
|
||||
COMMAND ${BISON_EXECUTABLE} -v -p lefyy -d ${LefParserGrammar} -o lef.tab.cpp
|
||||
COMMAND mv lef.tab.hpp ${LEFDEF_SOURCE_DIR}/src/lef/lef/lef.tab.h
|
||||
#COMMAND mv lef.tab.cpp ${LEFDEF_SOURCE_DIR}/src/lef/lef/lef.tab.cpp
|
||||
COMMAND cp lef.tab.hpp ${LEFDEF_SOURCE_DIR}/src/lef/lef/lef.tab.h
|
||||
#COMMAND mv lef.tab.cpp ${LEFDEF_SOURCE_DIR}/src/lef/lef/lef.tab.cpp
|
||||
COMMENT "Generating LEF parser (bison)"
|
||||
)
|
||||
set_source_files_properties ( lef.tab.cpp GENERATED )
|
||||
|
|
Loading…
Reference in New Issue