Comments (4)
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.drv
s and on outputsnix why-depends
, also works both on.drv
s 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.
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.
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.
I'll assume you've resolved the problem. If not, feel free to reopen or comment.
from arion.
Related Issues (20)
- Default network is created several time HOT 15
- `arion up` fails with example from documentation HOT 3
- Enhancement idea: lockfile HOT 2
- Version documentation
- How to pull latest module when using in a flake HOT 1
- Cannot create container for service service-name: container create: no command or entrypoint provided, and no CMD or ENTRYPOINT from image HOT 1
- Current documentation doesn't seem to work, gives error "project.name" is used but not defined.
- How to use a nix-managed docker image in arion HOT 5
- v2.0.0 fails to compile
- Minimal example not working HOT 9
- Problem with easyOverlay: HTTP error 422 HOT 1
- easyOverlay: stdenv missing HOT 6
- Add support for volumes to mount host paths
- how to specify number of containers to deploy (aka `--scale` / `--replicas`)?
- Add `flake-parts` module HOT 6
- Can Arion be run inside a derivation? HOT 3
- Using sops with arion-compose HOT 1
- how to integrate an arion-compose.nix into an existing nix system declaratively HOT 4
- Restarting arion appears to cause some docker compose related networking error HOT 5
- I had to force set hostName to get httpd to work HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from arion.