Skip to content

Allow platform compatibility to be queried on packages #21845

@3noch

Description

@3noch

@cleverca22 pointed out:

nix-repl> (import <nixpkgs> { system = "x86_64-darwin"; }).acl.meta
error: Package ‘acl-2.2.52’ in ‘/nix/store/jk5dvrv6w9bcgh88g0x7clk19df3q28f-nixos-17.03pre96925.1c50bdd/nixos/pkgs/development/libraries/acl/default.nix:29’ is not supported on ‘x86_64-darwin’, refusing to evaluate.

This is unfortunate because it would be extremely handy to have a function that, given a package, could tell me if it is compatible with a system (most often, my current system). With such a function we could safely make certain features/dependencies optional without having to manually duplicate platform compatibility information with the likes of isDarwin, isLinux, etc.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions