1
0
Fork 0
mirror of https://github.com/mitchellh/zig-overlay.git synced 2025-05-08 18:46:02 +03:00

add an overlay, clean up package names for nix flake check

This commit is contained in:
Mitchell Hashimoto 2022-08-22 19:31:09 -07:00
parent de6bcff2cf
commit 5ce840257e
No known key found for this signature in database
GPG key ID: 523D5DC389D273BC
3 changed files with 37 additions and 20 deletions

View file

@ -13,10 +13,24 @@
in flake-utils.lib.eachSystem systems (system:
let pkgs = nixpkgs.legacyPackages.${system};
in rec {
# The packages exported by the Flake:
# - default - latest /released/ version
# - <version> - tagged version
# - master - latest nightly (updated daily)
# - master-<date> - nightly by date
packages = import ./default.nix { inherit system pkgs; };
# "Apps" so that `nix run` works. If you run `nix run .` then
# this will use the latest default.
apps = rec {
default = apps.zig;
zig = flake-utils.lib.mkApp { drv = packages.default; };
};
# Overlay that can be imported so you can access the packages
# using zigpkgs.master.latest or whatever you'd like.
overlay = final: prev: {
zigpkgs = packages.${prev.system};
};
});
}