From 35a80781a10bf5095edc4309569be49aeb3b272e Mon Sep 17 00:00:00 2001 From: TimePath Date: Sat, 22 Jul 2017 21:54:54 +1000 Subject: [PATCH] nix: support compiler override --- default.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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}"; -- 2.39.2