Skip to content

fetchnixpkgs: init - #26802

Closed
LnL7 wants to merge 1 commit into
NixOS:masterfrom
LnL7:fetchnixpkgs
Closed

LnL7 wants to merge 1 commit into
NixOS:masterfrom
LnL7:fetchnixpkgs

Conversation

@LnL7

@LnL7 LnL7 commented Jun 23, 2017

Copy link
Copy Markdown
Member
Motivation for this change

example

fetchnixpkgs {
  rev = "06271b6eba7ce754a305df1d90925de976b915d2";
  sha256 = "0w3mwggyc6ypjn07rsfcrmwlfmql96rvfz6436hm2vmnplpnylq3";
  patches = [ ./foo.patch ];
}
Things done
  • Tested using sandboxing
    (nix.useSandbox on NixOS,
    or option build-use-sandbox in nix.conf
    on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • Linux
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Fits CONTRIBUTING.md.

@FRidh

FRidh commented Jun 24, 2017

Copy link
Copy Markdown
Member

I think the chosen name is too generic. I use myself something similar but with fetchTarball and a hash. This function is for IFD, right? Maybe the name should reflect that.

@grahamc

grahamc commented Jul 16, 2017

Copy link
Copy Markdown
Member

I'd love to get this merged. @LnL7 what do you think about @FRidh's comment?

@LnL7

LnL7 commented Jul 16, 2017

Copy link
Copy Markdown
Member Author

I'm not sure what would be a better name for it.

@FRidh

FRidh commented Jul 17, 2017 via email •

Copy link
Copy Markdown
Member

@edolstra

Copy link
Copy Markdown
Member

👎 on ad hoc fetch functions like this. See my recent comment on fetchFromGitHub. It's also questionable whether we want to promote the use of IFD. And given that fetchTarball supports a similar use case, this function adds technical debt that we'll end up having to support forever.

@LnL7

LnL7 commented Jul 17, 2017 •

Copy link
Copy Markdown
Member Author

I'm not entirely happy with this either, the main idea behind this was making it easier to apply patches on top of nixpkgs. What do you think of the idea of adding some sort of support for patches to nix-channel or nixpkgs itself?

I think it would we really nice if it was possible to do something like this, to apply some changes on top of a channel without having to maintain and rebase my own git branch.

curl -o ~/.nixpkgs/patches/pr-26802.patch https://github.com/NixOS/nixpkgs/commit/1fa8d8d87a55914bdae8a3e56166fcfb510afd94.patch

@FRidh

FRidh commented Jul 31, 2017

Copy link
Copy Markdown
Member

Closing because this won't go in.

Regarding the discussion on patching Nixpkgs. If you make it a Nixpkgs feature you end up with recursion like you've shown here so if we don't want that then I suppose the only option is to make it a Nix feature.

@copumpkin

Copy link
Copy Markdown
Member

See #22058 for related work

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.

5 participants