-
-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
nf-core: init at 2.12.1 #286496
base: master
Are you sure you want to change the base?
nf-core: init at 2.12.1 #286496
Conversation
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.
Some thoughts.
Co-authored-by: zeuner <zeuner@users.noreply.github.com>
Co-authored-by: zeuner <zeuner@users.noreply.github.com>
Co-authored-by: zeuner <zeuner@users.noreply.github.com>
Co-authored-by: zeuner <zeuner@users.noreply.github.com>
Co-authored-by: zeuner <zeuner@users.noreply.github.com>
@zeuner Thanks! Addressed those issues. |
Hey @edmundmiller I checked the code and this is likely simply due to the fact the the nix-based version will not have the "right" permissions in the store. But this code here assumes this. Using the code snippet below (with postPatch = ''
file=nf_core/create.py
for line in "# Mirror file permissions" "template_stat = os.stat(template_fn_path)" "os.chmod(output_path, template_stat.st_mode)"; do
sed -i "/$line/d" $file
done
''; I'm not sure what a clean solution would be in the end. Probably not using For testing: nf-core create --name workflow --author "" --description ""
|
Thanks for testing that! Interesting solution as well. I think that's a fine patch, maybe we can fix it on the nf-core side in future releases, and just check for permissions |
@edmundmiller @zeuner I opened this PR to included |
Awesome! Aside: How'd you get it merged so fast? 馃槅 #286701 has been sitting there for months. |
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: |
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.
You should squash the commits in such a way that every package gets a single init
commit, and the order of commits is such that Nixpkgs is able to evaluate correctly after every commit.
Other then that, looks good to me.
@edmundmiller Based on your PR, I currently use version 2.13.1 of nf-core = pkgs-nf-core-2.nf-core.overrideAttrs (finalAttrs: previousAttrs: rec { # pkgs-nf-core-2 points to this PR
version = "2.13.1";
src = fetchFromGitHub {
owner = "nf-core";
repo = "tools";
rev = version;
hash = "sha256-Wda1dmc7FDgjXIuGdLFqlkuvMU+jUVzoEh2SDWGfOAY=";
};
postPatch = ''
# https://github.com/nf-core/tools/blob/master/nf_core/create.py#L345-L347
sed -i "/# Mirror file permissions/,+2d" nf_core/create.py
# https://github.com/nf-core/tools/blob/9eac5e9b33a4b86a5228e950a8c8fd16765f4a85/nf_core/components/create.py#L285-L289
sed -i "/# Mirror file permissions/,+4d" nf_core/components/create.py
'';
}); |
Description of changes
Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 馃憤 reaction to pull requests you find important.