SHARE
TWEET

Untitled

jcray Oct 14th, 2019 82 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Running in VS Code integrated terminal:
  2. [jr@lm hcr]$ curl https://nixos.org/nix/install
  3. #!/bin/sh
  4.  
  5. # This script installs the Nix package manager on your system by
  6. # downloading a binary distribution and running its installer script
  7. # (which in turn creates and populates /nix).
  8.  
  9. { # Prevent execution if this script was only partially downloaded
  10. oops() {
  11.     echo "$0:" "$@" >&2
  12.     exit 1
  13. }
  14.  
  15. tmpDir="$(mktemp -d -t nix-binary-tarball-unpack.XXXXXXXXXX || \
  16.          oops "Can't create temporary directory for downloading the Nix binary tarball")"
  17. cleanup() {
  18.    rm -rf "$tmpDir"
  19. }
  20. trap cleanup EXIT INT QUIT TERM
  21.  
  22. require_util() {
  23.    command -v "$1" > /dev/null 2>&1 ||
  24.        oops "you do not have '$1' installed, which I need to $2"
  25. }
  26.  
  27. case "$(uname -s).$(uname -m)" in
  28.    Linux.x86_64) system=x86_64-linux; hash=107310e95a57f502b7ada41aa2c76a3d4aec18847ad864d0b233ca8f4452e9fc;;
  29.    Linux.i?86) system=i686-linux; hash=a5d3f26d4a449616bf654286f2fe29c1c1df4f029b7e29fa3ccf8494d598bfee;;
  30.    Linux.aarch64) system=aarch64-linux; hash=94a6a525bd0b2df82e14b96b5b0eaae86669b5d4671aacfc4db2db85325a81c1;;
  31.    Darwin.x86_64) system=x86_64-darwin; hash=a1f0108cedc74293fe23186b9e9d674e7a6779fc90005cb462649e52b28581cd;;
  32.    *) oops "sorry, there is no binary distribution of Nix for your platform";;
  33. esac
  34.  
  35. url="https://nixos.org/releases/nix/nix-2.3.1/nix-2.3.1-$system.tar.xz"
  36.  
  37. tarball="$tmpDir/$(basename "$tmpDir/nix-2.3.1-$system.tar.xz")"
  38.  
  39. require_util curl "download the binary tarball"
  40. require_util tar "unpack the binary tarball"
  41.  
  42. echo "downloading Nix 2.3.1 binary tarball for $system from '$url' to '$tmpDir'..."
  43. curl -L "$url" -o "$tarball" || oops "failed to download '$url'"
  44.  
  45. if command -v sha256sum > /dev/null 2>&1; then
  46.    hash2="$(sha256sum -b "$tarball" | cut -c1-64)"
  47. elif command -v shasum > /dev/null 2>&1; then
  48.    hash2="$(shasum -a 256 -b "$tarball" | cut -c1-64)"
  49. elif command -v openssl > /dev/null 2>&1; then
  50.    hash2="$(openssl dgst -r -sha256 "$tarball" | cut -c1-64)"
  51. else
  52.    oops "cannot verify the SHA-256 hash of '$url'; you need one of 'shasum', 'sha256sum', or 'openssl'"
  53. fi
  54.  
  55. if [ "$hash" != "$hash2" ]; then
  56.    oops "SHA-256 hash mismatch in '$url'; expected $hash, got $hash2"
  57. fi
  58.  
  59. unpack=$tmpDir/unpack
  60. mkdir -p "$unpack"
  61. tar -xf "$tarball" -C "$unpack" || oops "failed to unpack '$url'"
  62.  
  63. script=$(echo "$unpack"/*/install)
  64.  
  65. [ -e "$script" ] || oops "installation script is missing from the binary tarball!"
  66. "$script" "$@"
  67.  
  68. } # End of wrapping
  69. [jr@lm hcr]$ nix-env --versioncopy
  70. bash: nix-env: command not found
  71. [jr@lm hcr]$ curl --version
  72. curl 7.65.3 (x86_64-pc-linux-gnu) libcurl/7.65.3 OpenSSL/1.1.1c zlib/1.2.11 libidn2/2.2.0 libpsl/0.21.0 (+libidn2/2.2.0) libssh2/1.8.2 nghttp2/1.39.2
  73. Release-Date: 2019-07-19
  74. Protocols: dict file ftp ftps gopher http https imap imaps pop3 pop3s rtsp scp sftp smb smbs smtp smtps telnet tftp
  75. Features: AsynchDNS GSS-API HTTP2 HTTPS-proxy IDN IPv6 Kerberos Largefile libz NTLM NTLM_WB PSL SPNEGO SSL TLS-SRP UnixSockets
  76. [jr@lm hcr]$ [jr@lm hcr]$ inxi -Fxxx
  77. perl: warning: Setting locale failed.
  78. perl: warning: Please check that your locale settings:
  79.        LANGUAGE = (unset),
  80.        LC_ALL = (unset),
  81.        LC_ADDRESS = "en_AU.UTF-8",
  82.        LC_NAME = "en_AU.UTF-8",
  83.        LC_MONETARY = "en_AU.UTF-8",
  84.        LC_PAPER = "en_AU.UTF-8",
  85.        LC_IDENTIFICATION = "en_AU.UTF-8",
  86.        LC_TELEPHONE = "en_AU.UTF-8",
  87.        LC_MEASUREMENT = "en_AU.UTF-8",
  88.        LC_TIME = "en_AU.UTF-8",
  89.        LC_NUMERIC = "en_AU.UTF-8",
  90.        LANG = "en_GB.UTF-8"
  91.    are supported and installed on your system.
  92. perl: warning: Falling back to the standard locale ("C").
  93. System:
  94.  Host: lm Kernel: 4.19.69-1-MANJARO x86_64 bits: 64
  95.  compiler: gcc v: 9.1.0 Desktop: KDE Plasma 5.16.4
  96.  tk: Qt 5.13.0 wm: kwin_x11 dm: SDDM Distro: Manjaro Linux
  97. Machine:
  98.  Type: Laptop System: Dell product: Latitude E6410 v: 0001
  99.  serial: <root required> Chassis: type: 9
  100.  serial: <root required>
  101.  Mobo: Dell model: 0HNGW4 serial: <root required> UEFI: Dell
  102.  v: A16 date: 12/05/2013
  103. Battery:
  104.  ID-1: BAT0 charge: 33.3 Wh condition: 33.3/48.8 Wh (68%)
  105.  volts: 12.5/11.1 model: Samsung SDI DELL PT43699
  106.  type: Li-ion serial: 7 status: Full
  107. CPU:
  108.  Topology: Dual Core model: Intel Core i5 M 560 bits: 64
  109.  type: MT MCP arch: Nehalem rev: 5 L2 cache: 3072 KiB
  110.  flags: lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
  111.  bogomips: 21290
  112.  Speed: 1432 MHz min/max: 1199/2667 MHz boost: enabled
  113.  Core speeds (MHz): 1: 1225 2: 1374 3: 1217 4: 1257
  114. Graphics:
  115.  Device-1: Intel Core Processor Integrated Graphics
  116.  vendor: Dell Latitude E6410 driver: i915 v: kernel
  117.  bus ID: 00:02.0 chip ID: 8086:0046
  118.  Display: x11 server: X.Org 1.20.5 driver: modesetting
  119.  alternate: fbdev,intel,vesa compositor: kwin_x11
  120.  resolution: 1440x900~60Hz
  121.  OpenGL: renderer: Mesa DRI Intel Ironlake Mobile
  122.  v: 2.1 Mesa 19.1.5 direct render: Yes
  123. Audio:
  124.  Device-1: Intel 5 Series/3400 Series High Definition Audio
  125.  vendor: Dell Latitude E6410 driver: snd_hda_intel v: kernel
  126.  bus ID: 00:1b.0 chip ID: 8086:3b56
  127.  Sound Server: ALSA v: k4.19.69-1-MANJARO
  128. Network:
  129.  Device-1: Intel 82577LM Gigabit Network
  130.  vendor: Dell Latitude E6410 driver: e1000e v: 3.2.6-k
  131.  port: 7040 bus ID: 00:19.0 chip ID: 8086:10ea
  132.  IF: eno1 state: down mac: 00:26:b9:e0:a5:6c
  133.  Device-2: Broadcom and subsidiaries BCM43224 802.11a/b/g/n
  134.  vendor: Dell Wireless 1520 Half-size Mini PCIe Card
  135.  driver: bcma-pci-bridge v: N/A port: 7000 bus ID: 02:00.0
  136.  chip ID: 14e4:4353
  137.  IF-ID-1: wlp2s0b1 state: up mac: 88:9f:fa:5e:83:8f
  138. Drives:
  139.  Local Storage: total: 298.09 GiB used: 23.90 GiB (8.0%)
  140.  ID-1: /dev/sda vendor: Seagate model: ST9320423AS
  141.  size: 298.09 GiB speed: 3.0 Gb/s rotation: 7200 rpm
  142.  serial: 5VJ9NCZP rev: SDM1 scheme: GPT
  143. Partition:
  144.  ID-1: / size: 292.12 GiB used: 23.90 GiB (8.2%) fs: ext4
  145.  dev: /dev/dm-0
  146. Sensors:
  147.  System Temperatures: cpu: 59.0 C mobo: N/A sodimm: 44.0 C
  148.  Fan Speeds (RPM): cpu: 0
  149. Info:
  150.  Processes: 218 Uptime: 3h 07m Memory: 3.72 GiB
  151.  used: 2.05 GiB (55.2%) Init: systemd v: 242 Compilers:
  152.  gcc: 9.1.0 clang: 8.0.1 Shell: bash v: 5.0.9
  153.  running in: code inxi: 3.0.36
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top