Skip to content
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

Distributing an overlay with nur #10

Closed
mpickering opened this issue Jun 30, 2018 · 4 comments · Fixed by #17
Closed

Distributing an overlay with nur #10

mpickering opened this issue Jun 30, 2018 · 4 comments · Fixed by #17

Comments

@mpickering
Copy link
Contributor

I have recently released a project I would like to distribute in a NUR like manner.

https://github.com/mpickering/haskell-nix-plugin

It is currently packaged as an overlay. The intended usage is something like..

let
  plugin-overlay-git = builtins.fetchGit
   { url = https://github.com/mpickering/haskell-nix-plugin.git;}  ;
  plugin-overlay = import "${plugin-overlay-git}/overlay.nix";
  nixpkgs = import <nixpkgs> { overlays = [plugin-overlay]; };

  hl = nixpkgs.haskell.lib;
  hp = nixpkgs.haskellPackages;
in
  (hp.withPlugin(plugs: ps: hl.addPlugin plugs.dump-core ps.either)).DumpCore

Could I instead add the "overlay" to NUR and a user would instead write,

let
  plugin-overlay = import nixpkgs.nur.repos.mpickering.haskell-plugins.overlay;
  nixpkgs = import <nixpkgs> { overlays = [plugin-overlay]; };

Can you think of a nicer overall packaging strategy for this project?

@Mic92
Copy link
Member

Mic92 commented Jun 30, 2018

I would propose to put nixos modules and overlays in a seperate namespace within the repository. This helps later to make overlays/modules discoverable in a search engine:

let
  nixpkgs = import <nixpkgs> { overlays = [
     nixpkgs.nur.repos.mpickering.overlays.haskell-plugins
  ]; };
in

@Mic92
Copy link
Member

Mic92 commented Jun 30, 2018

I will extend the documentation for that.

Mic92 added a commit that referenced this issue Jul 1, 2018
Mic92 added a commit that referenced this issue Jul 1, 2018
Mic92 added a commit that referenced this issue Jul 1, 2018
Mic92 added a commit that referenced this issue Jul 1, 2018
@Mic92 Mic92 closed this as completed in #17 Jul 1, 2018
@Mic92
Copy link
Member

Mic92 commented Jul 2, 2018

The current solution is a bit problematic, because nixpkgs is required to get the nix source for the overlay. This needs a better solution.

@Mic92 Mic92 reopened this Jul 2, 2018
@Mic92
Copy link
Member

Mic92 commented Jul 12, 2018

this pull request will solve the problem: #27

@Mic92 Mic92 closed this as completed Jul 21, 2018
milahu pushed a commit to milahu/NUR that referenced this issue Aug 5, 2023
milahu pushed a commit to milahu/NUR that referenced this issue Aug 6, 2023
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 a pull request may close this issue.

2 participants