Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Vala #992

Merged
merged 1 commit into from
Mar 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions examples/vala/devenv.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{ pkgs, ... }:

{
packages = with pkgs; [
# Check Vala code files for code-style errors
vala-lint
];

languages = {
vala = {
enable = true;
# This is the default package for Vala for the configured channel (see nixpkgs input in devenv.yaml)
# It can be configured to use a specific version
# Take a look [here](https://search.nixos.org/packages?channel=unstable&from=0&size=50&sort=relevance&type=packages&query=vala) to find out which versions are available
package = pkgs.vala;
};
};

enterShell = ''
echo "This development environment uses $(vala --version)."
'';
}
3 changes: 3 additions & 0 deletions examples/vala/devenv.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
inputs:
nixpkgs:
url: github:NixOS/nixpkgs/nixpkgs-unstable
24 changes: 24 additions & 0 deletions src/modules/languages/vala.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{ pkgs, config, lib, ... }:

let
cfg = config.languages.vala;
in
{
options.languages.vala = {
enable = lib.mkEnableOption "tools for Vala development";

package = lib.mkOption {
type = lib.types.package;
default = pkgs.vala;
defaultText = lib.literalExpression "pkgs.vala";
description = "The Vala package to use.";
example = lib.literalExpression "pkgs.vala_0_54";
};
};

config = lib.mkIf cfg.enable {
packages = [
cfg.package
];
};
}
Loading