35 lines
805 B
Nix
35 lines
805 B
Nix
{
|
|
mkModule,
|
|
mkClass,
|
|
mkRepo,
|
|
mkView,
|
|
stdlib,
|
|
jqlib,
|
|
}:
|
|
mkModule (self: {
|
|
artifact = mkClass {
|
|
description = "A file that will be parsed and interrogated";
|
|
};
|
|
|
|
artifactBody = mkRepo self.artifact stdlib.repos.blob {};
|
|
artifactMeta = mkRepo self.artifact stdlib.repos.json {
|
|
schema = with stdlib.repos.json.schema; dictKeysIncomplete {
|
|
filename = str;
|
|
sha256 = str;
|
|
source = any;
|
|
};
|
|
};
|
|
|
|
executable = mkClass {
|
|
description = "A file that can be parsed as a program";
|
|
superclass = self.artifact;
|
|
};
|
|
|
|
executableMeta = mkRepo self.executable stdlib.repos.json {
|
|
schema = with stdlib.repos.json.schema; dictKeysIncomplete {
|
|
format = str;
|
|
};
|
|
};
|
|
|
|
})
|