Git Product home page Git Product logo

Comments (5)

robert-cronin avatar robert-cronin commented on August 24, 2024

So the following command that works well on windows:

grpc_tools_node_protoc --plugin=protoc-gen-grpc=grpc_node_plugin --js_out=import_style=commonjs,binary:./proto/compiled --ts_out=./proto/compiled --grpc_out=./proto/compiled -I ./proto ./proto/*.proto

fails on nixos with ENOENT when trying to call <rootDir>/node_modules/grpc-tools/bin/protoc

from polykey.

robert-cronin avatar robert-cronin commented on August 24, 2024

I have been trying to build grpc-tools binaries directly from grpc-node/packages/grpc-tools but I am getting an error of /nix/store/hrkc2sf2883l16d5yq3zg0y339kfw4xv-binutils-2.31.1/bin/ld: cannot find -lgcc

from polykey.

CMCDragonkai avatar CMCDragonkai commented on August 24, 2024

It turns that this https://github.com/grpc/grpc-node/tree/master/packages/grpc-tools package is just a JS shim around a native compiled C++ set of executables.

In fact it doesn't event really use node-pre-gyp, since that would require a binding.gyp file to exist.

To actually package up https://github.com/grpc/grpc-node/tree/master/packages/grpc-tools we will need to write a C++ Nix derivation properly based on their CMake instructions and package that up, and then build a custom Nix expression for the package that actually needs to do a source patch on package.json. In particular it needs to change the scripts:

  "scripts": {
    "install": "node-pre-gyp install",
    "prepublishOnly": "git submodule update --init --recursive && node copy_well_known_protos.js"
  },

So it only acquires it from a pre-existing executable.

But this is not really necessary for now, it's low priority since we can use protoc from windows.

from polykey.

CMCDragonkai avatar CMCDragonkai commented on August 24, 2024

Posted an upstream issue: NixOS/nixpkgs#93173

from polykey.

robert-cronin avatar robert-cronin commented on August 24, 2024

Closing on account of migration to gitlab

from polykey.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.