Files
tree-sitter-nix-shell/flake.nix
2023-07-06 22:39:50 +00:00

30 lines
806 B
Nix

{
description = "tree-sitter implementation for nix-shell scripts";
inputs = {
nixpkgs.url = "nixpkgs/nixos-23.05";
flake-utils.url = github:numtide/flake-utils;
};
outputs = { self, nixpkgs, flake-utils }:
with flake-utils.lib; eachSystem allSystems (system:
let
pkgs = import nixpkgs {
inherit system;
};
in rec {
packages.tree-sitter-nixshell = pkgs.callPackage ./default.nix { };
defaultPackage = packages.tree-sitter-nixshell;
devShells.default = pkgs.callPackage ./shell.nix { };
apps.clean = {
type = "app";
program = builtins.toString (pkgs.writeShellScript "clean" ''
# remove build artifacts
rm -f Cargo.toml binding.gyp
rm -rf bindings/ src/
'');
};
});
}