Comments (5)
Even with the fork I can't get it to work, since Judge uses declare-binscript
.
from janet-nix.
Hey @giodamelio apologies for the late response, only just saw this. I actually ran into this same issue when trying to build with Judge recently, I'll take a look see what options are available
from janet-nix.
No worries at all. I am pretty new to Nix and brand new to Janet, so thanks for providing this project to hack on.
from janet-nix.
Thanks for the quick update! I will give it a shot this weekend.
from janet-nix.
I've added a new attribute extraDeps
to pass dependencies directly to mkJanet
, so it's possible to generate the sources in advance:
~/repos/judge $ jpm make-lockfile && nix run github:turnerdev/janet-nix
...
[
{ url = "https://github.com/ianthehenry/cmd"; rev = "7551225818a8a5f6665a918f1862db0c7704a1f4"; submodules = true; }
]
Unfortunately I still run into issues trying to build a working derivation for Judge. I got close with this:
{
judge = janet-nix.packages.${system}.mkJanet {
name = "judge";
src = builtins.fetchGit {
url = "https://github.com/ianthehenry/judge";
rev = "c2a7eadf6cbf9ffad6f880c2ddbdbc03009a655f";
};
extraDeps = [{
url = "https://github.com/ianthehenry/cmd";
rev = "7551225818a8a5f6665a918f1862db0c7704a1f4";
}];
main = ''
(import cmd)
(import judge/runner)
(defn main [& args]
(put root-env :syspath (string (os/getenv "JANET_TREE") "/lib"))
(setdyn *executable* "")
(setdyn *args* (drop 1 (dyn *args*)))
(cmd/main runner/main)
(main))
'';
};
}
But it seems declare-binscript
output expects to be interpreted as a script rather than run as a standalone binary. Passing a modified version of src/judge
to the new main
attribute gets it to build and run, but it still has issues.
After giving it more thought, it probably makes sense to just install Judge into the local environment via jpm install
, since the tests (use judge)
anyway. For an example see https://github.com/turnerdev/janet-nix/blob/main/templates/full/flake.nix#L71-L76
Thanks again for the feedback!
from janet-nix.
Related Issues (1)
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 janet-nix.