mirror of
https://github.com/nix-community/dream2nix.git
synced 2024-12-23 22:48:02 +03:00
feat: add example for defining projects manually
This commit is contained in:
parent
ba44952315
commit
1eec3ec74f
35
examples/_d2n-define-projects-manually/flake.nix
Normal file
35
examples/_d2n-define-projects-manually/flake.nix
Normal file
@ -0,0 +1,35 @@
|
||||
{
|
||||
inputs = {
|
||||
dream2nix.url = "github:nix-community/dream2nix";
|
||||
nixpkgs.follows = "dream2nix/nixpkgs";
|
||||
flake-parts.url = "github:hercules-ci/flake-parts";
|
||||
src.url = "github:prettier/prettier/2.4.1";
|
||||
src.flake = false;
|
||||
};
|
||||
|
||||
outputs = {
|
||||
self,
|
||||
dream2nix,
|
||||
flake-parts,
|
||||
src,
|
||||
...
|
||||
}:
|
||||
flake-parts.lib.mkFlake {inherit self;} {
|
||||
systems = ["x86_64-linux"];
|
||||
imports = [dream2nix.flakeModuleBeta];
|
||||
|
||||
perSystem = {config, ...}: {
|
||||
# define an input for dream2nix to generate outputs for
|
||||
dream2nix.inputs."prettier" = {
|
||||
source = src;
|
||||
projects = {
|
||||
prettier = {
|
||||
name = "prettier";
|
||||
subsystem = "nodejs";
|
||||
translator = "yarn-lock";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue
Block a user