I would like to add a nix build to add elsa to nixpkgs.
Currently the build is stuck
# default.nix; usage: nix-build --pure -E 'let pkgs = import <nixpkgs> {}; in pkgs.callPackage ./. {}'
{ stdenv, fetchFromGitHub, buildGoModule, go-bindata, go-bindata-assetfs }:
buildGoModule rec {
pname = "elsa";
version = "master";
revision = "0375d76d2c802b497cec44e5069920643287cc98";
goPackagePath = "github.com/elsaland/elsa";
nativeBuildInputs = [ go-bindata go-bindata-assetfs ];
preBuild = ''
# https://github.com/elsaland/elsa/blob/5419ed2/Makefile#L2
go generate;
go run ./bootstrap/;
# go build -o elsa .
'';
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";
};
}
@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
2020/09/30 08:10:43 Bundling 00_core.js
2020/09/30 08:10:43 Bundling 01_namespace.js
2020/09/30 08:10:43 Bundling 02_console.js
2020/09/30 08:10:43 Bundling 03_fetch.js
2020/09/30 08:10:43 Bundling 04_event.js
2020/09/30 08:10:43 Bundling 05_compiler.js
2020/09/30 08:10:43 Bundling 10_window.js
2020/09/30 08:10:43 Running command and waiting for it to finish...
2020/09/30 08:10:43 Command finished with error: exit status 1
Building subPackage ./.
github.com/asaskevich/govalidator
github.com/go-bindata/go-bindata
github.com/elsaland/elsa/packager
github.com/spf13/pflag
github.com/spf13/cobra
github.com/elsaland/elsa/cmd
github.com/elsaland/quickjs
github.com/imroc/req
github.com/spf13/afero/mem
golang.org/x/text/transform
golang.org/x/text/unicode/norm
github.com/spf13/afero
github.com/elsaland/elsa/core/ops
golang.org/x/sys/internal/unsafeheader
golang.org/x/sys/unix
github.com/mattn/go-isatty
github.com/mattn/go-colorable
github.com/fatih/color
github.com/logrusorgru/aurora
github.com/elsaland/elsa/core
# github.com/elsaland/elsa/core
core/run.go:37:13: undefined: Asset
github.com/evanw/esbuild/internal/compat
github.com/evanw/esbuild/internal/logger
github.com/evanw/esbuild/internal/js_ast
github.com/evanw/esbuild/internal/config
github.com/evanw/esbuild/internal/fs
github.com/evanw/esbuild/internal/js_lexer
github.com/evanw/esbuild/internal/renamer
github.com/evanw/esbuild/internal/runtime
github.com/evanw/esbuild/internal/sourcemap
github.com/evanw/esbuild/internal/js_parser
github.com/evanw/esbuild/internal/js_printer
github.com/evanw/esbuild/internal/resolver
github.com/evanw/esbuild/internal/bundler
github.com/evanw/esbuild/pkg/api