fix for the readme cli build test
This commit is contained in:
@@ -911,6 +911,34 @@ Related options:
|
|||||||
: _Default:_ `[ "--allow-scripts" "--frozen" "--cached-only" ]` for `buildDenoPackage`
|
: _Default:_ `[ "--allow-scripts" "--frozen" "--cached-only" ]` for `buildDenoPackage`
|
||||||
: _Default:_ `[ "--allow-scripts" "--frozen" ]` for `buildDenoDeps` (`"--cached-only"` is filtered out)
|
: _Default:_ `[ "--allow-scripts" "--frozen" ]` for `buildDenoDeps` (`"--cached-only"` is filtered out)
|
||||||
|
|
||||||
|
::: {.tip}
|
||||||
|
If you receive and error like this:
|
||||||
|
|
||||||
|
```
|
||||||
|
error: The lockfile is out of date. Run `deno install --frozen=false`, or rerun with `--frozen=false` to update it.
|
||||||
|
```
|
||||||
|
|
||||||
|
This can happen due to the `deno install` command deducing different packages, than what the actual package needs.
|
||||||
|
|
||||||
|
To fix this, add the entrypoint to the install flags:
|
||||||
|
|
||||||
|
```nix
|
||||||
|
{ buildDenoPackage, nix-gitignore }:
|
||||||
|
buildDenoPackage {
|
||||||
|
pname = "myPackage";
|
||||||
|
version = "0.1.0";
|
||||||
|
denoDepsHash = "sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA";
|
||||||
|
src = nix-gitignore.gitignoreSource [ ] ./.;
|
||||||
|
binaryEntrypointPath = "main.ts";
|
||||||
|
denoInstallFlags = [
|
||||||
|
"--entrypoint"
|
||||||
|
"<path/to/entrypoint/script>"
|
||||||
|
];
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
:::
|
||||||
|
|
||||||
#### Private registries {#javascript-buildDenoPackage-private-registries}
|
#### Private registries {#javascript-buildDenoPackage-private-registries}
|
||||||
There are currently 2 options, which enable the use of private registries in a `buildDenoPackage` derivation.
|
There are currently 2 options, which enable the use of private registries in a `buildDenoPackage` derivation.
|
||||||
|
|
||||||
|
|||||||
@@ -3,13 +3,17 @@
|
|||||||
readma-cli-linux = buildDenoPackage rec {
|
readma-cli-linux = buildDenoPackage rec {
|
||||||
pname = "readma-cli";
|
pname = "readma-cli";
|
||||||
version = "2.11.0";
|
version = "2.11.0";
|
||||||
denoDepsHash = "sha256-uh+yaT8oPMD0FRENH4LaoCsvbWmQ0j+xPbAL3e4Mfws=";
|
denoDepsHash = "sha256-xh+kP3yZvqzVXqypS3YFsIBmU/bp4YiNxvpK3/KlxAA=";
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "elcoosp";
|
owner = "elcoosp";
|
||||||
repo = "readma";
|
repo = "readma";
|
||||||
rev = "${version}";
|
rev = "${version}";
|
||||||
hash = "sha256-FVQTn+r7Ztj02vNvqFZIRIsokWeo1tPfFYffK2tvxjA=";
|
hash = "sha256-FVQTn+r7Ztj02vNvqFZIRIsokWeo1tPfFYffK2tvxjA=";
|
||||||
};
|
};
|
||||||
|
denoInstallFlags = [
|
||||||
|
"--entrypoint"
|
||||||
|
"./cli/mod.ts"
|
||||||
|
];
|
||||||
binaryEntrypointPath = "./cli/mod.ts";
|
binaryEntrypointPath = "./cli/mod.ts";
|
||||||
targetSystem = "x86_64-linux";
|
targetSystem = "x86_64-linux";
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user