From c0ea7dfcfe4704259a44f677ab0c653381958196 Mon Sep 17 00:00:00 2001 From: David Arnold Date: Fri, 23 Dec 2022 19:32:52 -0500 Subject: [PATCH] wip: std skelleton (missing d2n function) --- examples/_d2n-std/flake.nix | 27 ++++++++++++++++++++++++++ examples/_d2n-std/nix/app/packages.nix | 16 +++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 examples/_d2n-std/flake.nix create mode 100644 examples/_d2n-std/nix/app/packages.nix 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..d0c02f8ff9 --- /dev/null +++ b/examples/_d2n-std/nix/app/packages.nix @@ -0,0 +1,16 @@ +{ + inputs, + cell, +}: { + default = cell.packages.app; + app = { + source = inputs.src; + projects = { + prettier = { + name = "prettier"; + subsystem = "nodejs"; + translator = "yarn-lock"; + }; + }; + }; +}