Comments (15)
ok, this is not a free support channel.
from flake-utils.
I don't think this is coming from flake-utils.
If yarn2nix uses Import-From-Derivation (IFD), it will try building the derivation it's supposed to import on the same arch where the code is evaluated. And since Flakes evaluates all the architectures, it's exposing that problem.
from flake-utils.
flake evaluates only systems+arch which is provided by flake-utils. if flake-utils can be configured via override only to one it will wokr
from flake-utils.
i have tested that. so it is mundane to support out of this repo.
read it to be akin to Rust Features or Rust targets. It has filter by specific target and featue, and has -all-targes and -all-features check
from flake-utils.
huh, you are weird. i do not need support. i said you tool can have 2 feautes and you closed both by asking me to pay. we do not need support. I have fork of this already.
crazy.
from flake-utils.
yarn2nix
is not relevant. relevant is single system nix check which is possible with flake override for single system. I did it and it worked. you cannot nix check flake with ustils without as it cross checks too much.
from flake-utils.
i reported this repor is not well plays with nix check and devops and you closed issuess with some weird response.
from flake-utils.
here is the code for thoose who will have same issue https://github.com/ComposableFi/composable/blob/nix/v1/.nix/override-input/flake-utils/flake.nix
from flake-utils.
who knows. it's either a communication or expectation issue between us. or maybe I'm just being grumpy. I don't have a lot of energy to give away when half of it is already spent trying to understand the messages.
from flake-utils.
What we want - check that nix
"""compiles""" in CI.
How? Run https://nixos.org/manual/nix/stable/command-ref/new-cli/nix3-flake-check.html
But, it tries to evaluate arm/darwin. Our CI is not that.
How to fix?
--override-input
with flake-utils from template which does only on ${system} in list.
What it gets?
You can compile whole nix and ensure it is typed. But you cannot cross compile because of some dependencies. So we wan to check nix lang is correct, but cannot because of the only way to check is have arm/darwin.
Can I you
--arg name expr
Pass the value expr as the argument name to Nix functions.
--argstr name string
Pass the string string as the argument name to Nix functions.
Seems flakes ignore this or do not allow (at least what I read, and may be there is my ack of knowledge - but as per items on nix gh - it is dissallowed to have arbitrary input because it violates isolation of nix flake is flake.nix + flake.lock).
So there only way to """compile""" nix in CI to check it before build is to override with flake for 1 and only one system.
Can we just build? No, we do not have mac or ARM. But if nix lang is wrong it is wrong for all systems (we talk here about """compilation""", not about side effecting derivaiton which is different on different systems).
from flake-utils.
@zimbatm you likely should undrestand that flake.nix can be '""compiled""", that is hard to get as I see for people. eqactly same as complex rust/typescript monorepo is compiled.
I tell flake.nix and its deps, not arbitrary defaul.nix.
And the only way to do compilation now is to override flake-utils with current system of CI.
from flake-utils.
But yeah, that can be a bug in NIX. who knows.
from flake-utils.
nix flake check =>
error: error: a 'aarch64-darwin' with features {} is required to build '/nix/store/22zx8fsi94pa9p9m3w1m21ylb7fb55xa-yarn.nix.drv', but I am a 'x86_64-linux' with features {benchmark, big-parallel, kvm, nixos-test}
nix flake check --override flake-utils flake-utils-x86_64-linux -> no error.
sure. it can be different if there is if else on system. but that is usually not what users do or see. they use cross platform stuff.
these packages - kvm - for sure cannot do mac darwin, but how can I test all the flake nix which is not mac?
but I am a 'x86_64-linux' with features {benchmark, big-parallel, kvm, nixos-test}
so that is feature.
from flake-utils.
flake.nix
:
{
outputs = { self, nixpkgs }: {
checks.aarch64-darwin.hello = nixpkgs.legacyPackages.aarch64-darwin.hello;
checks.aarch64-linux.hello = nixpkgs.legacyPackages.aarch64-linux.hello;
checks.x86_64-darwin.hello = nixpkgs.legacyPackages.x86_64-darwin.hello;
checks.x86_64-linux.hello = nixpkgs.legacyPackages.x86_64-linux.hello;
};
}
$ nix flake check -v
evaluating flake...
running flake checks...
You can try this on your system and see that the issue is not the multi-arch support. Flakes evaluate all the systems, but only builds the current one. Adding more hacks to fix the hacks is not the right solution. Stop using IFD, and your problem will go away.
from flake-utils.
check in nix does run check
command. in many cases check
actually builds to run tests. so solution was pass not build param during check (so no test are running).
nix flake metadata && \
nix flake show --allow-import-from-derivation --show-trace --fallback --debug --print-build-logs --keep-failed --option sandbox relaxed && \
nix flake check --no-build --keep-going --allow-import-from-derivation --show-trace --no-update-lock-file --fallback --debug --print-build-logs --keep-failed --impure --option sandbox relaxed
in case of strict sandbox it gives compiled nix kind of.
from flake-utils.
Related Issues (20)
- feat: Cut more releases
- by-name HOT 7
- Q: why does flattenTree rely on recurseIntoAttrs? HOT 4
- eachDefaultSystem leads to missing architecture attributes HOT 4
- simpleFlake to support defaultSystems HOT 2
- Outputs spec update makes `eachSystemMap` powerful HOT 2
- flake-utils.lib.mkApp is broken with nix 2.8 HOT 4
- move functions to nixpkgs HOT 2
- Use `meta.mainProgram` by default in `mkApp` HOT 4
- Request for Semantic Version Pinning HOT 1
- Request for Semantic Version Pinning HOT 1
- `flattenTree` cannot seem to flatten `legacyPackages` to a `packages`-compatible format HOT 5
- Should `filterPackages` check `meta.hydraPlatforms`? HOT 2
- nixops support HOT 4
- self parameter for eachSystem/eachDefaultSystem HOT 2
- Potential feature-freeze or deprecation in favor of flake-parts HOT 2
- master rename to main breaks nix flake update HOT 3
- eachDefaultSystem docs are sorely missing a real example HOT 4
- This `flake.system.nix` approach... relies on a broken nix feature
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 flake-utils.