aboutsummaryrefslogtreecommitdiff
# GNU Guix --- Functional package management for GNU
# Copyright © 2012-2016, 2018-2020, 2024 Ludovic Courtès <ludo@gnu.org>
# Copyright © 2016 Mathieu Lirzin <mthl@gnu.org>
# Copyright © 2020 Tobias Geerinckx-Rice <me@tobias.gr>
#
# This file is part of GNU Guix.
#
# GNU Guix is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or (at
# your option) any later version.
#
# GNU Guix is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.

#
# Integration of the `guix-daemon' code taken from upstream Nix.
#

BUILT_SOURCES += %D%/libstore/schema.sql.hh
CLEANFILES += %D%/libstore/schema.sql.hh

noinst_LIBRARIES = libformat.a libutil.a libstore.a

# Use '-std=c++11' for 'std::shared_ptr', 'auto', lambdas, and more.
AM_CXXFLAGS = -Wall -std=c++11

libformat_a_SOURCES =				\
  %D%/boost/format/free_funcs.cc		\
  %D%/boost/format/parsing.cc			\
  %D%/boost/format/format_implementation.cc

libformat_headers =				\
  %D%/boost/throw_exception.hpp			\
  %D%/boost/format.hpp				\
  %D%/boost/assert.hpp				\
  %D%/boost/format/macros_default.hpp		\
  %D%/boost/format/format_fwd.hpp		\
  %D%/boost/format/format_class.hpp		\
  %D%/boost/format/exceptions.hpp		\
  %D%/boost/format/group.hpp			\
  %D%/boost/format/feed_args.hpp		\
  %D%/boost/format/internals_fwd.hpp		\
  %D%/boost/format/internals.hpp

libformat_a_CPPFLAGS =				\
  -I$(top_srcdir)/nix

libutil_a_SOURCES =				\
  %D%/libutil/archive.cc			\
  %D%/libutil/affinity.cc			\
  %D%/libutil/serialise.cc			\
  %D%/libutil/util.cc				\
  %D%/libutil/hash.cc

libutil_headers =				\
  %D%/libutil/affinity.hh			\
  %D%/libutil/hash.hh				\
  %D%/libutil/serialise.hh			\
  %D%/libutil/util.hh				\
  %D%/libutil/archive.hh			\
  %D%/libutil/types.hh

libutil_a_CPPFLAGS =				\
  -I$(top_builddir)/nix				\
  -I$(top_srcdir)/%D%/libutil			\
  $(libformat_a_CPPFLAGS)

libstore_a_SOURCES =				\
  %D%/libstore/gc.cc				\
  %D%/libstore/globals.cc			\
  %D%/libstore/misc.cc				\
  %D%/libstore/references.cc			\
  %D%/libstore/store-api.cc			\
  %D%/libstore/optimise-store.cc		\
  %D%/libstore/local-store.cc			\
  %D%/libstore/build.cc				\
  %D%/libstore/pathlocks.cc			\
  %D%/libstore/derivations.cc			\
  %D%/libstore/builtins.cc			\
  %D%/libstore/sqlite.cc

libstore_headers =				\
  %D%/libstore/references.hh			\
  %D%/libstore/pathlocks.hh			\
  %D%/libstore/globals.hh			\
  %D%/libstore/worker-protocol.hh		\
  %D%/libstore/derivations.hh			\
  %D%/libstore/misc.hh				\
  %D%/libstore/local-store.hh			\
  %D%/libstore/sqlite.hh			\
  %D%/libstore/builtins.hh			\
  %D%/libstore/store-api.hh

libstore_a_CPPFLAGS =				\
  $(libutil_a_CPPFLAGS)				\
  -I$(top_srcdir)/%D%/libstore			\
  -I$(top_builddir)/%D%/libstore		\
  -DNIX_STORE_DIR=\"$(storedir)\"		\
  -DNIX_STATE_DIR=\"$(localstatedir)/guix\"	\
  -DNIX_LOG_DIR=\"$(localstatedir)/log/guix\"	\
  -DGUIX_CONFIGURATION_DIRECTORY=\"$(sysconfdir)/guix\"		\
  -DNIX_BIN_DIR=\"$(bindir)\"			\
  -DDEFAULT_CHROOT_DIRS="\"\""

