1# Derivation which provides `protoc-gen-purescript` on the PATH.
3# To try it out, `nix-shell ./nix/demo.nix`, then
5# protoc --purescript_out=path_to_output file.proto
7{ pkgs ? import ./nix/pkgs.nix {} }:
10 node2NixFiles = srcPath:
11 pkgs.stdenv.mkDerivation {
12 name = "node2NixFiles";
13 nativeBuildInputs = with pkgs; [ nodejs node2nix.package ];
16 cp $src/package.json $src/package-lock.json .
19 node2nix -l package-lock.json
23 cp node-env.nix node-packages.nix default.nix $out/
24 cp package.json package-lock.json $out/
28 protobufNixNode = import (node2NixFiles ./.) { inherit pkgs; };
29 spagoPkgs = import ./nix/spago-packages.nix { inherit pkgs; };
32pkgs.stdenv.mkDerivation {
33 name = "purescript-protobuf-generator";
35 spagoPkgs.installSpagoStyle
36 spagoPkgs.buildSpagoStyle
38 nativeBuildInputs = with pkgs; [
45 cp $src/packages.dhall .
48 cp -r ${protobufNixNode.nodeDependencies}/lib/node_modules .
52 build-spago-style "./src/**/*.purs" "./plugin/**/*.purs"
57 cp -r node_modules $out/
58 echo "node -e \"require('$out/output/ProtocPlugin.Main/index.js').main()\"" >> $out/bin/protoc-gen-purescript
59 chmod +x $out/bin/protoc-gen-purescript
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list