Open fzakaria opened 1 year ago
My other option was doing all the chaining myself
let sqlite-3411 = pkgs.sqlite.overrideAttrs (oldAttrs: rec {
version = "3.41.1";
src = pkgs.fetchurl {
url = "https://sqlite.org/2023/sqlite-autoconf-3410100.tar.gz";
sha256 = "sha256-Ta376rn44WxpXU+7xRwWsvd/uX/0wcPROZGd/AOMnjM=";
};
});
pythonPackageOverrides = self: super: {
apsw = super.apsw.overridePythonAttrs (oldAttrs: rec {
version = "3.41.0.0";
src = pkgs.fetchFromGitHub {
owner = "rogerbinns";
repo = "apsw";
rev = "refs/tags/${version}";
sha256 = "sha256-U7NhC83wBaUONLsQbL+j9866u4zs58O6AQxwzS3e0qM=";
};
buildInputs = [
sqlite-3411
];
});
};
in {
in my devenv.nix
I was thinking to add overlays
to devenv.yaml
to support this one.
This feature is necessary for me to use devenv instead of manual flake.nix :smile:
You can do this using devenv.yaml
:
inputs:
subflake:
url: path:./subflake
overlays:
- default
and in subflake/flake.nix
:
{
outputs = { ... }: {
overlays.default = self: super: {
hello2 = self.hello;
};
};
}
Then your devenv.nix
can be:
{ pkgs, ... }: {
packages = [ pkgs.hello2 ];
}
To avoid that boilerplate we could support devenv.yaml
like:
overlays:
- myoverlay1: |
self: super: { hello2 = self.hello; }
- ./myoverlay2.nix
Another possibility would be to evaluate pkgs
twice, to add extra overlays.
This would provide a better API (allowing us to provide overlays per module) for sacrificing performance (to be measured how much).
Relevant is #792 because we need to import nixpkgs once.
Would be great to support local overlays in the repository.
I have to override a package that depends on another package etc.. and doing it with an overlay is very simple.
My workaround at the moment is:
and I have to use pkgs1 everywhere.