Skip to content

Instantly share code, notes, and snippets.

@arianvp
Last active December 10, 2023 14:31
Show Gist options
  • Save arianvp/97560f86207575d0fc820b24a5c13b84 to your computer and use it in GitHub Desktop.
Save arianvp/97560f86207575d0fc820b24a5c13b84 to your computer and use it in GitHub Desktop.
multiple shells (Note gists don't support subdirectories so read - as / lol)
use flake .#dira
use flake .#'dira/dirc'
{ mkShell, inputsFrom, asciidoctor }: mkShell {
name = "dirc";
inputsFrom = inputsFrom;
contents = [ asciidoctor ];
}
{ cdktf, mkShell, inputsFrom }: mkShell {
name = "dira";
inputsFrom = inputsFrom;
contents = [ cdktf ];
}
use flake .#dirb
{ dagger, mkShell, inputFrom }: mkShell {
name = "dirb";
inputsFrom = inputsFrom;
contents = [ dagger ];
}
{
outputs = { nixpkgs, self}: {
devShells.x86_64-linux = with nixpkgs.legacyPackages.x86_64-linux; rec {
default = mkShell {
name = "default";
contents = [ bun ];
};
# will have cdktf and bun
dira = callPackage ./dira/shell.nix { inputsFrom =[ default ]; };
# will have dagger and bun
dirb = callPackage ./dirb/shell.nix { inputsFrom = [ default ]; };
# note: will have both cdktf and asciidoctor and bun
"dira/dirc" = callPackage ./dira/dirc/shell.nix { inputsFrom = [ dira ]; };
};
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment