-
Notifications
You must be signed in to change notification settings - Fork 10
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
om show
: Display description for flake apps
#251
Conversation
DEFAULT_FLAKE_SCHEMAS = lib.cleanSourceWith { | ||
name = "flake-schemas"; | ||
src = flake.inputs.self + /nix/flake-schemas; | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this can be replaced with:
DEFAULT_FLAKE_SCHEMAS = flake.inputs.self + /nix/flake-schemas;
It should behave the same since there is no filter
provided for cleanSourceWith
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@srid why does OM_INIT_REGISTRY
use cleanSourceWith
if there is no filter
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's the actual semantics of cleanSourceWith
,
Proof:
❯ echo $OM_INIT_REGISTRY
/nix/store/9j2sil7h6w2lx7p71x2khhy0ba7v0i9d-flakreate-registry
With,
diff --git a/crates/omnix-cli/crate.nix b/crates/omnix-cli/crate.nix
index 0f99d6d..04043bd 100644
--- a/crates/omnix-cli/crate.nix
+++ b/crates/omnix-cli/crate.nix
@@ -34,11 +34,7 @@ in
) ++ lib.optionals pkgs.stdenv.isLinux [
pkgsStatic.openssl
];
- OM_INIT_REGISTRY =
- lib.cleanSourceWith {
- name = "flakreate-registry";
- src = flake.inputs.self + /crates/flakreate/registry;
- };
+ OM_INIT_REGISTRY = flake.inputs.self + /crates/flakreate/registry;
DEVOUR_FLAKE = inputs.devour-flake;
OMNIX_SOURCE = inputs.self;
NIX_FLAKE_SCHEMAS_BIN = lib.getExe pkgs.nix-flake-schemas;
That becomes:
❯ echo $OM_INIT_REGISTRY
/nix/store/fsrav4xa7wrhnw19h04r4jk7cdpkbh6g-source/crates/flakreate/registry
@roberth was the one originally came across this pattern, in haskell-flake:
Since this function is not self-documenting (what does "clean source" even mean here?) perhaps there should be another function that is?
Add our custom schema until DeterminateSystems/flake-schemas#31 is merged.
Merge with official schema.
resolves #163