Get vlsisapd and bootstrap building!

This commit is contained in:
Las Safin 2021-08-22 10:54:22 +00:00
parent be6260ab64
commit 7c5679408f
No known key found for this signature in database
GPG Key ID: E7FA928911B61ED6
3 changed files with 59 additions and 6 deletions

View File

@ -19,6 +19,7 @@
# Nixpkgs instantiated for supported system types.
nixpkgsFor = forAllSystems (system: import nixpkgs { inherit system; overlays = [ self.overlay ]; });
/*
coriolis =
{ lib, stdenv, python2, cmake_2_8, boost, bison, flex
, libxml2, rapidjson, which, qt4, zlib, bzip2 }:
@ -29,14 +30,21 @@
src = ./.;
postPatch = ''
patchShebangs .
export HOME=/build
mkdir -p /build/coriolis-2.x/src
dir="$PWD"
mv "$PWD" -T /build/coriolis-2.x/src/coriolis
patchShebangs .
fixCmakeFiles .
'';
configurePhase = "runHook preConfigure; runHook postConfigure";
configurePhase = ''
runHook preConfigure
makeCmakeFindLibs
export LDFLAGS="$NIX_LDFLAGS"
runHook postConfigure
'';
hardeningDisable = [ "format" ];
@ -63,22 +71,32 @@
platforms = platforms.all;
};
};
*/
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;
};
in
rec {
overlay = final: prev: {
coriolis = final.callPackage coriolis {};
coriolis-vlsisapd = final.callPackage (import ./nix/vlsisapd.nix { inherit version meta; }) {};
coriolis-bootstrap = final.callPackage (import ./nix/bootstrap.nix { inherit version meta; }) {};
};
packages = forAllSystems (system:
{
inherit (nixpkgsFor.${system}) coriolis;
with nixpkgsFor.${system}; {
vlsisapd = coriolis-vlsisapd;
bootstrap = coriolis-bootstrap;
});
defaultPackage = forAllSystems (system: self.packages.${system}.coriolis);
devShell = defaultPackage;
hydraJobs.coriolis = self.defaultPackage;
#hydraJobs.coriolis = self.defaultPackage;
};
}

15
nix/bootstrap.nix Normal file
View File

@ -0,0 +1,15 @@
{ version, meta }:
{ lib, stdenv, python2, cmake, boost, bison, flex
, libxml2, rapidjson, which, qt4, zlib, bzip2, ninja }:
stdenv.mkDerivation {
pname = "coriolis-bootstrap";
src = ../bootstrap;
buildInputs = [ python2 ];
nativeBuildInputs = [ cmake ninja ];
inherit version meta;
}

20
nix/vlsisapd.nix Normal file
View File

@ -0,0 +1,20 @@
{ version, meta }:
{ lib, stdenv, python2, cmake, boost, bison, flex
, libxml2, rapidjson, which, qt4, zlib, bzip2, ninja
, coriolis-bootstrap }:
let boostWithPython = boost.override { enablePython = true; python = python2; }; in
stdenv.mkDerivation {
pname = "coriolis-vlsisapd";
src = ../vlsisapd;
cmakeFlags = [ "-DCMAKE_MODULE_PATH=${coriolis-bootstrap}/share/cmake/Modules" ];
buildInputs = [ python2 boostWithPython coriolis-bootstrap libxml2 bison flex qt4 ];
nativeBuildInputs = [ cmake ninja ];
inherit version meta;
}