about summary refs log tree commit diff
path: root/src/fix
diff options
context:
space:
mode:
Diffstat (limited to 'src/fix')
-rw-r--r--src/fix/Makefile.am8
-rw-r--r--src/fix/fix.cc8
2 files changed, 12 insertions, 4 deletions
diff --git a/src/fix/Makefile.am b/src/fix/Makefile.am
new file mode 100644
index 000000000000..4786db54c3c0
--- /dev/null
+++ b/src/fix/Makefile.am
@@ -0,0 +1,8 @@
+bin_PROGRAMS = fix
+
+fix_SOURCES = fix.cc
+fix_LDADD = ../libmain/libmain.a ../libnix/libnix.a ../boost/format/libformat.a \
+ -L../../externals/inst/lib -ldb_cxx -lATerm
+
+AM_CXXFLAGS = \
+ -I.. -I../../externals/inst/include -I../libnix -I../libmain
diff --git a/src/fix/fix.cc b/src/fix/fix.cc
index c1f9c1ad68d0..9a8ff1513042 100644
--- a/src/fix/fix.cc
+++ b/src/fix/fix.cc
@@ -249,7 +249,7 @@ static Expr evalExpr2(EvalState & state, Expr e)
 
     /* Platform constant. */
     if (ATmatch(e, "Platform")) {
-        return ATmake("<str>", SYSTEM);
+        return ATmake("<str>", thisSystem.c_str());
     }
 
     /* Fix inclusion. */
@@ -284,7 +284,7 @@ static Expr evalExpr2(EvalState & state, Expr e)
 
         /* Evaluate the bindings and put them in a map. */
         map<string, ATerm> bndMap;
-        bndMap["platform"] = ATmake("<str>", SYSTEM);
+        bndMap["platform"] = ATmake("<str>", thisSystem.c_str());
         while (!ATisEmpty(bnds)) {
             ATerm bnd = ATgetFirst(bnds);
             if (!ATmatch(bnd, "(<str>, <term>)", &s1, &e1))
@@ -297,7 +297,7 @@ static Expr evalExpr2(EvalState & state, Expr e)
            expression. */
         NixExpr ne;
         ne.type = NixExpr::neDerivation;
-        ne.derivation.platform = SYSTEM;
+        ne.derivation.platform = thisSystem;
         string name;
         Path outPath;
         Hash outHash;
@@ -320,7 +320,7 @@ static Expr evalExpr2(EvalState & state, Expr e)
                     ne.derivation.args.push_back(processBinding(state, arg, ne));
                     args = ATgetNext(args);
                 }
-            } 
+            }
 
             else {
                 string s = processBinding(state, value, ne);