diff --git a/examples/_d2n-std/flake.nix b/examples/_d2n-std/flake.nix new file mode 100644 index 0000000000..7a6c06a5bd --- /dev/null +++ b/examples/_d2n-std/flake.nix @@ -0,0 +1,27 @@ +{ + inputs = { + std.url = "github:divnix/std"; + dream2nix.url = "github:nix-community/dream2nix"; + dream2nix.inputs.nixpkgs.follows = "std/nixpkgs"; + nixpkgs.follows = "std/nixpkgs"; + src.url = "github:prettier/prettier/2.4.1"; + src.flake = false; + }; + + outputs = { + std, + self, + ... + } @ inputs: + std.growOn { + inherit inputs; + cellsFrom = ./nix; + cellBlocks = with std.blockTypes; [ + (installables "packages" {ci.build = true;}) + ]; + } + # compat with `nix` cli + { + packages = std.harvest self ["app" "packages"]; + }; +} diff --git a/examples/_d2n-std/nix/app/packages.nix b/examples/_d2n-std/nix/app/packages.nix new file mode 100644 index 0000000000..4590d1359c --- /dev/null +++ b/examples/_d2n-std/nix/app/packages.nix @@ -0,0 +1,16 @@ +{ + inputs, + cell, +}: rec { + default = app; + app = { + source = inputs.src; + projects = { + prettier = { + name = "prettier"; + subsystem = "nodejs"; + translator = "yarn-lock"; + }; + }; + }; +}