4 ms·
> What distro package manager is allowing me to give a project newbie a single command to hit the ground running across all platforms Nix (it's the "distro pac
by chriswarbo 5y ago
> What distro package manager is allowing me to give a project newbie a single command to hit the ground running across all platforms
Nix (it's the "distro package manager" of NixOS, but runs happily on any Linux distro, without even needing root permissions; it's also supported on macOS. I've seen references to other Unix systems like BSD, for WSL, and possibly other OSes, but they aren't officially supported).
In fact, we don't even use "a single command"; our projects have .envrc files for direnv (which has Nix support out-of-the-box), so our shells automatically enter/exit a (reproducible) development environment just based on their current working directory.
> "docker-compose up"
I wasn't aware that Docker was cross platform? I thought it used Linux containers, which requires running a VM on macOS, etc. (e.g. that's what applications like "Docker Desktop" do in the background). Apparently it also supports "Windows containers" now, but those aren't even compatible with the Linux ones!
> What distro package manager is allowing me to have several different platforms that can just grab a GitHub repo link and deploy it viola?
Nix does this with a built-in function called `fetchGit` (there are also specialised functions like `fetchFromGitHub` and `fetchFromGitLab` which download the tar.gz of a given commit, rather than checking-out the repo).
"Deployment" varies, depending on what you want; e.g. it could be a simple 'nix-copy-closure' (to a physical machine, a running VM, etc.), it could be making a container image (with a call to `ociTools.buildImage`, `dockerTools.buildImage`, etc.), or a VM image (VirtualBox, libvirt or Xen). NixOps and Disnix can orchestrate and deploy those, but I've not tried them (we use AWS ECR and CloudFormation).
- zekrioca 5y agoTried using Nix on my aarch64-darwin and it did not work. Saw many github issues around, trying this [1], this [2], and that, but it did not work. Tried Homebrew and it worked like a charm. [1] https://github.com/NixOS/nixpkgs/issues/95903 https://github.com/NixOS/nixpkgs/issues/95903 [2] https://github.com/nix-community/home-manager/issues/2266 https://github.com/nix-community/home-manager/issues/2266
- chriswarbo 5y agoHmm, I've not used that architecture/OS myself (I use NixOS on an i686-linux Thinkpad and an aarch64-linux Pinephone, and Nix on an x86_64-darwin Macbook). From skimming the comments, it looks like Nix itself works; although there seem to be many packages in the Nixpkgs repo which don't have that architecture/OS in their metadata.