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

unfree overlay rebuild glibc in ms-dotnettools.* #109

Open
UnReversed opened this issue Mar 10, 2025 · 6 comments
Open

unfree overlay rebuild glibc in ms-dotnettools.* #109

UnReversed opened this issue Mar 10, 2025 · 6 comments

Comments

@UnReversed
Copy link

So after creating first time overlay inspired by discussion in #99 nix want to rebuild glibc and coreutils

afected extensions:

  • ms-dotnettools.csdevkit
  • ms-dotnettools.csharp

overlay

{inputs, ...}: {
  vscode-packages = final: _prev: {
    pkgs-ext = import inputs.nixpkgs {
      system = final.system;
      config.allowUnfree = true;
      overlays = [inputs.nix-vscode-extensions.overlays.default];
    };
  };
}

my overlay
vscode config

@deemp
Copy link
Collaborator

deemp commented Mar 10, 2025

nix want to rebuild glibc and coreutils

@UnReversed please explain what it means. Show logs with nix -vv. If possible, provide a flake where you can reproduce the issue.

@deemp
Copy link
Collaborator

deemp commented Mar 11, 2025

@UnReversed also, please check #99 (comment)

@UnReversed
Copy link
Author

nix want to rebuild glibc and coreutils

@UnReversed please explain what it means. Show logs with nix -vv. If possible, provide a flake where you can reproduce the issue.

sorry for not being too precise, i meant that nix compiles glibc and coreutils from source

MRE

{
  description = "test";

  inputs = {
    nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";

    home-manager = {
      url = "github:nix-community/home-manager";
      inputs.nixpkgs.follows = "nixpkgs";
    };

    nix-vscode-extensions = {
      url = "github:nix-community/nix-vscode-extensions";
      inputs.nixpkgs.follows = "nixpkgs";
    };
  };

  outputs = {
    nixpkgs,
    home-manager,
    nix-vscode-extensions,
    ...
  }: let
    homeconfig = {pkgs, ...}: {
      nixpkgs = {
        overlays = [
          nix-vscode-extensions.overlays.default
        ];
        config = {
          allowUnfree = true;
        };
      };

      home = {
        username = "test";
        homeDirectory = "/home/test";
        stateVersion = "23.11";
      };

      programs.vscode = {
        enable = true;
        profiles.default = {
          extensions = with pkgs.vscode-marketplace; [
            ms-dotnettools.csdevkit
            ms-dotnettools.csharp
          ];
        };
      };
    };
  in {
    homeConfigurations = {
      "test@test" = home-manager.lib.homeManagerConfiguration {
        pkgs = nixpkgs.legacyPackages.x86_64-linux;
        modules = [
          homeconfig
        ];
      };
    };
  };
}

@UnReversed also, please check #99 (comment)

changing to

    overlays = [
      inputs.nix-vscode-extensions.overlays.default
    ];

yields no differences, still tries to compile glibc and coreutils

@apockill
Copy link

I have a question, do you think this would be related to the errors I get now after running nix flake update && nixos-rebuild --flake ...

       error: Package ‘vscode-extension-ms-vscode-remote-remote-containers-0.404.0’ in /nix/store/yfybm0g8vx6k22f3m0pw72fmzrlis2kv-64lxq5kn85vglf3xhbh0zxjj8hin3m42-source/pkgs/applications/editors/vscode/extensions/default.nix:3645 has an unfree license (‘unfree’), refusing to evaluate.

       a) To temporarily allow unfree packages, you can use an environment variable
          for a single invocation of the nix tools.

            $ export NIXPKGS_ALLOW_UNFREE=1

          Note: When using `nix shell`, `nix build`, `nix develop`, etc with a flake,
                then pass `--impure` in order to allow use of environment variables.

       b) For `nixos-rebuild` you can set
         { nixpkgs.config.allowUnfree = true; }
       in configuration.nix to override this.

       Alternatively you can configure a predicate to allow specific packages:
         { nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
             "vscode-extension-ms-vscode-remote-remote-containers"
           ];
         }

       c) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
         { allowUnfree = true; }
       to ~/.config/nixpkgs/config.nix.

I set allowUnfree already in multiple locations, to no avail. Is this a bug?

@deemp
Copy link
Collaborator

deemp commented Mar 11, 2025

@UnReversed have you set substituters? Does your machine have Internet access?

Unfortunately, I'm not a NixOS user; hence, I can only ask some generic questions.

Could you please try to reproduce your issue in GitHub Actions?

@deemp
Copy link
Collaborator

deemp commented Mar 11, 2025

@apockill perhaps you should check the Overlay section.

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

3 participants