Skip to content

Commit

Permalink
Merge pull request #9 from input-output-hk/nix-shell
Browse files Browse the repository at this point in the history
Add initial version of a nix shell
  • Loading branch information
bjornkihlberg committed Aug 2, 2023
2 parents c0a6dc6 + e247ce4 commit 9c8a09b
Show file tree
Hide file tree
Showing 6 changed files with 424 additions and 1 deletion.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ output
docs
env
tsconfig.tsbuildinfo
lerna-debug.log
.yarn/*
!.yarn/patches
!.yarn/plugins
Expand Down
17 changes: 17 additions & 0 deletions Readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Marlowe TS-SDK

TODO

## Testing

In order to run the E2E tests you need to create a `env/.env.test` file that points to a working version of the marlowe runtime and a working Blockfrost instance and a faucet PK

TODO: explain how to get the Faucet PK

```
MARLOWE_WEB_SERVER_URL="http://<path-to-runtime>:33294/"
BLOCKFROST_PROJECT_ID="<blockfrost-id>"
BLOCKFROST_URL="https://cardano-preprod.blockfrost.io/api/v0"
NETWORK_ID=Preprod
BANK_PK_HEX='<pk>'
```
329 changes: 329 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

34 changes: 34 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# flake.nix template from the STD Library
{
description = "Marlowe ts-sdk";

inputs = {
std.url = "github:divnix/std";
nixpkgs.follows = "std/nixpkgs";
std.inputs.devshell.url = "github:numtide/devshell";
};

outputs = { std, self, ...} @ inputs: std.growOn {
inherit inputs;
# 1. Each folder inside `cellsFrom` becomes a "Cell"
# Run for example: 'mkdir nix/mycell'
# 2. Each <block>.nix or <block>/default.nix within it becomes a "Cell Block"
# Run for example: '$EDITOR nix/mycell/packages.nix' - see example content below
cellsFrom = ./nix;
# 3. Only blocks with these names [here: "packages" & "shells"] are picked up by Standard
# It's a bit like the output type system of your flake project (hint: CLI & TUI!!)
cellBlocks = with std.blockTypes; [
(installables "packages" {ci.build = true;})
(devshells "shells" {ci.build = true;})
];
}
# 4. Run 'nix run github:divnix/std'
# 'growOn' ... Soil:
# - here, compat for the Nix CLI
# - but can use anything that produces flake outputs (e.g. flake-parts or flake-utils)
# 5. Run: nix run .
{
devShells = std.harvest self ["ts-sdk" "shells"];
packages = std.harvest self ["ts-sdk" "packages"];
};
}
4 changes: 4 additions & 0 deletions nix/ts-sdk/packages.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{inputs, cell}: {
inherit (inputs.nixpkgs) hello;
default = cell.packages.hello;
}
Loading

0 comments on commit 9c8a09b

Please sign in to comment.