Closed Lunarequest closed 2 years ago
is that fixed?
This issue is still happening when using defaultApp = flake-utils.lib.mkApp { drv = package; };
with nix-2.8 .
This seems to work though: apps.default = flake-utils.lib.mkApp { drv = package; }
.
It does not seem like this issue should have been closed.
EDIT: Discovered that the problem I was describing underneath the divider, below, was because I wasn't conforming to https://github.com/numtide/flake-utils/commit/c0e246b9b83f637f4681389ecabcb2681b4f3af0 . After respecting that commit and moving my defaultApp
value to apps.default
nix run .
works fine.
apps = rec {
go_1_18-fips = flake-utils.lib.mkApp { drv = packages.go_1_18-fips; exePath = "/bin/go";};
default = go_1_18-fips;
};
I have a bunch of files in $out/bin
and trying to select only one for defaultApp
with exePath
or name
fails with the above error. It doesn't matter if I try apps.defaultApp
or defaultApp
.
apps.defaultApp = flake-utils.lib.mkApp { drv = packages.go_1_18-fips; name = "go";};
However, the below works just fine as nix run .#go_1_18-fips
apps.go_1_18-fips = flake-utils.lib.mkApp { drv = packages.go_1_18-fips; name = "go";};
It's possible this has been the case for as long as nix 2.8
. But, in my case
$ nix --version
nix (Nix) 2.10.3
$ cat flake.lock | grep numtide -C 10
{
"nodes": {
"flake-utils": {
"locked": {
"lastModified": 1659877975,
"narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
Describe the bug
To Reproduce
Steps to reproduce the behavior:
nix run
on a repo with the an app made withflake-utils.lib.mkApp
error: attribute 'defaultApp.x86_64-linux' should have type 'derivation'
Expected behavior the app executes normally
System information nix 2.8.0 linux
Additional context nix 2.8.0 has more strictness the nix 2.7 which has broken flake-utils