mirror of
https://github.com/daylinmorgan/oizys.git
synced 2024-11-05 01:53:15 -06:00
add zls and abstract zig to module
This commit is contained in:
parent
360cb79ea1
commit
bf6b0b26d8
5 changed files with 168 additions and 3 deletions
147
flake.lock
147
flake.lock
|
@ -15,6 +15,22 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-compat_2": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1673956053,
|
||||
"narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=",
|
||||
"owner": "edolstra",
|
||||
"repo": "flake-compat",
|
||||
"rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "edolstra",
|
||||
"repo": "flake-compat",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-parts": {
|
||||
"inputs": {
|
||||
"nixpkgs-lib": [
|
||||
|
@ -73,6 +89,60 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils_3": {
|
||||
"inputs": {
|
||||
"systems": "systems_5"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1710146030,
|
||||
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils_4": {
|
||||
"locked": {
|
||||
"lastModified": 1659877975,
|
||||
"narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"gitignore": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"zls",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1709087332,
|
||||
"narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "gitignore.nix",
|
||||
"rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hercules-ci",
|
||||
"repo": "gitignore.nix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"hyprcursor": {
|
||||
"inputs": {
|
||||
"hyprlang": "hyprlang",
|
||||
|
@ -219,6 +289,18 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"langref": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"narHash": "sha256-94broSBethRhPJr0G9no4TPyB8ee6BQ/hHK1QnLPln0=",
|
||||
"type": "file",
|
||||
"url": "https://raw.githubusercontent.com/ziglang/zig/54bbc73f8502fe073d385361ddb34a43d12eec39/doc/langref.html.in"
|
||||
},
|
||||
"original": {
|
||||
"type": "file",
|
||||
"url": "https://raw.githubusercontent.com/ziglang/zig/54bbc73f8502fe073d385361ddb34a43d12eec39/doc/langref.html.in"
|
||||
}
|
||||
},
|
||||
"lib-aggregate": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils",
|
||||
|
@ -401,7 +483,8 @@
|
|||
"pinix": "pinix",
|
||||
"stable": "stable",
|
||||
"tsm": "tsm",
|
||||
"zig2nix": "zig2nix"
|
||||
"zig2nix": "zig2nix",
|
||||
"zls": "zls"
|
||||
}
|
||||
},
|
||||
"stable": {
|
||||
|
@ -480,6 +563,21 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"systems_5": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"treefmt-nix": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
|
@ -576,6 +674,29 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"zig-overlay": {
|
||||
"inputs": {
|
||||
"flake-compat": "flake-compat_2",
|
||||
"flake-utils": "flake-utils_4",
|
||||
"nixpkgs": [
|
||||
"zls",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1711627798,
|
||||
"narHash": "sha256-4BUZmgUFrrD5dRZbOUYRRQEDwLX/r7/ErLi+vHfB/+8=",
|
||||
"owner": "mitchellh",
|
||||
"repo": "zig-overlay",
|
||||
"rev": "b01e0b81d1fa489e54362ea0a74f182eaa9a35bb",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "mitchellh",
|
||||
"repo": "zig-overlay",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"zig2nix": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils_2",
|
||||
|
@ -596,6 +717,30 @@
|
|||
"repo": "zig2nix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"zls": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils_3",
|
||||
"gitignore": "gitignore",
|
||||
"langref": "langref",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
],
|
||||
"zig-overlay": "zig-overlay"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1711925513,
|
||||
"narHash": "sha256-DFgsGlEGsxLgtRrh7J+v8x4w+/cJatTCkrZP3/0Gb/o=",
|
||||
"owner": "zigtools",
|
||||
"repo": "zls",
|
||||
"rev": "4e01c08f558ea07462aaa7b71d2a24f86f47a855",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "zigtools",
|
||||
"repo": "zls",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
|
|
|
@ -25,6 +25,9 @@
|
|||
|
||||
zig2nix.url = "github:Cloudef/zig2nix";
|
||||
zig2nix.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
zls.url = "github:zigtools/zls";
|
||||
zls.inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
nixConfig = {
|
||||
|
|
|
@ -20,6 +20,7 @@ in {
|
|||
"nim"
|
||||
"tex"
|
||||
"node"
|
||||
"zig"
|
||||
];
|
||||
};
|
||||
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
{lib, ...}: let
|
||||
inherit (lib) mkOption types literalExpression mdDoc;
|
||||
in {
|
||||
imports = [./nim.nix ./tex.nix ./misc.nix ./node.nix ./python.nix];
|
||||
imports = [./nim.nix ./tex.nix ./misc.nix ./node.nix ./python.nix ./zig.nix];
|
||||
options.oizys.languages = mkOption {
|
||||
type = with types; (listOf str);
|
||||
description = lib.mdDoc ''
|
||||
description = mdDoc ''
|
||||
List of programming languages to enable.
|
||||
'';
|
||||
default = [];
|
||||
|
|
16
modules/languages/zig.nix
Normal file
16
modules/languages/zig.nix
Normal file
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
inputs,
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIfIn;
|
||||
cfg = config.oizys.languages;
|
||||
zig = inputs.zig2nix.outputs.packages.${pkgs.system}.zig.master.bin;
|
||||
zls = inputs.zls.outputs.packages.${pkgs.system}.default;
|
||||
in {
|
||||
config = mkIfIn "zig" cfg {
|
||||
environment.systemPackages = [zig zls];
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue