Supported Typescript workflow?
I'm trying to figure out how to build and/or run a Typescript project using dream2nix. I've created a minimal example at kylegentle/ts-dream-example, with some more context in the README; let me know if you want me to bring more of that context into the issue here.
See this PR. you don't need to use npx, as typescript exists in nixpkgs as nixpkgs.nodePackages.typescript. As for ts-node, add it as a shell hook from your built package. run nix develop .#ts-dream-example
https://github.com/kylegentle/ts-dream-example/pull/1
Any idea what might be wrong in this typescript package I'm trying to make for work: https://github.com/input-output-hk/cardano-js-sdk
what I've got so more:
{
inputs = {
dream2nix.url = "github:nix-community/dream2nix";
src.url = "github:input-output-hk/cardano-js-sdk/0.2.0";
src.flake = false;
};
outputs = {
self,
dream2nix,
src,
nixpkgs,
} @ inp: let
dream2nix = inp.dream2nix.lib2.init {
systems = ["x86_64-linux"];
config.projectRoot = ./.;
};
in
(dream2nix.makeFlakeOutputs {
source = src;
packageOverrides = {
"@cardano-sdk/cip2".add-inputs.buildInputs = with nixpkgs.legacyPackages.x86_64-linux;
self: self ++ [ nodePackages.typescript ];
};
});
}
And the error:
> Traceback (most recent call last):
> File "/nix/store/5qy9rak9s4q44z9pv46njdibs0yspy0b-fix-package.py", line 80, in <module>
> raise Exception(f"binary specified in package.json doesn't exist: {bin}")
> Exception: binary specified in package.json doesn't exist: dist/index.js