From af7e6fe22e8db606eb92c044140c00e6d8fe61cc Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Sat, 22 Nov 2003 21:12:36 +0000 Subject: [PATCH] * Don't use a hard-coded path. --- configure.ac | 1 + corepkgs/Makefile.am | 2 +- corepkgs/buildenv/Makefile.am | 9 +++++++++ src/nix-env/main.cc | 2 +- 4 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 corepkgs/buildenv/Makefile.am diff --git a/configure.ac b/configure.ac index bc12b9a10..8c3aecb9c 100644 --- a/configure.ac +++ b/configure.ac @@ -41,6 +41,7 @@ AC_CONFIG_FILES([Makefile corepkgs/Makefile corepkgs/fetchurl/Makefile corepkgs/nar/Makefile + corepkgs/buildenv/Makefile doc/Makefile doc/manual/Makefile ]) diff --git a/corepkgs/Makefile.am b/corepkgs/Makefile.am index e5b892bfc..2fb23f1c0 100644 --- a/corepkgs/Makefile.am +++ b/corepkgs/Makefile.am @@ -1 +1 @@ -SUBDIRS = fetchurl nar +SUBDIRS = fetchurl nar buildenv diff --git a/corepkgs/buildenv/Makefile.am b/corepkgs/buildenv/Makefile.am new file mode 100644 index 000000000..74c39199f --- /dev/null +++ b/corepkgs/buildenv/Makefile.am @@ -0,0 +1,9 @@ +install-exec-local: + $(INSTALL) -d $(datadir)/nix/corepkgs + $(INSTALL) -d $(datadir)/nix/corepkgs/buildenv + $(INSTALL_DATA) default.nix $(datadir)/nix/corepkgs/buildenv + $(INSTALL_PROGRAM) builder.pl $(datadir)/nix/corepkgs/buildenv + +include ../../substitute.mk + +EXTRA_DIST = default.nix builder.pl diff --git a/src/nix-env/main.cc b/src/nix-env/main.cc index a8377582c..b3c38616e 100644 --- a/src/nix-env/main.cc +++ b/src/nix-env/main.cc @@ -164,7 +164,7 @@ void switchLink(Path link, Path target) void createUserEnv(EvalState & state, const DrvInfos & drvs) { /* Get the environment builder expression. */ - Expr envBuilder = parseExprFromFile("/home/eelco/nix/corepkgs/buildenv"); /* !!! */ + Expr envBuilder = parseExprFromFile(nixDataDir + "/nix/corepkgs/buildenv"); /* !!! */ /* Construct the whole top level derivation. */ ATermList inputs = ATempty;