Nix package manager: nix-shell lỗi : bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8) - QuânSysAd's Blog

06 tháng 11 2020

Nix package manager: nix-shell lỗi : bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)

 Trong file shell.nix ta cần đặt thêm biến LOCALE_ARCHIVE như sau:

```

# This imports the nix package collection,

# so we can access the `pkgs` and `stdenv` variables

with import <nixpkgs> {};


# Make a new "derivation" that represents our shell

stdenv.mkDerivation {

  name = "my-environment";


  # The packages in the `buildInputs` list will be added to the PATH in our shell

  buildInputs = [

    # cowsay is an arbitary package

    # see https://nixos.org/nixos/packages.html to search for more

    pkgs.cowsay

    pkgs.systemd

  ];

  LOCALE_ARCHIVE="${pkgs.glibcLocales}/lib/locale/locale-archive";


}

```



Không có nhận xét nào: