Compare commits
10 Commits
| Author | SHA1 | Date |
|---|---|---|
|
|
99b4355a1a | |
|
|
14bc2d39de | |
|
|
0df7f7399c | |
|
|
4cea570a84 | |
|
|
7dbf4382ef | |
|
|
3f58d180ec | |
|
|
f343d0eb15 | |
|
|
1b2ddaffb6 | |
|
|
7f160dfe6c | |
|
|
5cef4b0503 |
|
|
@ -0,0 +1,20 @@
|
|||
sloth-flake.nvim - A neovim plugin and configuration management plugin, highly inspired by lazy, using nix.
|
||||
Copyright © 2024 LeMarsu
|
||||
|
||||
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.
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
imports = [
|
||||
./formatter.nix
|
||||
./shell.nix
|
||||
];
|
||||
}
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
perSystem = {pkgs, ...}: {
|
||||
formatter = pkgs.alejandra;
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
perSystem = {pkgs, ...}: {
|
||||
devShells.default = pkgs.mkShell {
|
||||
buildInputs = with pkgs; [
|
||||
alejandra
|
||||
git-cliff
|
||||
nil
|
||||
sumneko-lua-language-server
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
236
flake.lock
236
flake.lock
|
|
@ -1,127 +1,30 @@
|
|||
{
|
||||
"nodes": {
|
||||
"alejandra": {
|
||||
"flake-parts": {
|
||||
"inputs": {
|
||||
"fenix": "fenix",
|
||||
"flakeCompat": "flakeCompat",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
"nixpkgs-lib": "nixpkgs-lib"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1660592437,
|
||||
"narHash": "sha256-xFumnivtVwu5fFBOrTxrv6fv3geHKF04RGP23EsDVaI=",
|
||||
"owner": "kamadorueda",
|
||||
"repo": "alejandra",
|
||||
"rev": "e7eac49074b70814b542fee987af2987dd0520b5",
|
||||
"lastModified": 1759362264,
|
||||
"narHash": "sha256-wfG0S7pltlYyZTM+qqlhJ7GMw2fTF4mLKCIVhLii/4M=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "758cf7296bee11f1706a574c77d072b8a7baa881",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "kamadorueda",
|
||||
"ref": "3.0.0",
|
||||
"repo": "alejandra",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"fenix": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"alejandra",
|
||||
"nixpkgs"
|
||||
],
|
||||
"rust-analyzer-src": "rust-analyzer-src"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1657607339,
|
||||
"narHash": "sha256-HaqoAwlbVVZH2n4P3jN2FFPMpVuhxDy1poNOR7kzODc=",
|
||||
"owner": "nix-community",
|
||||
"repo": "fenix",
|
||||
"rev": "b814c83d9e6aa5a28d0cf356ecfdafb2505ad37d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "fenix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils": {
|
||||
"inputs": {
|
||||
"systems": "systems"
|
||||
},
|
||||
"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"
|
||||
}
|
||||
},
|
||||
"flakeCompat": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1650374568,
|
||||
"narHash": "sha256-Z+s0J8/r907g149rllvwhb4pKi8Wam5ij0st8PwAh+E=",
|
||||
"owner": "edolstra",
|
||||
"repo": "flake-compat",
|
||||
"rev": "b4a34015c698c7793d592d66adbab377907a2be8",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "edolstra",
|
||||
"repo": "flake-compat",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nil": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"rust-overlay": "rust-overlay"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1717086091,
|
||||
"narHash": "sha256-GmsEQa4HZeMfec37LZnwG/Lt/XmqFLXsjv5QWojeNiM=",
|
||||
"owner": "oxalica",
|
||||
"repo": "nil",
|
||||
"rev": "ab3ddb8f063774cf7e22eb610f5ecfdb77309f3c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "oxalica",
|
||||
"repo": "nil",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1716977081,
|
||||
"narHash": "sha256-pFe5jLeIPlKEln5n2h998d7cpzXFdbrBMRe3suz4K1o=",
|
||||
"lastModified": 1759381078,
|
||||
"narHash": "sha256-gTrEEp5gEspIcCOx9PD8kMaF1iEmfBcTbO0Jag2QhQs=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "ac82a513e55582291805d6f09d35b6d8b60637a1",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixpkgs-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1717196966,
|
||||
"narHash": "sha256-yZKhxVIKd2lsbOqYd5iDoUIwsRZFqE87smE2Vzf6Ck0=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "57610d2f8f0937f39dbd72251e9614b1561942d8",
|
||||
"rev": "7df7ff7d8e00218376575f0acdcc5d66741351ee",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -131,7 +34,22 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_3": {
|
||||
"nixpkgs-lib": {
|
||||
"locked": {
|
||||
"lastModified": 1754788789,
|
||||
"narHash": "sha256-x2rJ+Ovzq0sCMpgfgGaaqgBSwY+LST+WbZ6TytnT9Rk=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nixpkgs.lib",
|
||||
"rev": "a73b9c743612e4244d865a2fdee11865283c04e6",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "nixpkgs.lib",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1660438583,
|
||||
"narHash": "sha256-rJUTYxFKlWUJI3njAwEc1pKAVooAViZGJvsgqfh/q/E=",
|
||||
|
|
@ -148,106 +66,14 @@
|
|||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"alejandra": "alejandra",
|
||||
"nil": "nil",
|
||||
"nixpkgs": "nixpkgs_2",
|
||||
"utils": "utils",
|
||||
"flake-parts": "flake-parts",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"yants": "yants"
|
||||
}
|
||||
},
|
||||
"rust-analyzer-src": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1657557289,
|
||||
"narHash": "sha256-PRW+nUwuqNTRAEa83SfX+7g+g8nQ+2MMbasQ9nt6+UM=",
|
||||
"owner": "rust-lang",
|
||||
"repo": "rust-analyzer",
|
||||
"rev": "caf23f29144b371035b864a1017dbc32573ad56d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "rust-lang",
|
||||
"ref": "nightly",
|
||||
"repo": "rust-analyzer",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"rust-overlay": {
|
||||
"inputs": {
|
||||
"flake-utils": [
|
||||
"nil",
|
||||
"flake-utils"
|
||||
],
|
||||
"nixpkgs": [
|
||||
"nil",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1717035469,
|
||||
"narHash": "sha256-MzH+yjKULH3HCRj9QCTwBvqq4LZkR0ZqRE/QfGOGC2E=",
|
||||
"owner": "oxalica",
|
||||
"repo": "rust-overlay",
|
||||
"rev": "095702e63a40e86f339d11864da9dc965b70a01e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "oxalica",
|
||||
"repo": "rust-overlay",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"systems": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"systems_2": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"utils": {
|
||||
"inputs": {
|
||||
"systems": "systems_2"
|
||||
},
|
||||
"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"
|
||||
}
|
||||
},
|
||||
"yants": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs_3"
|
||||
"nixpkgs": "nixpkgs_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1686863218,
|
||||
|
|
|
|||
43
flake.nix
43
flake.nix
|
|
@ -3,42 +3,17 @@
|
|||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
utils.url = "github:numtide/flake-utils";
|
||||
nil.url = "github:oxalica/nil";
|
||||
yants.url = "github:divnix/yants";
|
||||
alejandra = {
|
||||
url = "github:kamadorueda/alejandra/3.0.0";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
flake-parts.url = "github:hercules-ci/flake-parts";
|
||||
};
|
||||
|
||||
outputs = {
|
||||
self,
|
||||
alejandra,
|
||||
nixpkgs,
|
||||
utils,
|
||||
yants,
|
||||
...
|
||||
} @ inputs: let
|
||||
inherit (builtins) readFile replaceStrings;
|
||||
fu = utils.lib;
|
||||
versionFile = replaceStrings ["\n"] [""] (readFile ./VERSION);
|
||||
version =
|
||||
if self.sourceInfo ? dirtyShortRev
|
||||
then "${versionFile}-${self.sourceInfo.dirtyShortRev}"
|
||||
else versionFile;
|
||||
outputs = {flake-parts, ...} @ inputs: let
|
||||
in (flake-parts.lib.mkFlake {inherit inputs;} {
|
||||
systems = ["x86_64-linux"];
|
||||
|
||||
forSystem = system: let
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
formatter = alejandra.defaultPackage.${system};
|
||||
inherit (inputs.nil.packages.${system}) nil;
|
||||
in {
|
||||
inherit formatter;
|
||||
devShells.default = import ./shell.nix {
|
||||
inherit pkgs nil formatter;
|
||||
};
|
||||
};
|
||||
in
|
||||
(fu.eachDefaultSystem forSystem)
|
||||
// {lib = import ./lib {inherit version yants;};};
|
||||
imports = [
|
||||
./dev
|
||||
./lib
|
||||
];
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,9 +1,19 @@
|
|||
{
|
||||
version,
|
||||
yants,
|
||||
self,
|
||||
inputs,
|
||||
...
|
||||
}: let
|
||||
types = import ./types.nix {inherit yants;};
|
||||
inherit (builtins) readFile replaceStrings;
|
||||
versionFile = replaceStrings ["\n"] [""] (readFile ../VERSION);
|
||||
version =
|
||||
if self.sourceInfo ? dirtyShortRev
|
||||
then "${versionFile}-${self.sourceInfo.dirtyShortRev}"
|
||||
else versionFile;
|
||||
|
||||
types = import ./types.nix {inherit (inputs) yants;};
|
||||
in {
|
||||
mkNeovimPkg = import ./mkNeovimPkg.nix {inherit version types;};
|
||||
mkPluginsFromInputs = import ./mkPluginsFromInputs.nix;
|
||||
flake.lib = {
|
||||
mkNeovimPkg = import ./mkNeovimPkg.nix {inherit version types;};
|
||||
mkPluginsFromInputs = import ./mkPluginsFromInputs.nix;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -106,10 +106,13 @@
|
|||
src,
|
||||
version,
|
||||
...
|
||||
}:
|
||||
}@opts:
|
||||
vimUtils.buildVimPlugin ({
|
||||
inherit src;
|
||||
}
|
||||
// (optionalAttrs (opts ? nvimRequireCheck) {
|
||||
inherit (opts) nvimRequireCheck;
|
||||
})
|
||||
// (optionalAttrs (isNull version) {
|
||||
name = "runtime";
|
||||
})
|
||||
|
|
@ -127,6 +130,7 @@
|
|||
root = ../.;
|
||||
fileset = ../lua/sloth-flake;
|
||||
};
|
||||
nvimRequireCheck = "sloth-flake";
|
||||
buildPhase = ''
|
||||
dir=lua/sloth-flake
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
in rec {
|
||||
# The runtime object
|
||||
runtimeType = with yants;
|
||||
struct "runtime" {
|
||||
openStruct "runtime" {
|
||||
# The version of the runtime
|
||||
version = option string;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue