Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a Nix Flake, overlay, or make a nixpkg to install oxide cli #942

Open
1 of 4 tasks
tonybutt opened this issue Dec 13, 2024 · 1 comment
Open
1 of 4 tasks

Add a Nix Flake, overlay, or make a nixpkg to install oxide cli #942

tonybutt opened this issue Dec 13, 2024 · 1 comment
Labels
feature Issue for a new feature that does not break current functionality

Comments

@tonybutt
Copy link

Target component

  • CLI
  • SDK
  • Something else
  • Not sure

Overview

I made a simple derivation to install the oxide cli on my NixOS box like so:

oxide = pkgs.stdenv.mkDerivation {
              name = "oxide";
              src = pkgs.fetchurl {
                url = "https://github.com/oxidecomputer/oxide.rs/releases/download/v0.8.0+20241009.0/oxide-cli-x86_64-unknown-linux-musl.tar.xz";
                sha256 = "BH6EkQDq9lBpvcJX1tud150RItYGl2o3hCbfk9x7Zg4=";
              };
              phases = [
                "installPhase"
                "patchPhase"
              ];
              installPhase = ''
                mkdir -p $out/bin
                tar -xvf $src -C $out/bin --strip-components 1
                chmod +x $out/bin/oxide
              '';
            };

However, it would be nice to actually compile the cli with nix with rustPlatform.buildRustPackage instead.

I am happy to maintain this for now in nixpkgs and this would allow a simple way to use oxide cli with nix package manager. I noticed you have a flake for your control plane already so figured you might have some expertise to get that working within this project!

I attempted to get that compiling but my understanding of rust workspaces was a bit limited to get that working.

In the mean time, nix users can use the derivation above to install for now. I'll work on a flake PR in my free time.

Implementation details

No response

Anything else you would like to add?

No response

@tonybutt tonybutt added the feature Issue for a new feature that does not break current functionality label Dec 13, 2024
@djacu
Copy link

djacu commented Dec 18, 2024

Hey @tonybutt

See #950 and #951 for an issue I raised as well as a PR to change the dependencies of oxide-rs.

I packaged version 0.7.0 back in September but didn't have a way to test it. Since then @sarcasticadmin got us access so we could evaluate if the CLI works as expected being packaged with Nix. I've got a draft PR open right now to add version 0.9.0 to nixpkgs. Currently trying some patching trickery to see if it is possible to build it without having #951 being merged. See NixOS/nixpkgs#366077

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Issue for a new feature that does not break current functionality
Projects
None yet
Development

No branches or pull requests

2 participants