Use pkgconfig to find Nix
This commit is contained in:
parent
c1bf3bb0f2
commit
4727165832
23
configure.ac
23
configure.ac
|
@ -35,14 +35,6 @@ fi
|
||||||
|
|
||||||
NEED_PROG(perl, perl)
|
NEED_PROG(perl, perl)
|
||||||
|
|
||||||
AC_ARG_WITH(nix, AC_HELP_STRING([--with-nix=PATH],
|
|
||||||
[prefix of nix]),
|
|
||||||
nix=$withval, nix=/nix-missing)
|
|
||||||
AC_SUBST(nix)
|
|
||||||
|
|
||||||
PATH="$nix/bin:$PATH"
|
|
||||||
export PATH
|
|
||||||
|
|
||||||
NEED_PROG([NIX_STORE_PROGRAM], [nix-store])
|
NEED_PROG([NIX_STORE_PROGRAM], [nix-store])
|
||||||
|
|
||||||
AC_MSG_CHECKING([whether $NIX_STORE_PROGRAM is recent enough])
|
AC_MSG_CHECKING([whether $NIX_STORE_PROGRAM is recent enough])
|
||||||
|
@ -61,21 +53,8 @@ else
|
||||||
AC_MSG_ERROR([`$NIX_STORE_PROGRAM' doesn't support `--timeout'; please use a newer version.])
|
AC_MSG_ERROR([`$NIX_STORE_PROGRAM' doesn't support `--timeout'; please use a newer version.])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
old_CPPFLAGS="$CPPFLAGS"
|
PKG_CHECK_MODULES([NIX], [nix-main nix-expr nix-store])
|
||||||
old_LIBS="$LIBS"
|
|
||||||
|
|
||||||
CPPFLAGS="$CPPFLAGS -I$nix/include/nix"
|
|
||||||
LDFLAGS="$LDFLAGS -L$nix/lib"
|
|
||||||
|
|
||||||
AC_CHECK_HEADER([store-api.hh], [:],
|
|
||||||
[AC_MSG_ERROR([Nix headers not found; please install Nix or check the `--with-nix' option.])])
|
|
||||||
AC_CHECK_LIB([nixexpr], [_ZN3nix9EvalStateC1ERKSt4listISsSaISsEE], [:],
|
|
||||||
[AC_MSG_ERROR([Nix library not found; please install Nix or check the `--with-nix' option.])])
|
|
||||||
|
|
||||||
CPPFLAGS="$old_CPPFLAGS"
|
|
||||||
LIBS="$old_LIBS"
|
|
||||||
|
|
||||||
PKG_CHECK_MODULES([BDW_GC], [bdw-gc])
|
|
||||||
PKG_CHECK_MODULES([GUILE], [guile-2.0], [HAVE_GUILE=yes], [HAVE_GUILE=no])
|
PKG_CHECK_MODULES([GUILE], [guile-2.0], [HAVE_GUILE=yes], [HAVE_GUILE=no])
|
||||||
|
|
||||||
if test "x$HAVE_GUILE" = xyes; then
|
if test "x$HAVE_GUILE" = xyes; then
|
||||||
|
|
|
@ -37,7 +37,7 @@ in rec {
|
||||||
version = builtins.readFile ./version;
|
version = builtins.readFile ./version;
|
||||||
|
|
||||||
buildInputs =
|
buildInputs =
|
||||||
[ perl libxslt dblatex tetex nukeReferences pkgconfig boehmgc git openssl ];
|
[ perl libxslt dblatex tetex nukeReferences pkgconfig nixUnstable git openssl ];
|
||||||
|
|
||||||
versionSuffix = if officialRelease then "" else "pre${toString hydraSrc.revCount}-${hydraSrc.gitTag}";
|
versionSuffix = if officialRelease then "" else "pre${toString hydraSrc.revCount}-${hydraSrc.gitTag}";
|
||||||
|
|
||||||
|
@ -51,9 +51,7 @@ in rec {
|
||||||
'';
|
'';
|
||||||
|
|
||||||
configureFlags =
|
configureFlags =
|
||||||
[ "--with-nix=${nixUnstable}"
|
[ "--with-docbook-xsl=${docbook_xsl}/xml/xsl/docbook" ];
|
||||||
"--with-docbook-xsl=${docbook_xsl}/xml/xsl/docbook"
|
|
||||||
];
|
|
||||||
|
|
||||||
postDist = ''
|
postDist = ''
|
||||||
make -C doc/manual install prefix="$out"
|
make -C doc/manual install prefix="$out"
|
||||||
|
@ -128,10 +126,9 @@ in rec {
|
||||||
releaseTools.nixBuild {
|
releaseTools.nixBuild {
|
||||||
name = "hydra";
|
name = "hydra";
|
||||||
src = tarball;
|
src = tarball;
|
||||||
configureFlags = "--with-nix=${nix}";
|
|
||||||
|
|
||||||
buildInputs =
|
buildInputs =
|
||||||
[ makeWrapper libtool unzip nukeReferences pkgconfig boehmgc sqlite
|
[ makeWrapper libtool unzip nukeReferences pkgconfig sqlite
|
||||||
gitAndTools.topGit mercurial darcs subversion bazaar openssl bzip2
|
gitAndTools.topGit mercurial darcs subversion bazaar openssl bzip2
|
||||||
guile # optional, for Guile + Guix support
|
guile # optional, for Guile + Guix support
|
||||||
perlDeps perl
|
perlDeps perl
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
bin_PROGRAMS = hydra-eval-jobs
|
bin_PROGRAMS = hydra-eval-jobs
|
||||||
|
|
||||||
hydra_eval_jobs_SOURCES = hydra-eval-jobs.cc
|
hydra_eval_jobs_SOURCES = hydra-eval-jobs.cc
|
||||||
hydra_eval_jobs_LDADD = -lnixmain -lnixexpr -L$(nix)/lib/nix $(BDW_GC_LIBS)
|
hydra_eval_jobs_LDADD = $(NIX_LIBS)
|
||||||
|
|
||||||
AM_CXXFLAGS = \
|
AM_CXXFLAGS = $(NIX_CFLAGS)
|
||||||
-I$(nix)/include/nix \
|
|
||||||
$(BDW_GC_CFLAGS)
|
|
||||||
|
|
Loading…
Reference in a new issue