mirror of
https://github.com/nix-community/dream2nix.git
synced 2024-09-11 14:35:30 +03:00
add example for defining projects
as attrs
This commit is contained in:
parent
a62727de80
commit
011b8ba238
@ -87,6 +87,9 @@ Extensive Example `flake.nix`:
|
||||
config.projectRoot = ./.;
|
||||
|
||||
source = ./.;
|
||||
|
||||
# `projects` can alternatively be an attrset.
|
||||
# `projects` can be omitted if `autoProjects = true` is defined.
|
||||
projects = ./projects.toml;
|
||||
|
||||
# Configure the behavior of dream2nix when translating projects.
|
||||
|
28
examples/_d2n-projects-as-attrs/flake.nix
Normal file
28
examples/_d2n-projects-as-attrs/flake.nix
Normal file
@ -0,0 +1,28 @@
|
||||
{
|
||||
inputs = {
|
||||
dream2nix.url = "github:nix-community/dream2nix";
|
||||
src.url = "github:yusdacra/linemd/v0.4.0";
|
||||
src.flake = false;
|
||||
};
|
||||
|
||||
outputs = {
|
||||
self,
|
||||
dream2nix,
|
||||
src,
|
||||
} @ inp:
|
||||
(dream2nix.lib.makeFlakeOutputs {
|
||||
systems = ["x86_64-linux"];
|
||||
config.projectRoot = ./.;
|
||||
source = src;
|
||||
projects = {
|
||||
linemd = {
|
||||
name = "linemd";
|
||||
subsystem = "rust";
|
||||
translator = "cargo-lock";
|
||||
};
|
||||
};
|
||||
})
|
||||
// {
|
||||
# checks.x86_64-linux.linemd = self.packages.x86_64-linux.linemd;
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue
Block a user