libstore_a_CXXFLAGS = $(AM_CXXFLAGS)		\
  $(SQLITE3_CFLAGS) $(LIBGCRYPT_CFLAGS)

bin_PROGRAMS = guix-daemon

guix_daemon_SOURCES =				\
  %D%/nix-daemon/nix-daemon.cc			\
  %D%/nix-daemon/guix-daemon.cc

guix_daemon_CPPFLAGS =				\
  -DLOCALEDIR=\"$(localedir)\"			\
  $(libutil_a_CPPFLAGS)				\
  -I$(top_srcdir)/%D%/libstore

guix_daemon_LDADD =				\
  libstore.a libutil.a libformat.a -lz		\
  $(SQLITE3_LIBS) $(LIBGCRYPT_LIBS)

guix_daemon_headers =				\
  %D%/nix-daemon/shared.hh

if HAVE_LIBBZ2

guix_daemon_LDADD += -lbz2

endif HAVE_LIBBZ2

noinst_HEADERS =						\
  $(libformat_headers) $(libutil_headers) $(libstore_headers)	\
  $(guix_daemon_headers)

%D%/libstore/schema.sql.hh: guix/store/schema.sql
	$(AM_V_GEN)$(GUILE) --no-auto-compile -c		\
	  "(use-modules (rnrs io ports))			\
	   (call-with-output-file \"$@\"			\
	     (lambda (out)					\
	       (call-with-input-file \"$^\"			\
	         (lambda (in)					\
	           (write (get-string-all in) out)))))"

# The '.service' files for systemd.
systemdservicedir = $(libdir)/systemd/system
nodist_systemdservice_DATA =			\
  etc/gnu-store.mount				\
  etc/guix-daemon.service			\
  etc/guix-publish.service			\
  etc/guix-gc.service

etc/%.mount: etc/%.mount.in	\
			 $(top_builddir)/config.status
	$(AM_V_GEN)$(MKDIR_P) "`dirname $@`";	\
	$(SED) -e 's|@''storedir''@|$(storedir)|' <	\
	       "$<" > "$@.tmp";		\
	mv "$@.tmp" "$@"

etc/guix-%.service: etc/guix-%.service.in	\
			 $(top_builddir)/config.status
	$(AM_V_GEN)$(MKDIR_P) "`dirname $@`";	\
	$(SED) -e 's|@''localstatedir''@|$(localstatedir)|' \
	       -e 's|@''GUIX_SUBSTITUTE_URLS''@|$(GUIX_SUBSTITUTE_URLS)|' \
	       < "$<" > "$@.tmp";		\
	mv "$@.tmp" "$@"

# The service script for sysvinit.
sysvinitservicedir = $(sysconfdir)/init.d
nodist_sysvinitservice_DATA = etc/init.d/guix-daemon

etc/init.d/guix-daemon: etc/init.d/guix-daemon.in	\
			 $(top_builddir)/config.status
	$(AM_V_GEN)$(MKDIR_P) "`dirname $@`";	\
	$(SED) -e 's|@''localstatedir''@|$(localstatedir)|' \
	       -e 's|@''GUIX_SUBSTITUTE_URLS''@|$(GUIX_SUBSTITUTE_URLS)|' \
	       < "$<" > "$@.tmp";		\
	mv "$@.tmp" "$@"

# The service script for openrc.
openrcservicedir = $(sysconfdir)/openrc
nodist_openrcservice_DATA = etc/openrc/guix-daemon

etc/openrc/guix-daemon: etc/openrc/guix-daemon.in	\
			 $(top_builddir)/config.status
	$(AM_V_GEN)$(MKDIR_P) "`dirname $@`";	\
	$(SED) -e 's|@''localstatedir''@|$(localstatedir)|' <	\
	       "$<" > "$@.tmp";		\
	mv "$@.tmp" "$@"

