Skip to content

Exceptions for external URLs #571

Open

Description

@ilya-fedin

Is it possible to have exception for the following URLs?

The thing is my NUR repo is a flake and I use Chrome OS fonts which were removed from latest nixpkgs yet I want to have them. I have the following code:

  ttf-croscore = (import (import ./flake-compat.nix).inputs.nixpkgs-croscore {
    system = stdenv.system;
  }).noto-fonts.overrideAttrs(oldAttrs: {
    pname = "ttf-croscore";

    installPhase = ''
      install -m444 -Dt $out/share/fonts/truetype/croscore hinted/*/{Arimo,Cousine,Tinos}/*.ttf
    '';

    meta = oldAttrs.meta // {
      description = "Chrome OS core fonts";
      longDescription = "This package includes the Arimo, Cousine, and Tinos fonts.";
    };
  });

flake-compat.nix:

(import
  (
    let lock = builtins.fromJSON (builtins.readFile ./flake.lock); in
    fetchTarball {
      url = "https://github.com/edolstra/flake-compat/archive/${lock.nodes.flake-compat.locked.rev}.tar.gz";
      sha256 = lock.nodes.flake-compat.locked.narHash;
    }
  )
  { src = ./.; }
).defaultNix

nixpkgs-croscore is nixpkgs pinned before removation of croscore fonts. The code couldn't use nixpkgs fetchers as they don't let to import the result which is needed for both flake-compat and nixpkgs.

Activity

  1. Mic92 commented on Jun 16, 2023

    @Mic92
    Member

    I think flake-compat is fine. nixpkgs might be a problem though. It's a really big repository and the evaluation infrastructure will run into scaling issues when suddenly everyone pins there own nixpkgs version.

  2. ilya-fedin commented on Jun 16, 2023

    @ilya-fedin
    ContributorAuthor

    Can I somehow exclude it only from evaluation in your CI?

  3. Mic92 commented on Jun 16, 2023

    @Mic92
    Member

    You can have a separate entry point for NUR:

    NUR/repos.json

    Line 50 in 6f1156d

    "file": "pkgs/default.nix",

  4. ilya-fedin commented on Jun 16, 2023

    @ilya-fedin
    ContributorAuthor

    this would change it not only for CI but also for users?

  5. ilya-fedin commented on Jun 16, 2023

    @ilya-fedin
    ContributorAuthor

    The idea is to avoid evaluation only on the CI so it doesn't overload yet have it accessible via NUR

  6. Mic92 commented on Jun 18, 2023

    @Mic92
    Member

    this would change it not only for CI but also for users?

    Yes.

  7. ilya-fedin commented on Jul 10, 2023

    @ilya-fedin
    ContributorAuthor

    It feels to me the current NUR architecture and restrictions really lag behind the mainstream flake world. I have nixpkgs in the flake and I have binary cache using that commit of nixpkgs. Yet NUR forces to use the global nixpkgs which is most likely of different commit and binary cache doesn't do its thing.

  8. Mic92 commented on Jul 11, 2023

    @Mic92
    Member

    Question is if you want pinning and custom binary caches, why not using flakes instead which has better support for this.
    Without pinning you have the advantage that your evaluation memory requirements does not explode if you add packages from many different upstream repos and also your final result will share more dependencies.
    NUR predates flakes and I am not really sure where to take this project now they exist.
    As of now I am mainly maintaining the status quo but not really adding any new features.

  9. ilya-fedin commented on Jul 11, 2023

    @ilya-fedin
    ContributorAuthor

    why not using flakes instead

    I use but NUR goes in the way by restrict-eval and by not being able to import flakes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions