about summary refs log tree commit diff
path: root/perl/local.mk
diff options
context:
space:
mode:
authorShea Levy <shea@shealevy.com>2016-08-12T13·44-0400
committerShea Levy <shea@shealevy.com>2017-02-07T20·56-0500
commitf7b7df8d1fcb41156fe92ef2ecf5b17074b88446 (patch)
treef82182ef4ca466809089e462e3261bce30055ef4 /perl/local.mk
parent418a837897e597c5dc2eb4e458462bd04b2abde7 (diff)
Add nix-perl package for the perl bindings
Diffstat (limited to 'perl/local.mk')
-rw-r--r--perl/local.mk25
1 files changed, 12 insertions, 13 deletions
diff --git a/perl/local.mk b/perl/local.mk
index 5b43c4b717fd..1793ececfd60 100644
--- a/perl/local.mk
+++ b/perl/local.mk
@@ -1,10 +1,10 @@
 nix_perl_sources := \
-  $(d)/lib/Nix/Store.pm \
-  $(d)/lib/Nix/Manifest.pm \
-  $(d)/lib/Nix/SSH.pm \
-  $(d)/lib/Nix/CopyClosure.pm \
-  $(d)/lib/Nix/Config.pm.in \
-  $(d)/lib/Nix/Utils.pm
+  lib/Nix/Store.pm \
+  lib/Nix/Manifest.pm \
+  lib/Nix/SSH.pm \
+  lib/Nix/CopyClosure.pm \
+  lib/Nix/Config.pm.in \
+  lib/Nix/Utils.pm
 
 nix_perl_modules := $(nix_perl_sources:.in=)
 
@@ -12,12 +12,12 @@ $(foreach x, $(nix_perl_modules), $(eval $(call install-data-in, $(x), $(perllib
 
 ifeq ($(perlbindings), yes)
 
-  $(d)/lib/Nix/Store.cc: $(d)/lib/Nix/Store.xs
+  lib/Nix/Store.cc: lib/Nix/Store.xs
 	$(trace-gen) xsubpp $^ -output $@
 
   libraries += Store
 
-  Store_DIR := $(d)/lib/Nix
+  Store_DIR := lib/Nix
 
   Store_SOURCES := $(Store_DIR)/Store.cc
 
@@ -25,11 +25,10 @@ ifeq ($(perlbindings), yes)
     -I$(shell $(perl) -e 'use Config; print $$Config{archlibexp};')/CORE \
     -D_FILE_OFFSET_BITS=64 \
     -Wno-unknown-warning-option -Wno-unused-variable -Wno-literal-suffix \
-    -Wno-reserved-user-defined-literal -Wno-duplicate-decl-specifier -Wno-pointer-bool-conversion
+    -Wno-reserved-user-defined-literal -Wno-duplicate-decl-specifier -Wno-pointer-bool-conversion \
+    $(NIX_CFLAGS)
 
-  Store_LIBS = libstore libutil
-
-  Store_LDFLAGS := $(SODIUM_LIBS)
+  Store_LDFLAGS := $(SODIUM_LIBS) $(NIX_LIBS)
 
   ifeq (CYGWIN,$(findstring CYGWIN,$(OS)))
     archlib = $(shell perl -E 'use Config; print $$Config{archlib};')
@@ -45,4 +44,4 @@ ifeq ($(perlbindings), yes)
 
 endif
 
-clean-files += $(d)/lib/Nix/Config.pm $(d)/lib/Nix/Store.cc
+clean-files += lib/Nix/Config.pm lib/Nix/Store.cc Makefile.config