-
-
Notifications
You must be signed in to change notification settings - Fork 346
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
repoOverrides when using flake #254
Comments
Not yet. This would be nice to have. I would say flake support is not set in stone yet. There might be better ways how this could be integrated into NUR. After all we could just have an open registry like https://github.com/NixOS/flake-registry |
By transposing the initial "Overriding repositories" below the ways I obtained with packageOverrides or overlay :
inputs.nur.url = "github:nix-community/NUR";
inputs.kapack.url = "path:/home/auguste/dev/nur-kapack"; # my local nur.repos.kapack
outputs = {self, nixpkgs, nur, kapack }: {
nurpkgs = import nixpkgs { inherit system; };
system = "x86_64-linux";
...
modules = [
{
nixpkgs.config.packageOverrides = pkgs: {
nur = import nur {
inherit pkgs nurpkgs;
repoOverrides = { kapack = import kapack { inherit pkgs; }; };
};
};
}
];
...
...
modules = [
{
nixpkgs.overlays = [
(final: prev: {
nur = import nur {
nurpkgs = prev;
pkgs = prev;
repoOverrides = { kapack = import kapack { pkgs = prev; }; };
};
})
];
}
... |
We could also have these snippets in the README. They look useful. |
this breaks when the last component of the path is a symlink {
# last component is symlink
# $ readlink /home/user/src/symlink-to-nur-packages
# nur-packages
# $ sudo nixos-rebuild switch
# error: getting status of '/nix/store/nur-packages': No such file or directory
inputs.nur-packages-local.url = "path:/home/user/src/symlink-to-nur-packages";
# ok
#inputs.nur-packages-local.url = "path:/home/user/src/nur-packages"; may be fixed by NixOS/nix#6530 |
- inputs.nur-packages-local.url = "path:/home/user/src/nur-packages"
+ inputs.nur-packages-local.url = "git+file:///home/user/src/nur-packages" is better, because it will copy only files tracked by git |
Is this solution still working? I I tried to apply it and facing an error. I am also searching in repos of NUR contributors to find out how they use it but without success for the moment |
Yes I works have a look to: https://github.com/oar-team/regale-nixos-compose/blob/main/bebida/flake.nix |
Thanks for the answer. |
I am using flake for my nixos configuration and was able to add NUR as described in the README.
However, as I am starting my own NUR at the moment, and want to test packages locally first, I would like to use the
repoOverrides
attribute to add my local NUR repository.Unfortunately, I don't see a way to pass the
repoOverrides
attribute to NUR's default.nix when using flakes.Is it possible to support this feature?
The text was updated successfully, but these errors were encountered: