Comments (7)
@573 you need to run the bootstrap first.
go run ./bootstrap/
from elsa.
With
# default.nix
{ stdenv, fetchFromGitHub, buildGoModule, go, go-bindata, go-bindata-assetfs }:
buildGoModule rec {
pname = "elsa";
version = "master";
revision = "0375d76d2c802b497cec44e5069920643287cc98";
goPackagePath = "github.com/elsaland/elsa";
nativeBuildInputs = [ go go-bindata go-bindata-assetfs ];
buildPhase = ''
runHook preBuild
# use make instead of go build
runHook postBuild
'';
installPhase = ''
runHook preInstall
make build
runHook postInstall
'';
src = fetchFromGitHub {
owner = "elsaland";
repo = "elsa";
rev = revision;
sha256 = "0ny2fsj7r05711d7k3xpl35k4pz86y2vnrk4bqqrdb5xqlh1i7aq";
};
doCheck = false;
vendorSha256 = "1n3yj3p5nikbr5fwk44rpjk3wvay015k0gvl6pwdyx0yvpazrl4p";
subPackages = [ "." ];
meta = with stdenv.lib; {
maintainer = with maintainers; [ ];
license = licenses.mit;
description = "Elsa is a minimal, fast and secure runtime for Javascript and Typescript written in Go";
};
}
(go run ./bootstrap
according to Makefile) I (still) get:
@nix { "action": "setPhase", "phase": "unpackPhase" }
unpacking sources
unpacking source archive /nix/store/a5bg5xqns8lzal9a6f04sdc9d1pr1vjp-source
source root is source
@nix { "action": "setPhase", "phase": "patchPhase" }
patching sources
@nix { "action": "setPhase", "phase": "configurePhase" }
configuring
@nix { "action": "setPhase", "phase": "buildPhase" }
building
@nix { "action": "setPhase", "phase": "installPhase" }
installing
go run ./bootstrap
2020/09/30 08:37:51 Bundling 00_core.js
2020/09/30 08:37:51 Bundling 01_namespace.js
2020/09/30 08:37:51 Bundling 02_console.js
2020/09/30 08:37:51 Bundling 03_fetch.js
2020/09/30 08:37:51 Bundling 04_event.js
2020/09/30 08:37:51 Bundling 05_compiler.js
2020/09/30 08:37:51 Bundling 10_window.js
2020/09/30 08:37:51 Running command and waiting for it to finish...
2020/09/30 08:37:51 Command finished with error: exit status 1
go build -o elsa .
# github.com/elsaland/elsa/core
core/run.go:37:13: undefined: Asset
make: *** [Makefile:3: build] Error 2
from elsa.
Hmm looks like it is not perisisting the assets.go created by bootstrap at building. Can you try building on NixOS manually (make build) ?
I don't have much insight into how Nix works but I think building Elsa should be possible.
from elsa.
@littledivy is it related to the 2020/09/30 08:37:51 Command finished with error: exit status 1
line maybe ?
EDIT: I added a find command to have assets.go's location printed directly after go run ./bootstrap
:
{ stdenv, fetchFromGitHub, buildGoModule, go, go-bindata, go-bindata-assetfs, go2nix }:
buildGoModule rec {
pname = "elsa";
version = "master";
revision = "0375d76d2c802b497cec44e5069920643287cc98";
goPackagePath = "github.com/elsaland/elsa";
nativeBuildInputs = [ go go-bindata go-bindata-assetfs go2nix ];
buildPhase = ''
runHook preBuild
# run go run ./bootstrap manually
go run ./bootstrap
find . -path '*target' -print
find . -path '*assets.go' -print
# use make instead of go build
runHook postBuild
'';
installPhase = ''
runHook preInstall
make
runHook postInstall
'';
src = fetchFromGitHub {
owner = "elsaland";
repo = "elsa";
rev = revision;
sha256 = "0ny2fsj7r05711d7k3xpl35k4pz86y2vnrk4bqqrdb5xqlh1i7aq";
};
doCheck = false;
vendorSha256 = "1n3yj3p5nikbr5fwk44rpjk3wvay015k0gvl6pwdyx0yvpazrl4p";
subPackages = [ "." ];
meta = with stdenv.lib; {
maintainer = with maintainers; [ ];
license = licenses.mit;
description = "Elsa is a minimal, fast and secure runtime for Javascript and Typescript written in Go";
};
}
Still no assets.go
.
from elsa.
@573 I might've figured out the issue. Can you mkdir target
. I think the bootstrap fails as it cannot create the path by itself.
from elsa.
@littledivy when I add find . -path '*target' -print
to the build clauses as in the edited comment above, I get:
these derivations will be built:
/nix/store/2bdw9cjkb89r51bkwqdanc9zzvngqlcp-elsa-master.drv
building '/nix/store/2bdw9cjkb89r51bkwqdanc9zzvngqlcp-elsa-master.drv'...
unpacking sources
unpacking source archive /nix/store/a5bg5xqns8lzal9a6f04sdc9d1pr1vjp-source
source root is source
patching sources
configuring
building
2020/09/30 11:56:16 Bundling 00_core.js
2020/09/30 11:56:16 Bundling 01_namespace.js
2020/09/30 11:56:16 Bundling 02_console.js
2020/09/30 11:56:16 Bundling 03_fetch.js
2020/09/30 11:56:16 Bundling 04_event.js
2020/09/30 11:56:16 Bundling 05_compiler.js
2020/09/30 11:56:16 Bundling 10_window.js
2020/09/30 11:56:16 Running command and waiting for it to finish...
2020/09/30 11:56:16 Command finished with error: exit status 1
./target
...
the target folder seems to be there already.
from elsa.
Alright, another reason could be go-bindata not being avaliable in your $GOSRC
go get github.com/go-bindata/go-bindata
PS: it needs to be retrieved via go get
from elsa.
Related Issues (20)
- add repl
- Project revival and long-term goals HOT 3
- split standard library and runtime
- bundle tests should not use remote URLs
- Enforce deepsource code quality standards
- GO interop HOT 1
- qjs import err
- there is already an open source project called Elsa HOT 1
- Downloadable binary anywhere HOT 1
- Can I interact with a JS script while it is running?
- Http server
- feat(dev): stabilize typechecking in development mode
- feat(fmt/colors) HOT 1
- Elsa functions don't throw exceptions for errors
- Elsa.stats should be named Elsa.stat
- Ineffectual sync.WaitGroup in ops.Serve HOT 1
- Mandate lint and fmt in CI HOT 8
- Update QuickJS to 2020-09-06 release HOT 2
- Add tests to `testing/` and `std/` with Elsa.tests HOT 2
- Support shebang HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from elsa.