Giter Club home page Giter Club logo

Comments (11)

dustinlyons avatar dustinlyons commented on May 3, 2024 2

Someone released a patch to fix the issue, there is now an open PR: NixOS/nixpkgs#267751

from nixos-config.

dustinlyons avatar dustinlyons commented on May 3, 2024 1

When I reproduced it locally, the log output showed docker as the last derivation in the call stack. Usually it will show you the broken package at build time.

For tree of dependencies. you can play around with nix-tree.

$ nix shell nixpkgs#nix-tree
$ cd nixos-config && nix-tree

from nixos-config.

dustinlyons avatar dustinlyons commented on May 3, 2024

Can you export your current environment and share the result?

$ env

from nixos-config.

ignatiusm avatar ignatiusm commented on May 3, 2024

Sure (thanks for a speedy reply! 🚀 )

TERM_PROGRAM=Apple_Terminal
SHELL=/bin/zsh
TERM=xterm-256color
TMPDIR=/var/folders/dc/cnzrbwx50_1cpdmxz839vmg00000gn/T/
TERM_PROGRAM_VERSION=452
TERM_SESSION_ID=85D518F6-96F9-4D08-B771-54C1A1F1B752
USER=iggy
SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.zytT31kHRe/Listeners
PATH=/Users/iggy/.nix-profile/bin:/nix/var/nix/profiles/default/bin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin
LaunchInstanceID=22FE9B71-CEF3-4A7E-9F56-5D06035F31F3
__CFBundleIdentifier=com.apple.Terminal
PWD=/Users/iggy/nixos-config
XPC_FLAGS=0x0
XPC_SERVICE_NAME=0
SHLVL=1
HOME=/Users/iggy
LOGNAME=iggy
SECURITYSESSIONID=186b4
OLDPWD=/Users/iggy/nixos-config
NIX_PROFILES=/nix/var/nix/profiles/default /Users/iggy/.nix-profile
NIX_SSL_CERT_FILE=/nix/var/nix/profiles/default/etc/ssl/certs/ca-bundle.crt
LANG=en_NZ.UTF-8
_=/usr/bin/env

from nixos-config.

ignatiusm avatar ignatiusm commented on May 3, 2024

@dustinlyons - I tried again with nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-23.05-darwin"; in the inputs block of flake.nix and it got past that error!! 🎉

Currently in the "Switching to new generation" and installing phases.

I see you use your own fork of nixpkgs. How does my somewhat hacky fix fit in with that pattern?

Again, thank you very much for all the hard work you've put into making your config easily sharable 🙇

from nixos-config.

dustinlyons avatar dustinlyons commented on May 3, 2024

@ignatiusm That's great to hear! My fork provides a few options:

  • It brings in this package that displays a font in polybar on NixOS
  • It adds a timeout setting for Emacs

So you'll be fine if you're sticking with Mac.

In re: to your error, I was able to reproduce it! So that's actually great. When I try to run bin/build I now get the same thing. I only got the error after updating my flake locally to the latest nixpkgs. So previous flake inputs worked, latest flake inputs don't.

This is a good introduction to Nix. This will happen from time to time; you'll update your dependencies and the build will break. But the amazing thing about nixpkgs is someone is likely already on it! A patch is probably likely already in the works, the community is fast; all you have to do is wait, run nix flake update, and build again.

nixpkgs is amazing because it's like this massive community all patching software together :)

So, here's my general process when I update the flake and it doesn't build:

  1. Go to nixpkgs Github Issues and search for the error. If nothing is there, I may submit one
  2. If I don't need to update right away, I'll usually just stop and wait a few days
  3. If I do need to update, I'll try to figure out what package is broken and drop a 6-7 line patch in my overlays/ dir that locks the bad package to a previous working commit hash.
  4. Or if I can't be bothered to do that, I'll just remove whatever is broken (if I can) with a comment that I should add it back later.

This is great because think about the past, when you get strange errors building dependencies: you're usually on your own. Here, we lean on the community of nixpkgs.

from nixos-config.

dustinlyons avatar dustinlyons commented on May 3, 2024

I recently added CI to this repository; I need to do the same for nixpkgs so that my fork doesn't update unless the template build passes. And need to procur a Mac Mini to run aarch64-darwin. On the list :)

from nixos-config.

dustinlyons avatar dustinlyons commented on May 3, 2024

Looks like it's the docker package failing to build. I commented out the lines docker and docker-compose in shared/packages.nix and it builds.

from nixos-config.

dustinlyons avatar dustinlyons commented on May 3, 2024

Also, the reason nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-23.05-darwin" works for you is because whatever bug this is hasn't hit that input yet. My nixpkgs fork grabs the latest commit hash.

from nixos-config.

dustinlyons avatar dustinlyons commented on May 3, 2024

I went ahead and submitted an issue for this: NixOS/nixpkgs#267685 and disabled docker in the configuration for now.

from nixos-config.

ignatiusm avatar ignatiusm commented on May 3, 2024

Thank you for your super informative and welcoming response!! I'm very grateful for your help and encouragement.

One question: how did you narrow it down to docker that was broken? It wasn't listed in the log snippet above as one of the pkgs that had glibc as a dependency. Is there a command to see the tree of dependencies?

from nixos-config.

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.