Use buitins.currentSystem

This commit is contained in:
Peng Guanwen 2023-01-31 17:56:23 +08:00 committed by GitHub
parent 8bda2c3acc
commit ffe9031129
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -69,14 +69,8 @@ nixev() {
nix-instantiate --eval --strict -E "$1"
}
# use `nix eval` command
nixev2() {
nix eval --raw "$1"
}
desc_system() {
nixev '(import <nixpkgs> {}).stdenv.hostPlatform.system' 2>/dev/null ||
nixev2 'nixpkgs#stdenv.hostPlatform.system'
nixev 'builtins.currentSystem'
}
desc_host_os() {