-
Notifications
You must be signed in to change notification settings - Fork 12
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 flake; #112
base: main
Are you sure you want to change the base?
Add flake; #112
Conversation
Perhaps we should convert the |
/out/ | ||
/pkg/ | ||
/bin/ | ||
.idea |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would at least keep the .idea
folder to ignore stuff from IntelliJ
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But isn't that an ideal use-case for a global ignore-pattern? See last item in the description of the official documentation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I doubt most of the people has confgured that, I would really keep it : D
version = | ||
let | ||
lastModifiedDate = self.lastModifiedDate or self.lastModified or "19700101"; | ||
in "${builtins.substring 0 8 lastModifiedDate}-dev"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we get a new version
if anything except the flake.nix
/ flake.lock
changes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. No, we don't: https://nixos.org/manual/nix/stable/command-ref/new-cli/nix3-flake#flake-reference-attributes
What could be better? 🤔
- Use current time: That's not reproducable. Identical code produced by identical builders will have two different versions.
- Just use "dev"? That will work!
- Stay as we are? At least compared to the option above, we will get a change in the version when the dependencies change (due to implication on vendorHash).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It feels like none of the options are ideal as long as we don't have automation which takes care of the versioning.
Just use "dev"? That will work!
I vote for 👆
- most simple solution
- everbody can get the version information just by looking at the
flake.nix
file - not much going on in this repo anyhow so consuming always the latest
dev
-version is not hurting
Co-authored-by: geigerj0 <[email protected]>
Co-authored-by: geigerj0 <[email protected]>
Getting auto-updates to work looks not so easy. The used tool expects the package to update to be reachable via an URL and not via a local path. Possibilities to continue:
|
This PR adds a flake that provides both, a package-definition for this cli and a direnv-environment suitable for development on this repository.
Out of scope:
Edit:⚠️ It looks like go-definitions are not that easy for some reason: https://www.tweag.io/blog/2021-03-04-gomod2nix/ (good source!)