diff --git a/examples/_d2n-define-projects-manually/flake.nix b/examples/_d2n-define-projects-manually/flake.nix new file mode 100644 index 00000000..c612fb1e --- /dev/null +++ b/examples/_d2n-define-projects-manually/flake.nix @@ -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"; + }; + }; + }; + }; + }; +}