# The '.conf' jobs for Upstart.
upstartjobdir = $(libdir)/upstart/system
nodist_upstartjob_DATA = etc/guix-daemon.conf etc/guix-publish.conf

etc/guix-%.conf: etc/guix-%.conf.in	\
			 $(top_builddir)/config.status
	$(AM_V_GEN)$(MKDIR_P) "`dirname $@`";	\
	$(SED) -e 's|@''localstatedir''@|$(localstatedir)|' \
	       -e 's|@''GUIX_SUBSTITUTE_URLS''@|$(GUIX_SUBSTITUTE_URLS)|' \
	        < "$<" > "$@.tmp";		\
	mv "$@.tmp" "$@"

CLEANFILES +=					\
  $(nodist_systemdservice_DATA)			\
  $(nodist_upstartjob_DATA)			\
  $(nodist_sysvinitservice_DATA)		\
  $(nodist_openrcservice_DATA)

EXTRA_DIST +=					\
  %D%/AUTHORS					\
  %D%/COPYING					\
  etc/gnu-store.mount.in			\
  etc/guix-daemon.service.in			\
  etc/guix-daemon.conf.in			\
  etc/guix-publish.service.in			\
  etc/guix-publish.conf.in			\
  etc/guix-gc.service.in			\
  etc/guix-gc.timer				\
  etc/init.d/guix-daemon.in			\
  etc/openrc/guix-daemon.in

if CAN_RUN_TESTS

AM_TESTS_ENVIRONMENT +=				\
  top_builddir="$(abs_top_builddir)"

TESTS +=					\
  tests/guix-daemon.sh

endif CAN_RUN_TESTS

clean-local:
	-if test -d "$(GUIX_TEST_ROOT)"; then		\
	  find "$(GUIX_TEST_ROOT)" | xargs chmod +w;	\
	 fi
	-rm -rf "$(GUIX_TEST_ROOT)"
