Git Product home page Git Product logo

Comments (4)

Patryk27 avatar Patryk27 commented on June 8, 2024

Could you try passing gitSubmodules = true; to buildPackage? 👀

from naersk.

molysgaard avatar molysgaard commented on June 8, 2024

I think I am already doing it. Check the example repository?

from naersk.

Patryk27 avatar Patryk27 commented on June 8, 2024

Ah, right - I didn't see that on the phone 😅

So, in this case you're actually hitting a limitation of Nix:
NixOS/nix#6633
... where doing src = ./.; causes Nix to present the source directory to Naersk without the submodules.

This can be worked around by doing:

defaultPackage = naersk-lib.buildPackage {
  src = self; # voilà
};

... committing all the changes (so that you have a clean Git tree, it's important) and then running:

nix build '.?submodules=1'

I think there's nothing Naersk could do on its side to overcome this issue, since we just read the src directory Nix prepares and there's no way to tell Nix to force-initialize-submodules from within Nix code.

Fortunately, there's a pull request to improve this:
NixOS/nix#7862

from naersk.

molysgaard avatar molysgaard commented on June 8, 2024

I was able to get around this by removing the submodule and instead using cargo to fetch the dependency for me. Thanks for looking into this!

from naersk.

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.