Giter Club home page Giter Club logo

Comments (4)

roberth avatar roberth commented on June 4, 2024

It seems like the gtk+ etc dependencies are pulled in by the Java JDK.
A difference in the choice of JDK maybe be introduced by "impure" config files like ~/.config/nixpkgs/config.nix.

To better understand what's going on, some tools to understand what's produced by evaluation

  • nix-diff the find differences. Works both on .drvs and on outputs
  • nix why-depends, also works both on .drvs and on outputs

For evaluation itself, what helps is running with NIX_PATH unset and NIXPKGS_CONFIG=/dev/null if you want to use pinned nixpkgs exclusively. I don't have a trick for breaking impure overlays, so just make sure you call Nixpkgs with all arguments: system, overlays, config.

If this doesn't help with finding the problem, please add a pinned nixpkgs to the issue description.

from arion.

chrissound avatar chrissound commented on June 4, 2024

Thanks for the pointers, sounds like it isn't directly an issue with arion itself then. I'm a bit unsure as to how I would debug this though. So feel free to ignore if it's not relevant.

However my attempt in particular:

I've tried to:

nix-instantiate arion-compose.nix
nix-instantiate -v arion-compose.nix
evaluating file '/nix/store/nc9rnnh6nza1jpq1q24qgm7g0as32m27-nix-2.3.2/share/nix/corepkgs/derivation.nix'

Not sure why this is returning no output?

If I do get the path to the drv, what would I compare it to (using nix-diff)?

Trying with NIX_PATH unset etc:

unset NIX_PATH; export NIXPKGS_CONFIG=/dev/null; arion up 
error: attribute 'nixpkgs' in selection path 'nixpkgs.netcat' not found
printc:2: permission denied: 
error: file 'nixpkgs' was not found in the Nix search path (add it using $NIX_PATH or -I), at /home/chris/NewProjects/arianInflux/arion-pkgs.nix:2:19
(use '--show-trace' to show detailed location information)

Hmmm actually that make sense as I'm using the follow to attempt to pin the nixpkgs (which itself references <nixpkgs>:

cat arion-pkgs.nix 
let 
  inherit (import <nixpkgs> {}) fetchFromGitHub;
  nixpkgs = fetchFromGitHub {
    owner  = "NixOS";
    repo   = "nixpkgs-channels";
    rev    = "c2c5dcc00b05f0f6007d7a997dc9d90aefb49f28";
    sha256 = "1sjy9b1jh7k4bhww42zyjjim4c1nn8r4fdbqmyqy4hjyfrh9z6jc";
  };
in
import nixpkgs { system = "x86_64-linux"; }

from arion.

roberth avatar roberth commented on June 4, 2024

The solution may be to use pkgs.openjdk_headless instead of pkgs.openjdk. You can probably achieve this with an overlay self: super: { jdk = super.openjdk_headless; }. Whether it works depends on the exact JDK dependency: it may depend on a Nixpkgs attribute more specific than jdk.

You can build the docker compose file with nix-build using an expression like this

let pkgs = import ./arion-pkgs.nix; inherit (import arionSource { inherit pkgs; }) arion; in arion.build { modules = [ ./arion-compose.nix ]; uid = "1000"; inherit pkgs; }  

Then nix-instantiate the expression and use it in nix why-depends together with the offending drv path. This should give you a clue as to why various packages are pulled in.

nix-diff

I think this is only relevant if something has changed and you want to figure out why. Let's ignore this for now.

Trying with NIX_PATH unset etc:

Ah yes, that only works if you're using builtin fetchers for the pin, like builtins.fetchTarball "https://github.com/NixOS/nixpkgs-channels/archive/${rev}.tar.gz".
It then allows you to find accidental uses of NIX_PATH, but I don't think we need to dive deeper into this.

Not sure why this is returning no output?

An arion-compose file is not buildable by nix-build, just like a NixOS configuration isn't buildable. It's unfortunate that it doesn't explain why. Your arion-compose file is an attribute set that has one attribute that nix-instantiate (or nix-build) looks at; sees that it isn't a derivation; sees that it doesn't have recurseIntoAttrs and then it completes its traversal of the Nix value in the file without having produced any output.

from arion.

roberth avatar roberth commented on June 4, 2024

I'll assume you've resolved the problem. If not, feel free to reopen or comment.

from arion.

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.