-
-
Notifications
You must be signed in to change notification settings - Fork 160
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
Adding flake.nix
#363
Adding flake.nix
#363
Conversation
Hey, Great to see this. You can squash the commits and force-push. Also, please don't merge main branch into this branch. git reset --hard HEAD^
git rebase -i HEAD~6 # double-check this please Thanks. |
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.
In addition to the comments I have put in, would you be able to document this for the authors of this repository to see the changes clearly. Great work. Thank you.
May I ask why I shouldn't merge the main branch into this branch? |
@TornaxO7 When you merge main into this branch, it might cause conflicts and unwanted behaviors. This answer on stack overflow describes it better. You can see General Code Conventions for nixpkgs for more information. |
well that's the reason why I'm merging
If I'm reading it correctly, this person explains why the "official" ways are doing this but this person doesn't say that it's not recommended to do it. Maybe I'm missing the point? 🤔 |
I believe you can understand it easier if you visualize the branches separating of from one another. The main branch is the first branch which we make variations of. Upon creating a PR, the two branches To be more clear, The commit in which you merge |
@RaySlash I'll squash everything in the end, but not yet |
Are you merging main using another branch into this branch due to any conflicts? You really don't have to stay update with main otherwise. |
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.
Few more changes to revert. I am aware you are still working on it. Great job. Thanks
Tbh. I still don't really understand why I shouldn't keep my branch up to date ;-; |
@TornaxO7 Changes looks good for now. Ill test everything once I'm home. direnv seems handy, thanks for the explanation. Also, in this scenario you want to use In this case of you working on a rev that split off from |
Additionally, would you be able to document this under |
I tested your flake.nix and the
I did a rebase using your PR contents and add a few lines to make the # For rustPlatform
nativeBuildInputs = with pkgs; [
ncurses
cmake
pkg-config
autoPatchelfHook
];
# `nix build` works
packages = eachSystem (system: {
default = pkgsFor.${system}.callPackage mkRio { };
}); You can refactor your current flake.nix based on mine. Also, if you don't mind letting me do the PR, ill have my branch up as PR if that's alright by you as you are the first one to stumble across. Thanks. |
I am also able to add the rio flake to my dotfiles and use following changes to accomodate it: # flake.nix
inputs.rio.url = "github:rayslash/rio/flakeify";
outputs = inputs@{ nixpkgs, ... }: {
#...
}
# home.nix
{config, lib, pkgs, inputs, outputs, ... }: {
programs.rio = {
enable = true;
package = inputs.rio.packages.${pkgs.system}.default;
};
#...
} |
Huh, may I ask why you needed them? I just needed to do By the way, the unofficial NixOS discord server recommended me |
I was not able to compile as those packages were missing. It could be that you have those packages declared in your dotfiles.
That seems good. flake-parts would give us more flexibility with declaring System specific changes. i guess so. I got to check it out to see if its worth it. But currently, systems works well. We could do the change in a different PR. this would be initial flake init. What do you say? |
Ah yes, I see what you mean.
Yeah, we can do that. |
@RaySlash alright, so I basically took your |
@RaySlash alright, I also added some ci to test the |
See this: Line 5 in fb689b7
|
@TornaxO7 This looks good. everything looks meaningful. If I was to nitpick, I could find that few changes that has been reverted still does update the file even though contents are same. Also, about the documentation part. We can add the info for NixOS users to install using nixpkgs and flake and fact that they can use nix develop and nix build. Should we do this in a different PR or in the same one? Also, if you did import my flake completely, can u add me as co-author of the commit? see more info about it here
|
where would you add this info? In general I think that most people are aware of
Aye, will do |
eb5af4e
to
8451fec
Compare
adding missing dependencies flake: adding overlay flake: adding app flake: fix package flake: removing packaging... adding dev shell adding overlays extend devshell for more systems rust-toolchain: removing rust-src and rust-analyzer create initial flake state adding nix build workflow adding flake lock update ci nix-build: fix run command update gitignore Co-authored-by: RaySlash <[email protected]>
@RaySlash done! :) |
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.
Looks Good. 🥳 Approved
@raphamorim now it's up to you |
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.
@TornaxO7 I have noticed a path that seems to be wrong, am I correct?
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.
thanks for the work 🎖️
* adding nix-flake adding missing dependencies flake: adding overlay flake: adding app flake: fix package flake: removing packaging... adding dev shell adding overlays extend devshell for more systems rust-toolchain: removing rust-src and rust-analyzer create initial flake state adding nix build workflow adding flake lock update ci nix-build: fix run command update gitignore Co-authored-by: RaySlash <[email protected]> * fix LD_LIBRARY_PATH for flake * update paths to nix-build workflows * adding RaySlash for updating flake * nix-build: set branch to 0.0.x * add comment to gitignore --------- Co-authored-by: RaySlash <[email protected]>
This helps nix-users to load a dev shell which helps to get started with contributing.