NUR icon indicating copy to clipboard operation
NUR copied to clipboard

Document how to test/use own repository

Open Mic92 opened this issue 7 years ago • 2 comments

It should be straight forward to test expressions before pushing new content to a repository. Therefore we should provide snippets on how load packages/modules/library/overlays functions from a local checkout into NixOS/Nix. If necessary helpers can be added to NUR that simplify the workflow.

Mic92 avatar Jul 24 '18 09:07 Mic92

I currently am trying to test a module I wrote and am stuck :/

Edit: I ended up with something like this:

let
  nur-pkgs = import <nur-pkgs> {};
in {

  nixpkgs.config.packageOverrides = pkgs: rec {
    nur = import <nur-pkgs> {
      inherit pkgs;
    };
    matrix-registration = nur.matrix-registration;
  };
  imports = [ nur-pkgs.modules.matrix-registration ];

Which I then build with sudo nixos-rebuild switch -I nur-pkgs=/path/to/nur-packages

zeratax avatar Dec 12 '20 20:12 zeratax

you can also override your own repository https://github.com/nix-community/NUR#overriding-repositories to update it more frequently than NUR.

Mic92 avatar Dec 13 '20 03:12 Mic92

you can also override your own repository

so with repoOverrides, this issue is fixed...?

milahu avatar Feb 25 '23 08:02 milahu

I think so.

Mic92 avatar Feb 26 '23 15:02 Mic92