You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

200 lines
5.4 KiB

  1. # GNU Guix --- Functional package management for GNU
  2. # Copyright © 2012, 2013 Ludovic Courtès <ludo@gnu.org>
  3. #
  4. # This file is part of GNU Guix.
  5. #
  6. # GNU Guix is free software; you can redistribute it and/or modify it
  7. # under the terms of the GNU General Public License as published by
  8. # the Free Software Foundation; either version 3 of the License, or (at
  9. # your option) any later version.
  10. #
  11. # GNU Guix is distributed in the hope that it will be useful, but
  12. # WITHOUT ANY WARRANTY; without even the implied warranty of
  13. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. # GNU General Public License for more details.
  15. #
  16. # You should have received a copy of the GNU General Public License
  17. # along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
  18. #
  19. # Integration of the `guix-daemon' code taken from upstream Nix.
  20. #
  21. BUILT_SOURCES = nix/libstore/schema.sql.hh
  22. CLEANFILES += $(BUILT_SOURCES)
  23. noinst_LIBRARIES = libformat.a libutil.a libstore.a
  24. AM_CXXFLAGS = -Wall
  25. libformat_a_SOURCES = \
  26. nix/boost/format/free_funcs.cc \
  27. nix/boost/format/parsing.cc \
  28. nix/boost/format/format_implementation.cc
  29. libformat_headers = \
  30. nix/boost/weak_ptr.hpp \
  31. nix/boost/throw_exception.hpp \
  32. nix/boost/checked_delete.hpp \
  33. nix/boost/shared_ptr.hpp \
  34. nix/boost/format.hpp \
  35. nix/boost/assert.hpp \
  36. nix/boost/format/macros_default.hpp \
  37. nix/boost/format/format_fwd.hpp \
  38. nix/boost/format/format_class.hpp \
  39. nix/boost/format/exceptions.hpp \
  40. nix/boost/format/group.hpp \
  41. nix/boost/format/feed_args.hpp \
  42. nix/boost/format/internals_fwd.hpp \
  43. nix/boost/format/internals.hpp \
  44. nix/boost/detail/workaround.hpp \
  45. nix/boost/detail/shared_count.hpp \
  46. nix/boost/enable_shared_from_this.hpp
  47. libformat_a_CPPFLAGS = \
  48. -I$(top_srcdir)/nix
  49. libutil_a_SOURCES = \
  50. nix/libutil/archive.cc \
  51. nix/libutil/serialise.cc \
  52. nix/libutil/util.cc \
  53. nix/libutil/xml-writer.cc \
  54. nix/libutil/hash.cc \
  55. nix/libutil/gcrypt-hash.cc
  56. libutil_headers = \
  57. nix/libutil/hash.hh \
  58. nix/libutil/serialise.hh \
  59. nix/libutil/xml-writer.hh \
  60. nix/libutil/util.hh \
  61. nix/libutil/archive.hh \
  62. nix/libutil/types.hh \
  63. nix/libutil/gcrypt-hash.hh \
  64. nix/libutil/md5.h \
  65. nix/libutil/sha1.h \
  66. nix/libutil/sha256.h
  67. libutil_a_CPPFLAGS = \
  68. -I$(top_builddir)/nix \
  69. -I$(top_srcdir)/nix/libutil \
  70. $(libformat_a_CPPFLAGS)
  71. libstore_a_SOURCES = \
  72. nix/libstore/gc.cc \
  73. nix/libstore/globals.cc \
  74. nix/libstore/misc.cc \
  75. nix/libstore/references.cc \
  76. nix/libstore/store-api.cc \
  77. nix/libstore/optimise-store.cc \
  78. nix/libstore/local-store.cc \
  79. nix/libstore/remote-store.cc \
  80. nix/libstore/build.cc \
  81. nix/libstore/pathlocks.cc \
  82. nix/libstore/derivations.cc
  83. libstore_headers = \
  84. nix/libstore/references.hh \
  85. nix/libstore/pathlocks.hh \
  86. nix/libstore/globals.hh \
  87. nix/libstore/schema.sql.hh \
  88. nix/libstore/worker-protocol.hh \
  89. nix/libstore/remote-store.hh \
  90. nix/libstore/derivations.hh \
  91. nix/libstore/misc.hh \
  92. nix/libstore/local-store.hh \
  93. nix/libstore/store-api.hh
  94. libstore_a_CPPFLAGS = \
  95. $(libutil_a_CPPFLAGS) \
  96. -I$(top_srcdir)/nix/libstore \
  97. -I$(top_builddir)/nix/libstore \
  98. -DNIX_STORE_DIR=\"$(storedir)\" \
  99. -DNIX_DATA_DIR=\"$(datadir)\" \
  100. -DNIX_STATE_DIR=\"$(localstatedir)/nix\" \
  101. -DNIX_LOG_DIR=\"$(localstatedir)/log/nix\" \
  102. -DNIX_CONF_DIR=\"$(sysconfdir)/guix\" \
  103. -DNIX_LIBEXEC_DIR=\"$(libexecdir)\" \
  104. -DNIX_BIN_DIR=\"$(bindir)\" \
  105. -DOPENSSL_PATH="\"guix-authenticate\""
  106. libstore_a_CXXFLAGS = \
  107. $(SQLITE3_CFLAGS) $(LIBGCRYPT_CFLAGS)
  108. bin_PROGRAMS = guix-daemon
  109. sbin_PROGRAMS = guix-register
  110. guix_daemon_SOURCES = \
  111. nix/nix-daemon/nix-daemon.cc \
  112. nix/nix-daemon/guix-daemon.cc
  113. guix_daemon_CPPFLAGS = \
  114. $(libutil_a_CPPFLAGS) \
  115. -I$(top_srcdir)/nix/libstore
  116. guix_daemon_LDADD = \
  117. libstore.a libutil.a libformat.a -lbz2 \
  118. $(SQLITE3_LIBS) $(LIBGCRYPT_LIBS)
  119. guix_daemon_headers = \
  120. nix/nix-daemon/shared.hh
  121. guix_register_SOURCES = \
  122. nix/guix-register/guix-register.cc
  123. guix_register_CPPFLAGS = \
  124. $(libutil_a_CPPFLAGS) \
  125. $(libstore_a_CPPFLAGS) \
  126. -I$(top_srcdir)/nix/libstore
  127. # XXX: Should we start using shared libs?
  128. guix_register_LDADD = \
  129. libstore.a libutil.a libformat.a -lbz2 \
  130. $(SQLITE3_LIBS) $(LIBGCRYPT_LIBS)
  131. libexec_PROGRAMS = nix-setuid-helper
  132. nix_setuid_helper_SOURCES = \
  133. nix/nix-setuid-helper/nix-setuid-helper.cc
  134. nix_setuid_helper_CPPFLAGS = \
  135. $(libutil_a_CPPFLAGS)
  136. nix_setuid_helper_LDADD = \
  137. libutil.a libformat.a
  138. noinst_HEADERS = \
  139. $(libformat_headers) $(libutil_headers) $(libstore_headers) \
  140. $(guix_daemon_headers)
  141. nix/libstore/schema.sql.hh: nix/libstore/schema.sql
  142. $(GUILE) --no-auto-compile -c \
  143. "(use-modules (rnrs io ports)) \
  144. (call-with-output-file \"$@\" \
  145. (lambda (out) \
  146. (call-with-input-file \"$^\" \
  147. (lambda (in) \
  148. (write (get-string-all in) out)))))"
  149. nodist_pkglibexec_SCRIPTS = \
  150. nix/scripts/list-runtime-roots \
  151. nix/scripts/substitute-binary
  152. EXTRA_DIST += \
  153. nix/sync-with-upstream \
  154. nix/libstore/schema.sql \
  155. nix/AUTHORS \
  156. nix/COPYING
  157. AM_TESTS_ENVIRONMENT += \
  158. top_builddir="$(abs_top_builddir)"
  159. TESTS += \
  160. tests/guix-daemon.sh
  161. clean-local:
  162. -if test -d "$(GUIX_TEST_ROOT)"; then \
  163. find "$(GUIX_TEST_ROOT)" | xargs chmod +w; \
  164. fi
  165. -rm -rf "$(GUIX_TEST_ROOT)"