initial commit

This commit is contained in:
outfoxxed 2024-11-04 01:38:45 -08:00
commit e6882932ae
Signed by: outfoxxed
GPG key ID: 4C88A185FB89301E
6 changed files with 78 additions and 0 deletions

5
LICENSE Normal file
View file

@ -0,0 +1,5 @@
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

12
README.md Normal file
View file

@ -0,0 +1,12 @@
# nix-qml-support
Extra nix packages for QML development.
### tree-sitter-qmljs
Package of [yuja/tree-sitter-qmljs](https://github.com/yuja/tree-sitter-qmljs).
Available as `packages.<system>.tree-sitter-qmljs`.
### qml-ts-mode
Package of [xhcoding/qml-ts-mode](https://github.com/xhcoding/qml-ts-mode).
Available as `packages.<system>.qml-ts-mode`.

10
emacs-qml-ts-mode.nix Normal file
View file

@ -0,0 +1,10 @@
{ fetchFromGitHub, trivialBuild }: trivialBuild {
pname = "qml-ts-mode";
version = "master";
src = fetchFromGitHub {
owner = "xhcoding";
repo = "qml-ts-mode";
rev = "22e5b4ee2036d01878e463b5e4cce80957c96619";
sha256 = "Mx3kwDx7sVwF9uQ5vOIXnfPkuOkuq3VN2KhkC/dod+4=";
};
}

26
flake.lock Normal file
View file

@ -0,0 +1,26 @@
{
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1730531603,
"narHash": "sha256-Dqg6si5CqIzm87sp57j5nTaeBbWhHFaVyG7V6L8k3lY=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "7ffd9ae656aec493492b44d0ddfb28e79a1ea25d",
"type": "github"
},
"original": {
"id": "nixpkgs",
"ref": "nixos-unstable",
"type": "indirect"
}
},
"root": {
"inputs": {
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

16
flake.nix Normal file
View file

@ -0,0 +1,16 @@
{
inputs = {
nixpkgs.url = "nixpkgs/nixos-unstable";
};
outputs = { nixpkgs, ... }: let
forEachSystem = fn: nixpkgs.lib.genAttrs
[ "x86_64-linux" "aarch64-linux" ]
(system: fn system nixpkgs.legacyPackages.${system});
in {
packages = forEachSystem (system: pkgs: rec {
tree-sitter-qmljs = pkgs.callPackage ./qml-grammar-overlay.nix {};
qml-ts-mode = pkgs.emacsPackages.callPackage ./emacs-qml-ts-mode.nix {};
});
};
}

9
qml-grammar-overlay.nix Normal file
View file

@ -0,0 +1,9 @@
{ fetchFromGitHub, tree-sitter }: tree-sitter.buildGrammar {
version = "master";
src = final.fetchFromGitHub {
owner = "yuja";
repo = "tree-sitter-qmljs";
rev = "6d4db242185721e1f5ef21fde613ca90c743ec47";
sha256 = "S6rBQRecJvPgyWq1iydFZgDyXbm9CZBw8kxzNI0cqdw=";
};
}