Giter Club home page Giter Club logo

Comments (3)

gcurtis avatar gcurtis commented on May 27, 2024 1

Thanks for the thorough bug report. I'll take a look at this today.

from devbox.

gcurtis avatar gcurtis commented on May 27, 2024

@savil it looks like we're dropping the out output from curl when it's specified as a flake reference. I think this might be a regression after some of the recent lock file changes.

Here's what I see happening with the Devbox nix profile using the devbox.json from the issue (logs snipped to only include relevant messages).

Enter a shell, see that only ruby and curl^dev are installed to the profile (curl^out is missing).

$ devbox version -v
Version:     0.0.0-dev
Platform:    linux_arm64
Commit:      0662f451222fe3195127f6376d49a8a7239192d3
Go Version:  go1.22.0
$ devbox shell
2024/02/27 16:49:15 running command: /run/current-system/sw/bin/nix profile install --profile /home/gcurtis/devbox/nixosvm/issue1852/.devbox/nix/profile/default --impure --priority 6 --extra-experimental-features ca-derivations --option experimental-features nix-command flakes fetch-closure --offline /nix/store/0dqds3mklwg3jygw6gwi7dknag2q7fik-ruby-3.3.0
2024/02/27 16:49:15 running command: /run/current-system/sw/bin/nix profile install --profile /home/gcurtis/devbox/nixosvm/issue1852/.devbox/nix/profile/default --impure --priority 7 --extra-experimental-features ca-derivations --option experimental-features nix-command flakes fetch-closure --offline /nix/store/47wjvvb6smgy33p75xnr6liif4xrrl9z-curl-8.6.0-dev

See that the curl libraries are missing from the profile's lib directory.

(devbox) $ ls .devbox/nix/profile/default/lib
libruby-3.3.0.so  libruby-3.3.0.so.3.3	libruby-3.3.0.so.3.3.0	pkgconfig  ruby

See that only curl^dev is installed to the profile.

(devbox) $ nix profile list --profile .devbox/nix/profile/default
Index:              0
Store paths:        /nix/store/0dqds3mklwg3jygw6gwi7dknag2q7fik-ruby-3.3.0

Index:              1
Store paths:        /nix/store/47wjvvb6smgy33p75xnr6liif4xrrl9z-curl-8.6.0-dev

Manually add nixpkgs#curl^out,dev to the profile and see that libcurl appears in the profile's lib directory.

(devbox) $ nix profile install --profile .devbox/nix/profile/default nixpkgs#curl^out,dev
(devbox) $ nix profile list --profile .devbox/nix/profile/default
Index:              0
Store paths:        /nix/store/0dqds3mklwg3jygw6gwi7dknag2q7fik-ruby-3.3.0

Index:              1
Store paths:        /nix/store/47wjvvb6smgy33p75xnr6liif4xrrl9z-curl-8.6.0-dev

Index:              2
Flake attribute:    legacyPackages.aarch64-linux.curl^dev,out
Original flake URL: flake:nixpkgs
Locked flake URL:   github:NixOS/nixpkgs/8520c158aee718c6e87b56881105fc4223c3c723
Store paths:        /nix/store/47wjvvb6smgy33p75xnr6liif4xrrl9z-curl-8.6.0-dev /nix/store/ilzq62jr6sj7p2vlq0sjsmg1264w1vgf-curl-8.6.0
(devbox) $ ls .devbox/nix/profile/default/lib
libcurl.la  libcurl.so	libcurl.so.4  libcurl.so.4.8.0	libruby-3.3.0.so  libruby-3.3.0.so.3.3	libruby-3.3.0.so.3.3.0	pkgconfig  ruby

Exit and re-enter the devbox shell. See that devbox removed curl^out (but not curl^dev) from the profile.

(devbox) $ exit
$ devbox shell
2024/02/27 17:01:24 Removing packages from nix profile: [email protected]

See that libcurl is missing again.

(devbox) $ ls .devbox/nix/profile/default/lib
libruby-3.3.0.so  libruby-3.3.0.so.3.3	libruby-3.3.0.so.3.3.0	pkgconfig  ruby

from devbox.

undecided avatar undecided commented on May 27, 2024

Thanks for investigating. Off the back of that, in case it's any use to anyone else, I've been able to add the following to my devbox.json as a workaround, and it seems to work nicely

  "shell": {
    "init_hook": [
      "nix profile install --profile .devbox/nix/profile/default nixpkgs#curl^out,dev --extra-experimental-features nix-command --extra-experimental-features flakes"

With that, when I do devbox shell, it's all installed correctly

❯ devbox version
0.9.1

❯ ls .devbox/nix/profile/default/lib/*curl*
.devbox/nix/profile/default/lib/libcurl.la  .devbox/nix/profile/default/lib/libcurl.so.4
.devbox/nix/profile/default/lib/libcurl.so  .devbox/nix/profile/default/lib/libcurl.so.4.8.0

from devbox.

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.