nix: support compiler override

This commit is contained in:
TimePath 2017-07-22 21:54:54 +10:00
parent 9d2e0f613a
commit 35a80781a1

View File

@ -1,11 +1,14 @@
# nix-shell -A xonotic
# --argstr cc clang
{
nixpkgs ? <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}";