From ca394e80b1dd0e4c24a0708c3de8e4f839627165 Mon Sep 17 00:00:00 2001 From: Daiderd Jordan Date: Wed, 24 Oct 2018 08:05:19 +0200 Subject: [PATCH] make glibcLocales linux only On darwin this isn't needed and is null, causing an evaluation error. --- shell.nix | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/shell.nix b/shell.nix index cf33fed..1c1e486 100644 --- a/shell.nix +++ b/shell.nix @@ -31,7 +31,7 @@ let # HISTFILE = "${src}/.bash_hist"; }; - rustEnv = stdenv.mkDerivation rec { + rustEnv = stdenv.mkDerivation (rec { name = "gh-event-forwarder"; buildInputs = with pkgs; [ bash @@ -55,12 +55,13 @@ let HISTFILE = "${toString ./.}/.bash_hist"; RUSTFLAGS = "-D warnings"; - LOCALE_ARCHIVE_2_21 = "${oldpkgs.glibcLocales}/lib/locale/locale-archive"; - LOCALE_ARCHIVE_2_27 = "${pkgs.glibcLocales}/lib/locale/locale-archive"; RUST_BACKTRACE = "1"; RUST_LOG = "ofborg=debug"; passthru.phpEnv = phpEnv; - }; - + } + // stdenv.lib.optionalAttrs stdenv.isLinux { + LOCALE_ARCHIVE_2_21 = "${oldpkgs.glibcLocales}/lib/locale/locale-archive"; + LOCALE_ARCHIVE_2_27 = "${pkgs.glibcLocales}/lib/locale/locale-archive"; + }); in rustEnv