Commit 05f00b2f authored by Peter H. Hoeg's avatar Peter H. Hoeg
Browse files

buildCrystalPackage: fix env overrides

Passing variables through `env` was broken for 2 reasons:

1. due to missing parens, no merging of `env` would take place, and
2. it was impossible to override defaults due to the order
parent 85b9eb70
Loading
Loading
Loading
Loading
+7 −5
Original line number Diff line number Diff line
@@ -108,11 +108,12 @@ stdenv.mkDerivation (
        ++ [ "runHook postConfigure" ]
      ));

    env = args.env or { } // {
    env = {
      CRFLAGS = lib.concatStringsSep " " defaultOptions;

      PREFIX = placeholder "out";
    };
    }
    // (args.env or { });

    inherit enableParallelBuilding;
    strictDeps = true;
@@ -205,8 +206,9 @@ stdenv.mkDerivation (
        done
      '';

    meta = args.meta or { } // {
      platforms = args.meta.platforms or crystal.meta.platforms;
    };
    meta = {
      platforms = crystal.meta.platforms;
    }
    // (args.meta or { });
  }
)