00'>2020-05-16gnu: gnome-shell-extension-dash-to-dock: Update to 67....* gnu/packages/gnome-xyz.scm (gnome-shell-extension-dash-to-dock): Update to 67. Signed-off-by: Ludovic Courtès <ludo@gnu.org> Leo Prikler 2020-05-16gnu: delft-icon-theme: Update to 1.12....* gnu/packages/gnome-xyz.scm (delft-icon-theme): Update to 1.12. Signed-off-by: 宋文武 <iyzsong@member.fsf.org> Leo Prikler 2020-05-16gnu: papirus-icon-theme: Update to 20200430....* gnu/packages/gnome-xyz.scm (papirus-icon-theme): Update to 20200430. Signed-off-by: 宋文武 <iyzsong@member.fsf.org> Leo Prikler 2020-05-16gnu: matcha-theme: Update to 2020-05-09....* gnu/packages/gnome-xyz.scm (matcha-theme): Update to 2020-05-09. [source]: Update URL. [arguments]: Update build script. Signed-off-by: 宋文武 <iyzsong@member.fsf.org> Leo Prikler 2020-05-09gnu: gnome-shell-extension-gsconnect: Update to 33....* gnu/packages/gnome-xyz.scm (gnome-shell-extension-gsconnect): Update to 33. [inputs]: Remove folks. Alex Griffin 2020-05-06gnu: Add gnome-shell-extension-clipboard-indicator....* gnu/packages/gnome-xyz.scm (gnome-shell-extension-clipboard-indicator): New variable. Signed-off-by: Marius Bakke <mbakke@fastmail.com> Jack Hill 2020-04-12gnu: gnome-shell-extension-hide-app-icon: Fix grammar of "allows to hide" to..."hides". * gnu/packages/gnome-xyz (gnome-shell-extension-hide-app-icon): Fix grammar. Vagrant Cascadian 2020-03-29gnu: numix-gtk-theme: Fix installation directory....* gnu/packages/gnome-xyz.scm (numix-gtk-theme)[arguments]: Replace erroneous use of DESTDIR with INSTALL_DIR in #:make-flags. Tobias Geerinckx-Rice 2020-03-29gnu: numix-gtk-theme: Fix name....* gnu/package/gnome-xyz.scm (numix-gtk-theme): New public variable, renamed from…… (numix-theme): …this now-deprecated one. Tobias Geerinckx-Rice 2020-03-29gnu: numix-theme: The ‘check’ phase already respects ‘#:tests?’....* gnu/packages/gnome-xyz.scm (numix-theme)[arguments]: Don't delete the ‘check’ phase. Tobias Geerinckx-Rice 2020-03-22gnu: gnome-shell-extension-paperwm: Update to 36.0....* gnu/packages/gnome-xyz.scm (gnome-shell-extension-paperwm): Update to 36.0. Alex Griffin 2020-03-21gnu: Add gnome-shell-extension-topicons-redux....* gnu/packages/gnome-xyz.scm (gnome-shell-extension-topicons-redux): New variable. Signed-off-by: Marius Bakke <mbakke@fastmail.com> Ekaitz Zarraga 2020-03-16gnu: gnome-shell-extension-appindicator: Update to 33....* gnu/packages/gnome-xyz.scm (gnome-shell-extension-appindicator): Update to 33. Signed-off-by: Ludovic Courtès <ludo@gnu.org> Ekaitz Zarraga 2020-02-28gnu: delft-icon-theme: Update to 1.11....* gnu/packages/gnome-xyz.scm (delft-icon-theme): Update to 1.11. Signed-off-by: Pierre Neidhardt <mail@ambrevar.xyz> Leo Prikler 2020-02-28gnu: delft-icon-theme: Use the copy-build-system....* gnu/packages/gnome-xyz.scm (delft-icon-theme): Use the copy-build-system. Signed-off-by: Pierre Neidhardt <mail@ambrevar.xyz> Leo Prikler 2020-02-27gnu: gnome-shell-extension-noannoyance: Fix synopsis and description....* gnu/packages/gnome-xyz.scm (gnome-shell-extension-noannoyance)[synopsis]: Use imperative form. [description]: Remove spurious comma. Pierre Neidhardt 2020-02-27gnu: gnome-shell-extension-noannoyance: Use the copy-build-system....* gnu/packages/gnome-xyz.scm (gnome-shell-extension-noannoyance): Use the copy-build-system. Leo Prikler 2020-02-27gnu: gnome-shell-extension-appindicator: Use the copy-build-system....* gnu/packages/gnome-xyz.scm (gnome-shell-extension-appindicator): Use the copy-build-system. Leo Prikler 2020-02-27gnu: Add gnome-shell-extension-gsconnect....* gnu/packages/gnome-xyz.scm (gnome-shell-extension-gsconnect): New variable. Alex Griffin 2020-02-21gnu: gnome-shell-extension-paperwm: Install compiled gschemas....* gnu/packages/gnome-xyz.scm (gnome-shell-extension-paperwm)[arguments]: Install compiled gschemas. Signed-off-by: Alex Griffin <a@ajgrf.com> Jack Hill 2020-02-21gnu: gnome-shell-extension-paperwm: Recompile schemas....* gnu/packages/gnome-xyz.scm (gnome-shell-extension-paperwm) [source]: Remove gschemas.compiled in a snippet. [arguments]: Add compile-schemas phase. [native-inputs]: Add glib. Signed-off-by: Alex Griffin <a@ajgrf.com> Jack Hill 2020-02-21gnu: Add gnome-shell-extension-paperwm....* gnu/packages/gnome-xyz.scm (gnome-shell-extension-paperwm): New variable. Alex Griffin 2020-02-05gnu: Add gnome-shell-extension-appindicator....* gnu/packages/gnome-xyz.scm (gnome-shell-extension-appindicator): New variable. Signed-off-by: Ludovic Courtès <ludo@gnu.org> Giacomo Leidi 2019-12-25Revert "gnu: gnome-shell-extension-dash-to-dock: Update to 67."...This reverts commit 5a30234c210dfb37da832125cdbda6a9a0c585ca, which assumes you're running Gnome 3.34, which is unlikely. Tobias Geerinckx-Rice 2019-12-23gnu: gnome-shell-extension-dash-to-dock: Update to 67....* gnu/packages/gnome-xyz.scm (gnome-shell-extension-dash-to-dock): Update to 67. Tobias Geerinckx-Rice 2019-12-23gnu: gnome-shell-extension-dash-to-dock: Depropagate glib:bin....* gnu/packages/gnome-xyz.scm (gnome-shell-extension-dash-to-dock): [propagated-inputs]: Move glib:bin from here... [native-inputs]: ... to here. Signed-off-by: Efraim Flashner <efraim@flashner.co.il> Leo Prikler 2019-12-23gnu: gnome-shell-extension-hide-app-icon: Fix installation....* gnu/packages/gnome-xyz.scm: (gnome-shell-extension-hide-app-icon): [arguments]: Install in subdirectory. Adjust indentation. Signed-off-by: Efraim Flashner <efraim@flashner.co.il> Leo Prikler 2019-12-20gnu: Add gnome-shell-extension-hide-app-icon....* gnu/packages/gnome-xyz.scm (gnome-shell-extension-hide-app-icon): New variable. Signed-off-by: Efraim Flashner <efraim@flashner.co.il> Leo Prikler 2019-12-19gnu: Add gnome-shell-extension-dash-to-panel....* gnu/packages/gnome-xyz.scm (gnome-shell-extension-dash-to-panel): New variable. Signed-off-by: Ludovic Courtès <ludo@gnu.org> Giacomo Leidi 2019-12-15gnu: Add papirus-icon-theme....* gnu/packages/gnome-xyz.scm (papirus-icon-theme): New variable. Signed-off-by: Ludovic Courtès <ludo@gnu.org> Giacomo Leidi 2019-12-11gnu: gnome-shell-extension-dash-to-dock: Update to 66....* gnu/packages/gnome-xyz.scm (gnome-shell-extension-dash-to-dock): Update to 66. Signed-off-by: Efraim Flashner <efraim@flashner.co.il> Leo Prikler 2019-12-09gnu: delft-icon-theme: Fix broken icons....* gnu/packages/gnome-xyz (delft-icon-theme): Inherit from Adwaita instead of using the (non-existing) GNOME theme. Signed-off-by: Brett Gilio <brettg@posteo.net> Leo Prikler 2019-11-10gnu: Move numix-theme to gnome-xyz.scm....* gnu/packages/gnome.scm (numix-theme): Move from here ... * gnu/packages/gnome-xyz.scm (numix-theme): ... to here. Signed-off-by: Marius Bakke <mbakke@fastmail.com> Giacomo Leidi 2019-11-09gnu: Add matcha-theme....* gnu/packages/gnome-xyz.scm (matcha-theme): New variable. Signed-off-by: Ludovic Courtès <ludo@gnu.org> Alexandros Theodotou 2019-11-08gnu: Add gnome-shell-extension-noannoyance....* gnu/packages/gnome-xyz: (gnome-shell-extension-noannoyance): New variable. Signed-off-by: Mathieu Othacehe <m.othacehe@gmail.com> Leo Prikler 2019-11-08gnu: Add gnome-shell-extension-dash-to-dock....* gnu/packages/gnome-xyz.scm: (gnome-shell-extension-dash-to-dock): New variable. Signed-off-by: Mathieu Othacehe <m.othacehe@gmail.com> Leo Prikler 2019-11-08gnu: Add delft-icon-theme....* /gnu/packages/gnome-xyz.scm: New file. (delft-icon-theme): New variable. * /gnu/local.mk: Add it. Signed-off-by: Mathieu Othacehe <m.othacehe@gmail.com> Leo Prikler