aiger: clean up configurePhase, install multi-output objects/headers

The library and header files are useful for other tools, such as
the upcoming 'lingeling'.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
This commit is contained in:
Austin Seipp 2018-08-15 14:55:09 -05:00
parent 3d6448250f
commit 6e910b2b3d

View File

@ -13,18 +13,15 @@ stdenv.mkDerivation rec {
configurePhase = '' configurePhase = ''
# Set up picosat, so we can build 'aigbmc' # Set up picosat, so we can build 'aigbmc'
echo $(pwd)
ls ..
mkdir ../picosat mkdir ../picosat
ln -s ${picosat}/include/picosat/picosat.h ../picosat/picosat.h ln -s ${picosat}/include/picosat/picosat.h ../picosat/picosat.h
ln -s ${picosat}/lib/picosat.o ../picosat/picosat.o ln -s ${picosat}/lib/picosat.o ../picosat/picosat.o
ln -s ${picosat}/share/picosat.version ../picosat/VERSION ln -s ${picosat}/share/picosat.version ../picosat/VERSION
ls ..
./configure.sh ./configure.sh
''; '';
installPhase = '' installPhase = ''
mkdir -p $out/bin mkdir -p $out/bin $dev/include $lib/lib
# Do the installation manually, as the Makefile has odd # Do the installation manually, as the Makefile has odd
# cyrillic characters, and this is easier than adding # cyrillic characters, and this is easier than adding
@ -41,8 +38,13 @@ stdenv.mkDerivation rec {
for x in ''${BINS[*]}; do for x in ''${BINS[*]}; do
install -m 755 -s $x $out/bin/$x install -m 755 -s $x $out/bin/$x
done done
cp -v aiger.o $lib/lib
cp -v aiger.h $dev/include
''; '';
outputs = [ "out" "dev" "lib" ];
meta = { meta = {
description = "And-Inverter Graph (AIG) utilities"; description = "And-Inverter Graph (AIG) utilities";
homepage = http://fmv.jku.at/aiger/; homepage = http://fmv.jku.at/aiger/;