Skip to content

Instantly share code, notes, and snippets.

@adrianparvino
Created September 19, 2020 07:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adrianparvino/40cdb33e7c1f8efe567c4747de7f87f0 to your computer and use it in GitHub Desktop.
Save adrianparvino/40cdb33e7c1f8efe567c4747de7f87f0 to your computer and use it in GitHub Desktop.

Converting ClojureScript projects into Nix packages

JavaScript/NPM

Run =node2nix=[fn:node2nix] on the repo to convert JavaScript dependencies into Nix-addressable packages

Clojure

Run =clj2nix=[fn:clj2nix] on the repo to convert Clojure/Java/Maven dependencies into Nix-addressible packages

Generating a bundle

Nix needs a way to integrate both of these together. NPM has a mostly freeform build system, composing only of build artifacts and you can do fuck all. I overrode the Node component instead, because of this. I used the following code:

[fn:node2nix] https://github.com/svanderburg/node2nix or nixpkgs.node2nix [fn:clj2nix] https://github.com/hlolli/clj2nix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment