Skip to content

Nix flake as an installation option#36

Open
temidaradev wants to merge 3 commits intoThreeDotsLabs:masterfrom
temidaradev:master
Open

Nix flake as an installation option#36
temidaradev wants to merge 3 commits intoThreeDotsLabs:masterfrom
temidaradev:master

Conversation

@temidaradev
Copy link

Added flake.nix for adding nix package manager as a installation option

Copy link
Member

@roblaszczak roblaszczak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hey @temidaradev, thanks for contribution

I have some comments, please let me know if they makes sense and if they require some work you will have capacity to pick them up

thanks!


subPackages = [ "tdl" ];

vendorHash = "sha256-Q3MwzslcVv9h3QZAfqnAYmkdVtWeJnhXqYvhZmb3hps=";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

when it will require re-generation?

could it make sense to add script in makefile to regenerate it and if it may change often add CI task that can verify it?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It will only require regeneration whenever the Go dependencies (go.mod/go.sum) change.

flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
version = if self ? rev then self.rev else "dev";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just to double check, will it work with our tags/github semver releases?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, it works perfectly with tags Users can install a specific release by just appending the tag, like nix profile add github:ThreeDotsLabs/cli/v1.0.0.

@temidaradev
Copy link
Author

Will handle this evening

@roblaszczak
Copy link
Member

Thanks @temidaradev!

@temidaradev temidaradev requested a review from roblaszczak March 25, 2026 19:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants