I am trying to build GitHub - pcarrier/forms locally.
I am unable to find any Nim language setup related info on the wiki, and I am not able to use nimble2nix because i don’t understand Nim very well. I just want a local build to hack on non-nim portions of the repository.
I was told that the only packages required were
- nim 2.0
- emscripten
- nimble
So I created a shell.nix
as follows, so I can run nimble build
in the resulting shell:
with import <nixpkgs> {};
let unstable = import <nixos-unstable> {}; in
stdenv.mkDerivation {
name = "forms-build-env";
buildInputs = [
unstable.nim2
emscripten
unstable.nim2Packages.nimble
];
}
But I am getting the folowing error. How do I make this work correctly?
$ nix-shell
this derivation will be built:
/nix/store/05vl97v9di8z233hk6gmz2am1yb3yfbi-nimble-0.14.2.drv
building '/nix/store/05vl97v9di8z233hk6gmz2am1yb3yfbi-nimble-0.14.2.drv'...
unpacking sources
unpacking source archive /nix/store/zygf3797sc4d7r4axhzkkc32q90r74y1-source
source root is source
patching sources
updateAutotoolsGnuConfigScriptsPhase
configuring
generating config.nims
building
build job 0: nim compile --parallelBuild:16 --outdir:/nix/store/l0xqfcqlas93hlrgmzplyd6d76iq2ga0-nimble-0.14.2/bin src/nimble
Hint: used config file '/nix/store/ac60hq0pn6lrhn81ziymw1kv5iyqnfdm-x86_64-unknown-linux-gnu-nim-wrapper-2.0.0/etc/nim/nim.cfg' [Conf]
Hint: used config file '/nix/store/ac60hq0pn6lrhn81ziymw1kv5iyqnfdm-x86_64-unknown-linux-gnu-nim-wrapper-2.0.0/etc/nim/config.nims' [Conf]
Hint: used config file '/build/source/config.nims' [Conf]
Hint: used config file 'src/nimble.nim.cfg' [Conf]
...................................................................................................................................................
/build/source/src/nimblepkg/sha1hashes.nim(4, 38) Warning: use command `nimble install checksums` and import `checksums/sha1` instead; sha1 is deprecated [Deprecated]
.........................................
/build/source/src/nimblepkg/options.nim(255, 14) Warning: Couldn't determine GIT hash: /bin/sh: git: not found [User]
...........
/nix/store/wpqbx4vy29ln44i5y0hj2i0b1zk77jwb-nim-unwrapped-2.0.0/nim/compiler/nimblecmd.nim(18, 39) Error: cannot open file: ../dist/checksums/src/checksums/sha1
build phase failed
error: builder for '/nix/store/05vl97v9di8z233hk6gmz2am1yb3yfbi-nimble-0.14.2.drv' failed with exit code 1;
last 10 log lines:
> Hint: used config file '/nix/store/ac60hq0pn6lrhn81ziymw1kv5iyqnfdm-x86_64-unknown-linux-gnu-nim-wrapper-2.0.0/etc/nim/config.nims' [Conf]
> Hint: used config file '/build/source/config.nims' [Conf]
> Hint: used config file 'src/nimble.nim.cfg' [Conf]
> ...................................................................................................................................................
> /build/source/src/nimblepkg/sha1hashes.nim(4, 38) Warning: use command `nimble install checksums` and import `checksums/sha1` instead; sha1 is deprecated [Deprecated]
> .........................................
> /build/source/src/nimblepkg/options.nim(255, 14) Warning: Couldn't determine GIT hash: /bin/sh: git: not found [User]
> ...........
> /nix/store/wpqbx4vy29ln44i5y0hj2i0b1zk77jwb-nim-unwrapped-2.0.0/nim/compiler/nimblecmd.nim(18, 39) Error: cannot open file: ../dist/checksums/src/checksums/sha1
> build phase failed
For full logs, run 'nix log /nix/store/05vl97v9di8z233hk6gmz2am1yb3yfbi-nimble-0.14.2.drv'.