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.
 
 
 
 
 
 

182 lines
5.0 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. libformat_a_SOURCES = \
  25. nix/boost/format/free_funcs.cc \
  26. nix/boost/format/parsing.cc \
  27. nix/boost/format/format_implementation.cc
  28. libformat_headers = \
  29. nix/boost/weak_ptr.hpp \
  30. nix/boost/throw_exception.hpp \
  31. nix/boost/checked_delete.hpp \
  32. nix/boost/shared_ptr.hpp \
  33. nix/boost/format.hpp \
  34. nix/boost/assert.hpp \
  35. nix/boost/format/macros_default.hpp \
  36. nix/boost/format/format_fwd.hpp \
  37. nix/boost/format/format_class.hpp \
  38. nix/boost/format/exceptions.hpp \
  39. nix/boost/format/group.hpp \
  40. nix/boost/format/feed_args.hpp \
  41. nix/boost/format/internals_fwd.hpp \
  42. nix/boost/format/internals.hpp \
  43. nix/boost/detail/workaround.hpp \
  44. nix/boost/detail/shared_count.hpp \
  45. nix/boost/enable_shared_from_this.hpp
  46. libformat_a_CPPFLAGS = \
  47. -I$(top_srcdir)/nix
  48. libutil_a_SOURCES = \
  49. nix/libutil/archive.cc \
  50. nix/libutil/serialise.cc \
  51. nix/libutil/util.cc \
  52. nix/libutil/xml-writer.cc \
  53. nix/libutil/hash.cc \
  54. nix/libutil/gcrypt-hash.cc
  55. libutil_headers = \
  56. nix/libutil/hash.hh \
  57. nix/libutil/serialise.hh \
  58. nix/libutil/xml-writer.hh \
  59. nix/libutil/util.hh \
  60. nix/libutil/archive.hh \
  61. nix/libutil/types.hh \
  62. nix/libutil/gcrypt-hash.hh \
  63. nix/libutil/md5.h \
  64. nix/libutil/sha1.h \
  65. nix/libutil/sha256.h
  66. libutil_a_CPPFLAGS = \
  67. -I$(top_builddir)/nix \
  68. -I$(top_srcdir)/nix/libutil \
  69. $(libformat_a_CPPFLAGS)
  70. libstore_a_SOURCES = \
  71. nix/libstore/gc.cc \
  72. nix/libstore/globals.cc \
  73. nix/libstore/misc.cc \
  74. nix/libstore/references.cc \
  75. nix/libstore/store-api.cc \
  76. nix/libstore/optimise-store.cc \
  77. nix/libstore/local-store.cc \
  78. nix/libstore/remote-store.cc \
  79. nix/libstore/build.cc \
  80. nix/libstore/pathlocks.cc \
  81. nix/libstore/derivations.cc
  82. libstore_headers = \
  83. nix/libstore/references.hh \
  84. nix/libstore/pathlocks.hh \
  85. nix/libstore/globals.hh \
  86. nix/libstore/schema.sql.hh \
  87. nix/libstore/worker-protocol.hh \
  88. nix/libstore/remote-store.hh \
  89. nix/libstore/derivations.hh \
  90. nix/libstore/misc.hh \
  91. nix/libstore/local-store.hh \
  92. nix/libstore/store-api.hh
  93. libstore_a_CPPFLAGS = \
  94. $(libutil_a_CPPFLAGS) \
  95. -I$(top_srcdir)/nix/libstore \
  96. -I$(top_builddir)/nix/libstore \
  97. -DNIX_STORE_DIR=\"$(storedir)\" \
  98. -DNIX_DATA_DIR=\"$(datadir)\" \
  99. -DNIX_STATE_DIR=\"$(localstatedir)/nix\" \
  100. -DNIX_LOG_DIR=\"$(localstatedir)/log/nix\" \
  101. -DNIX_CONF_DIR=\"$(sysconfdir)/nix\" \
  102. -DNIX_LIBEXEC_DIR=\"$(libexecdir)\" \
  103. -DNIX_BIN_DIR=\"$(bindir)\" \
  104. -DOPENSSL_PATH="\"openssl\""
  105. libstore_a_CFLAGS = \
  106. $(SQLITE3_CFLAGS) $(LIBGCRYPT_CFLAGS)
  107. bin_PROGRAMS = guix-daemon
  108. guix_daemon_SOURCES = \
  109. nix/nix-daemon/nix-daemon.cc \
  110. nix/nix-daemon/guix-daemon.cc
  111. guix_daemon_CPPFLAGS = \
  112. $(libutil_a_CPPFLAGS) \
  113. -I$(top_srcdir)/nix/libstore
  114. guix_daemon_LDADD = \
  115. libstore.a libutil.a libformat.a -lbz2 \
  116. $(SQLITE3_LIBS) $(LIBGCRYPT_LIBS)
  117. guix_daemon_headers = \
  118. nix/nix-daemon/shared.hh
  119. libexec_PROGRAMS = nix-setuid-helper
  120. nix_setuid_helper_SOURCES = \
  121. nix/nix-setuid-helper/nix-setuid-helper.cc
  122. nix_setuid_helper_CPPFLAGS = \
  123. $(libutil_a_CPPFLAGS)
  124. nix_setuid_helper_LDADD = \
  125. libutil.a libformat.a
  126. noinst_HEADERS = \
  127. $(libformat_headers) $(libutil_headers) $(libstore_headers) \
  128. $(guix_daemon_headers)
  129. nix/libstore/schema.sql.hh: nix/libstore/schema.sql
  130. $(GUILE) --no-auto-compile -c \
  131. "(use-modules (rnrs io ports)) \
  132. (call-with-output-file \"$@\" \
  133. (lambda (out) \
  134. (call-with-input-file \"$^\" \
  135. (lambda (in) \
  136. (write (get-string-all in) out)))))"
  137. nodist_pkglibexec_SCRIPTS = \
  138. nix/scripts/list-runtime-roots \
  139. nix/scripts/substitute-binary
  140. EXTRA_DIST += \
  141. nix/sync-with-upstream \
  142. nix/libstore/schema.sql \
  143. nix/AUTHORS \
  144. nix/COPYING
  145. AM_TESTS_ENVIRONMENT += \
  146. top_builddir="$(abs_top_builddir)"
  147. TESTS += \
  148. tests/guix-daemon.sh
  149. clean-local:
  150. -if test -d "$(GUIX_TEST_ROOT)"; then \
  151. find "$(GUIX_TEST_ROOT)" | xargs chmod +w; \
  152. fi
  153. -rm -rf "$(GUIX_TEST_ROOT)"