-
Notifications
You must be signed in to change notification settings - Fork 92
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
Add lib
output for attributes that don’t rely on pkgs
#699
Comments
Hi @sellout thanks for the report!
The general intention is that you should not be passing Although it sounds like a neat idea, I'm not sure we can truly support the notion of Even if we could express |
Nixpkgs does provide a {
crane,
lib,
}: let
internalCrateNameFromCargoToml =
import "${crane}/lib/internalCrateNameFromCargoToml.nix" {inherit lib;};
in {
crateNameFromCargoToml =
import "${crane}/lib/crateNameFromCargoToml.nix" {inherit internalCrateNameFromCargoToml lib;};
filterCargoSources = import "${crane}/lib/filterCargoSources.nix" {inherit lib;};
} and in the flake, lib.crane = import ./lib/crane.nix {
inherit crane;
inherit (nixpkgs) lib;
}
The issue is that the entry-point doesn’t have access to The less frustrating cases are contexts like And I understand not wanting to have Nixpkgs as a flake input. It’s big. I’ve been considering extracting a
I think |
This contains the parts of the Crane lib that don’t depend on `pkgs`. Fixes ipetkov#699.
This contains the parts of the Crane lib that don’t depend on `pkgs`. Fixes ipetkov#699.
This contains the parts of the Crane lib that don’t depend on `pkgs`. Fixes ipetkov#699.
This contains the parts of the Crane lib that don’t depend on `pkgs`. Fixes ipetkov#699.
This contains the parts of the Crane lib that don’t depend on `pkgs`. Fixes ipetkov#699.
This contains the parts of the Crane lib that don’t depend on `pkgs`. Fixes ipetkov#699.
This contains the parts of the Crane lib that don’t depend on `pkgs`. Fixes ipetkov#699.
The pure lib contains the parts of the Crane lib that don’t depend on `pkgs`, and is exposed via the usual `lib` flake output. The result of `mkLib` contains all of `lib`. Fixes ipetkov#699.
Curious to understand the architecture/design of this approach. Sure you can abstract things like
The thing I'm ultimately worried about is suddenly realizing that |
I like to use |
Is your feature request related to a problem? Please describe.
I often want to take advantage of
filterCargoSources
, etc. in a context where I have to jump through hoops to getpkgs
. Sometimes I jump through the hoops, other times I hack around them with something likeDescribe the solution you'd like
It would be great if
cargo.lib
contained the subset ofcargo.mkLib pkgs
that doesn’t needpkgs
.The text was updated successfully, but these errors were encountered: