Comments (5)
The whole apps
and mkApp
has become somewhat redundant. Historically, nix run
was relying on that construct to run things. Since then It has acquired its own heuristic and can lookup the packages
and legacyPackages
. You can try this out by running nix run nixpkgs#hello
. So I would just expose the packages and let deal with resolving the right one.
One case where I think mkApp
is still useful, is when a derivation output contains multiple binaries. For example, you might have yourflake#coreutils
and also want to expose yourflake#ls
and yourflake#mkdir`. In that case, I expect the correspondence to be drawn manually.
from flake-utils.
Without an app declaration, nix run
seems to call the value of name
by default to evoke the binary, which in a lot of cases is "${name}-{pname}". There is an effort to standardize this. NixOS/nixpkgs#103997. In particular, it fails for me.
We should probably call a package by its pname
instead. NixOS/nix#4422
from flake-utils.
Do you want to do something about this? I think the conclusion of NixOS/nix#4422 (comment) might apply here as well.
from flake-utils.
It seems I'm just hitting this:
$ nix run .#CashBoxy:exe:Main
warning: Git tree '/home/blaggacao/ghq/git.p1.rocks/SideProjects/CashBoxy' is dirty
trace: gitSource.nix: /nix/store/bbln8w5gf3fainh1206f42q4zry0gmgi-source does not seem to be a git repository,
assuming it is a clean checkout.
trace: To materialize project.plan-nix for CashBoxy entirely, pass a writable path as the `materialized` argument and run the 'updateMaterialized' script in 'passthru'.
error: --- SysError ----------------------------------------------------------------------------------- nix
unable to execute '/nix/store/baskvl2ay7mrprgjaq75w5ndclxp39m5-CashBoxy-exe-Main-0.1.0.0/bin/CashBoxy-exe-Main': No such file or directory
But
$ ls /nix/store/baskvl2ay7mrprgjaq75w5ndclxp39m5-CashBoxy-exe-Main-0.1.0.0/bin
Main
so its /bin/Main
vs bin/CashBoxy-exe-Main
It's all new to me, but I conclude that program = v.exePath
still has it's validity?
from flake-utils.
If any similar issues arise in the future, they should be routed to upstream nix
to improve the hueristic for launching packages.
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
- single arch+os override flake HOT 15
- 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.