mirror of
https://github.com/mitchellh/zig-overlay.git
synced 2025-02-05 17:02:48 +02:00
Compare commits
2 commits
ef25d048d9
...
f07815271b
Author | SHA1 | Date | |
---|---|---|---|
|
f07815271b | ||
|
7dd1f3eda2 |
2 changed files with 17 additions and 38 deletions
34
flake.lock
generated
34
flake.lock
generated
|
@ -16,24 +16,6 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"flake-utils": {
|
|
||||||
"inputs": {
|
|
||||||
"systems": "systems"
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1705309234,
|
|
||||||
"narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=",
|
|
||||||
"owner": "numtide",
|
|
||||||
"repo": "flake-utils",
|
|
||||||
"rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "numtide",
|
|
||||||
"repo": "flake-utils",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1708161998,
|
"lastModified": 1708161998,
|
||||||
|
@ -53,24 +35,8 @@
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-compat": "flake-compat",
|
"flake-compat": "flake-compat",
|
||||||
"flake-utils": "flake-utils",
|
|
||||||
"nixpkgs": "nixpkgs"
|
"nixpkgs": "nixpkgs"
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"systems": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1681028828,
|
|
||||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
|
||||||
"owner": "nix-systems",
|
|
||||||
"repo": "default",
|
|
||||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nix-systems",
|
|
||||||
"repo": "default",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"root": "root",
|
"root": "root",
|
||||||
|
|
21
flake.nix
21
flake.nix
|
@ -3,7 +3,6 @@
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11";
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11";
|
||||||
flake-utils.url = "github:numtide/flake-utils";
|
|
||||||
|
|
||||||
# Used for shell.nix
|
# Used for shell.nix
|
||||||
flake-compat = {
|
flake-compat = {
|
||||||
|
@ -15,11 +14,22 @@
|
||||||
outputs = {
|
outputs = {
|
||||||
self,
|
self,
|
||||||
nixpkgs,
|
nixpkgs,
|
||||||
flake-utils,
|
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
|
inherit (nixpkgs) lib;
|
||||||
|
|
||||||
|
# flake-utils polyfill
|
||||||
|
eachSystem = systems: fn:
|
||||||
|
lib.foldl' (
|
||||||
|
acc: system:
|
||||||
|
lib.recursiveUpdate
|
||||||
|
acc
|
||||||
|
(lib.mapAttrs (_: value: {${system} = value;}) (fn system))
|
||||||
|
) {}
|
||||||
|
systems;
|
||||||
|
|
||||||
systems = ["x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin"];
|
systems = ["x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin"];
|
||||||
outputs = flake-utils.lib.eachSystem systems (system: let
|
outputs = eachSystem systems (system: let
|
||||||
pkgs = nixpkgs.legacyPackages.${system};
|
pkgs = nixpkgs.legacyPackages.${system};
|
||||||
in rec {
|
in rec {
|
||||||
# The packages exported by the Flake:
|
# The packages exported by the Flake:
|
||||||
|
@ -33,7 +43,10 @@
|
||||||
# this will use the latest default.
|
# this will use the latest default.
|
||||||
apps = rec {
|
apps = rec {
|
||||||
default = apps.zig;
|
default = apps.zig;
|
||||||
zig = flake-utils.lib.mkApp {drv = packages.default;};
|
zig = {
|
||||||
|
type = "app";
|
||||||
|
program = toString packages.default;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# nix fmt
|
# nix fmt
|
||||||
|
|
Loading…
Add table
Reference in a new issue