diff options
| author | Ludovic Courtès <ludo@gnu.org> | 2012-12-03 23:04:47 +0100 |
|---|---|---|
| committer | Ludovic Courtès <ludo@gnu.org> | 2012-12-03 23:05:08 +0100 |
| commit | c2033df432af87d0176347858c7d11acfe2ed89f (patch) | |
| tree | 05a7befd50cead52a401165c03dee3ae72840619 /daemon.am | |
| parent | 7eba5e6361b637a4c8aecbb13644f573a845732b (diff) | |
build: Include a copy of Nix's libstore and daemon; build it.
* configure.ac: Call `AC_USE_SYSTEM_EXTENSIONS', and
`GUIX_SYSTEM_TYPE'. Add `--with-store-dir' option, and substitute
`storedir'. Include `config-daemon.ac'.
* config-daemon.ac: New file.
* Makefile.am [BUILD_DAEMON]: Include `daemon.am'.
* daemon.am: New file.
* m4/guix.m4 (GUIX_SYSTEM_TYPE): New macro.
* nix/libutil/gcrypt-hash.cc, nix/libutil/gcrypt-hash.hh,
nix/libutil/md5.h, nix/libutil/sha1.h, nix/libutil/sha256.h,
nix/nix-daemon/guix-daemon.cc, nix/nix-daemon/shared.hh: New files.
Diffstat (limited to 'daemon.am')
| -rw-r--r-- | daemon.am | 152 |
1 files changed, 152 insertions, 0 deletions
diff --git a/daemon.am b/daemon.am new file mode 100644 index 00000000000..e150e54d6bf --- /dev/null +++ b/daemon.am | |||
| @@ -0,0 +1,152 @@ | |||
| 1 | # Guix --- Nix package management from Guile. -*- coding: utf-8 -*- | ||
| 2 | # Copyright (C) 2012 Ludovic Courtès <ludo@gnu.org> | ||
| 3 | # | ||
| 4 | # This file is part of Guix. | ||
| 5 | # | ||
| 6 | # 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 | # 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 Guix. If not, see <http://www.gnu.org/licenses/>. | ||
| 18 | |||
| 19 | # | ||
| 20 | # Integration of the `guix-daemon' code taken from upstream Nix. | ||
| 21 | # | ||
| 22 | |||
| 23 | BUILT_SOURCES = nix/libstore/schema.sql.hh | ||
| 24 | CLEANFILES += $(BUILT_SOURCES) | ||
| 25 | |||
| 26 | noinst_LIBRARIES = libformat.a libutil.a libstore.a | ||
| 27 | |||
| 28 | libformat_a_SOURCES = \ | ||
| 29 | nix/boost/format/free_funcs.cc \ | ||
| 30 | nix/boost/format/parsing.cc \ | ||
| 31 | nix/boost/format/format_implementation.cc | ||
| 32 | |||
| 33 | libformat_headers = \ | ||
| 34 | nix/boost/weak_ptr.hpp \ | ||
| 35 | nix/boost/throw_exception.hpp \ | ||
| 36 | nix/boost/checked_delete.hpp \ | ||
| 37 | nix/boost/shared_ptr.hpp \ | ||
| 38 | nix/boost/format.hpp \ | ||
| 39 | nix/boost/assert.hpp \ | ||
| 40 | nix/boost/format/macros_default.hpp \ | ||
| 41 | nix/boost/format/format_fwd.hpp \ | ||
| 42 | nix/boost/format/format_class.hpp \ | ||
| 43 | nix/boost/format/exceptions.hpp \ | ||
| 44 | nix/boost/format/group.hpp \ | ||
| 45 | nix/boost/format/feed_args.hpp \ | ||
| 46 | nix/boost/format/internals_fwd.hpp \ | ||
| 47 | nix/boost/format/internals.hpp \ | ||
| 48 | nix/boost/detail/workaround.hpp \ | ||
| 49 | nix/boost/detail/shared_count.hpp \ | ||
| 50 | nix/boost/enable_shared_from_this.hpp | ||
| 51 | |||
| 52 | libformat_a_CPPFLAGS = \ | ||
| 53 | -I$(top_srcdir)/nix | ||
| 54 | |||
| 55 | libutil_a_SOURCES = \ | ||
| 56 | nix/libutil/archive.cc \ | ||
| 57 | nix/libutil/serialise.cc \ | ||
| 58 | nix/libutil/immutable.cc \ | ||
| 59 | nix/libutil/util.cc \ | ||
| 60 | nix/libutil/xml-writer.cc \ | ||
| 61 | nix/libutil/hash.cc \ | ||
| 62 | nix/libutil/gcrypt-hash.cc | ||
| 63 | |||
| 64 | libutil_headers = \ | ||
| 65 | nix/libutil/immutable.hh \ | ||
| 66 | nix/libutil/hash.hh \ | ||
| 67 | nix/libutil/serialise.hh \ | ||
| 68 | nix/libutil/xml-writer.hh \ | ||
| 69 | nix/libutil/util.hh \ | ||
| 70 | nix/libutil/archive.hh \ | ||
| 71 | nix/libutil/types.hh \ | ||
| 72 | nix/libutil/gcrypt-hash.hh \ | ||
| 73 | nix/libutil/md5.h \ | ||
| 74 | nix/libutil/sha1.h \ | ||
| 75 | nix/libutil/sha256.h | ||
| 76 | |||
| 77 | libutil_a_CPPFLAGS = \ | ||
| 78 | -I$(top_builddir)/nix \ | ||
| 79 | -I$(top_srcdir)/nix/libutil \ | ||
| 80 | $(libformat_a_CPPFLAGS) | ||
| 81 | |||
| 82 | libstore_a_SOURCES = \ | ||
| 83 | nix/libstore/gc.cc \ | ||
| 84 | nix/libstore/globals.cc \ | ||
| 85 | nix/libstore/misc.cc \ | ||
| 86 | nix/libstore/references.cc \ | ||
| 87 | nix/libstore/store-api.cc \ | ||
| 88 | nix/libstore/optimise-store.cc \ | ||
| 89 | nix/libstore/local-store.cc \ | ||
| 90 | nix/libstore/remote-store.cc \ | ||
| 91 | nix/libstore/build.cc \ | ||
| 92 | nix/libstore/pathlocks.cc \ | ||
| 93 | nix/libstore/derivations.cc | ||
| 94 | |||
| 95 | libstore_headers = \ | ||
| 96 | nix/libstore/references.hh \ | ||
| 97 | nix/libstore/pathlocks.hh \ | ||
| 98 | nix/libstore/globals.hh \ | ||
| 99 | nix/libstore/schema.sql.hh \ | ||
| 100 | nix/libstore/worker-protocol.hh \ | ||
| 101 | nix/libstore/remote-store.hh \ | ||
| 102 | nix/libstore/derivations.hh \ | ||
| 103 | nix/libstore/misc.hh \ | ||
| 104 | nix/libstore/local-store.hh \ | ||
| 105 | nix/libstore/store-api.hh | ||
| 106 | |||
| 107 | libstore_a_CPPFLAGS = \ | ||
| 108 | $(libutil_a_CPPFLAGS) \ | ||
| 109 | -I$(top_srcdir)/nix/libstore \ | ||
| 110 | -DNIX_STORE_DIR=\"$(storedir)\" \ | ||
| 111 | -DNIX_DATA_DIR=\"$(datadir)\" \ | ||
| 112 | -DNIX_STATE_DIR=\"$(localstatedir)/nix\" \ | ||
| 113 | -DNIX_LOG_DIR=\"$(localstatedir)/log/nix\" \ | ||
| 114 | -DNIX_CONF_DIR=\"$(sysconfdir)/nix\" \ | ||
| 115 | -DNIX_LIBEXEC_DIR=\"$(libexecdir)\" \ | ||
| 116 | -DNIX_BIN_DIR=\"$(bindir)\" \ | ||
| 117 | -DOPENSSL_PATH="\"FIXME--no OpenSSL support\"" | ||
| 118 | |||
| 119 | libstore_a_CFLAGS = \ | ||
| 120 | $(SQLITE3_CFLAGS) $(LIBGCRYPT_CFLAGS) | ||
| 121 | |||
| 122 | bin_PROGRAMS = guix-daemon | ||
| 123 | |||
| 124 | guix_daemon_SOURCES = \ | ||
| 125 | nix/nix-daemon/nix-daemon.cc \ | ||
| 126 | nix/nix-daemon/guix-daemon.cc | ||
| 127 | |||
| 128 | guix_daemon_CPPFLAGS = \ | ||
| 129 | $(libutil_a_CPPFLAGS) \ | ||
| 130 | -I$(top_srcdir)/nix/libstore | ||
| 131 | |||
| 132 | guix_daemon_LDADD = \ | ||
| 133 | libstore.a libutil.a libformat.a -lbz2 \ | ||
| 134 | $(SQLITE3_LIBS) $(LIBGCRYPT_LIBS) | ||
| 135 | |||
| 136 | |||
| 137 | noinst_HEADERS = \ | ||
| 138 | $(libformat_headers) $(libutil_headers) $(libstore_headers) | ||
| 139 | |||
| 140 | nix/libstore/schema.sql.hh: nix/libstore/schema.sql | ||
| 141 | $(GUILE) --no-auto-compile -c \ | ||
| 142 | "(use-modules (rnrs io ports)) \ | ||
| 143 | (call-with-output-file \"$@\" \ | ||
| 144 | (lambda (out) \ | ||
| 145 | (call-with-input-file \"$^\" \ | ||
| 146 | (lambda (in) \ | ||
| 147 | (write (get-string-all in) out)))))" | ||
| 148 | |||
| 149 | EXTRA_DIST += \ | ||
| 150 | nix/libstore/schema.sql \ | ||
| 151 | nix/AUTHORS \ | ||
| 152 | nix/COPYING | ||
