nix-super/perl/local.mk
Eelco Dolstra a5c6347ff0 build-remote.pl: Use ‘nix-store --serve’ on the remote side
This makes things more efficient (we don't need to use an SSH master
connection, and we only start a single remote process) and gets rid of
locking issues (the remote nix-store process will keep inputs and
outputs locked as long as they're needed).

It also makes it more or less secure to connect directly to the root
account on the build machine, using a forced command
(e.g. ‘command="nix-store --serve --write"’). This bypasses the Nix
daemon and is therefore more efficient.

Also, don't call nix-store to import the output paths.
2014-07-11 16:22:24 +02:00

40 lines
960 B
Makefile

nix_perl_sources := \
$(d)/lib/Nix/Store.pm \
$(d)/lib/Nix/Manifest.pm \
$(d)/lib/Nix/GeneratePatches.pm \
$(d)/lib/Nix/SSH.pm \
$(d)/lib/Nix/CopyClosure.pm \
$(d)/lib/Nix/Config.pm.in \
$(d)/lib/Nix/Utils.pm \
$(d)/lib/Nix/Crypto.pm
nix_perl_modules := $(nix_perl_sources:.in=)
$(foreach x, $(nix_perl_modules), $(eval $(call install-data-in, $(x), $(perllibdir)/Nix)))
ifeq ($(perlbindings), yes)
$(d)/lib/Nix/Store.cc: $(d)/lib/Nix/Store.xs
$(trace-gen) xsubpp $^ -output $@
libraries += Store
Store_DIR := $(d)/lib/Nix
Store_SOURCES := $(Store_DIR)/Store.cc
Store_LIBS = libstore
Store_CXXFLAGS = \
-I$(shell $(perl) -e 'use Config; print $$Config{archlibexp};')/CORE \
-D_FILE_OFFSET_BITS=64 -Wno-unused-variable -Wno-literal-suffix
Store_ALLOW_UNDEFINED = 1
Store_FORCE_INSTALL = 1
Store_INSTALL_DIR = $(perllibdir)/auto/Nix/Store
endif
clean-files += $(d)/lib/Nix/Config.pm $(d)/lib/Nix/Store.cc