Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nix run error when trying to run an "app" from file with -f flag (in non-flake project) #10634

Open
adrian-gierakowski opened this issue May 1, 2024 · 0 comments
Labels

Comments

@adrian-gierakowski
Copy link

Describe the bug

Given following my-apps.nix file:

let
  pkgs = import (builtins.fetchTarball "https://github.com/nixos/nixpkgs/archive/ff0dbd94265ac470dda06a657d5fe49de93b4599.tar.gz") {};
in {
  hello = {
    type = "app";
    program = "${pkgs.hello}/bin/hello";
  };
}

running:

 nix run -f my-apps.nix hello

results in an errer:

error: attribute '' should have type 'derivation'

Steps To Reproduce

see above

Expected behavior

the hello program should be ran, leading to following output:

Hello, world!

nix-env --version output

nix-env (Nix) 2.21.1

Additional context

Priorities

Add 👍 to issues you find important.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant