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 store output path is empty unless name is specified #323

Open
samuela opened this issue Apr 13, 2024 · 0 comments
Open

Nix store output path is empty unless name is specified #323

samuela opened this issue Apr 13, 2024 · 0 comments

Comments

@samuela
Copy link

samuela commented Apr 13, 2024

As the title says, I have a flake.nix:

{
  inputs = {
    utils.url = "github:numtide/flake-utils";
    naersk.url = "github:nix-community/naersk";
  };

  outputs = { self, naersk, nixpkgs, utils }:
    utils.lib.eachDefaultSystem (system:
      let
        pkgs = import nixpkgs { inherit system; };
        naersk-lib = pkgs.callPackage naersk { };
      in with pkgs; {
        packages.cherami-build = naersk-lib.buildPackage {
          # When `name = "cherami-build";` is commented out,
          #
          #   root@b62e2017d34d:/workspaces/bitbop# ls $(nix build .#cherami-build --json | jq ".[].outputs.out" --raw-output)
          #   root@b62e2017d34d:/workspaces/bitbop#
          #
          # But when uncommented,
          #
          #   root@b62e2017d34d:/workspaces/bitbop# ls $(nb .#cherami-build --json | jq ".[].outputs.out" --raw-output)
          #   bin
          #   root@b62e2017d34d:/workspaces/bitbop#
          #
          name = "cherami-build";
          src = ./cherami;
        };
      });
}

And the output directory is only non-empty when name is specified? Why?

My flake.lock file is available in this gist.

haennes added a commit to haennes/manix that referenced this issue Sep 26, 2024
zvolin pushed a commit to zvolin/manix that referenced this issue Sep 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant