From: TimePath Date: Sat, 22 Jul 2017 11:54:54 +0000 (+1000) Subject: nix: support compiler override X-Git-Tag: xonotic-v0.8.5~198 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=35a80781a10bf5095edc4309569be49aeb3b272e;p=xonotic%2Fxonotic.git nix: support compiler override --- diff --git a/default.nix b/default.nix index 9e8c87e4..e0303cdf 100644 --- a/default.nix +++ b/default.nix @@ -1,11 +1,14 @@ # nix-shell -A xonotic +# --argstr cc clang { nixpkgs ? , - pkgs ? (import nixpkgs) {} + pkgs ? (import nixpkgs) {}, + cc ? null, }: with pkgs; let VERSION = "0.8.2"; + stdenv = if (cc != null) then overrideCC pkgs.stdenv pkgs."${cc}" else pkgs.stdenv; targets = rec { xonotic = stdenv.mkDerivation rec { name = "xonotic-${version}";