Compare commits
No commits in common. "dev" and "main" have entirely different histories.
20
LICENSE.md
20
LICENSE.md
|
|
@ -1,20 +0,0 @@
|
||||||
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.
|
|
||||||
|
|
@ -1,6 +0,0 @@
|
||||||
{
|
|
||||||
imports = [
|
|
||||||
./formatter.nix
|
|
||||||
./shell.nix
|
|
||||||
];
|
|
||||||
}
|
|
||||||
|
|
@ -1,5 +0,0 @@
|
||||||
{
|
|
||||||
perSystem = {pkgs, ...}: {
|
|
||||||
formatter = pkgs.alejandra;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
||||||
{
|
|
||||||
perSystem = {pkgs, ...}: {
|
|
||||||
devShells.default = pkgs.mkShell {
|
|
||||||
buildInputs = with pkgs; [
|
|
||||||
alejandra
|
|
||||||
git-cliff
|
|
||||||
nil
|
|
||||||
sumneko-lua-language-server
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
236
flake.lock
236
flake.lock
|
|
@ -1,30 +1,127 @@
|
||||||
{
|
{
|
||||||
"nodes": {
|
"nodes": {
|
||||||
"flake-parts": {
|
"alejandra": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs-lib": "nixpkgs-lib"
|
"fenix": "fenix",
|
||||||
|
"flakeCompat": "flakeCompat",
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1759362264,
|
"lastModified": 1660592437,
|
||||||
"narHash": "sha256-wfG0S7pltlYyZTM+qqlhJ7GMw2fTF4mLKCIVhLii/4M=",
|
"narHash": "sha256-xFumnivtVwu5fFBOrTxrv6fv3geHKF04RGP23EsDVaI=",
|
||||||
"owner": "hercules-ci",
|
"owner": "kamadorueda",
|
||||||
"repo": "flake-parts",
|
"repo": "alejandra",
|
||||||
"rev": "758cf7296bee11f1706a574c77d072b8a7baa881",
|
"rev": "e7eac49074b70814b542fee987af2987dd0520b5",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "hercules-ci",
|
"owner": "kamadorueda",
|
||||||
"repo": "flake-parts",
|
"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",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1759381078,
|
"lastModified": 1716977081,
|
||||||
"narHash": "sha256-gTrEEp5gEspIcCOx9PD8kMaF1iEmfBcTbO0Jag2QhQs=",
|
"narHash": "sha256-pFe5jLeIPlKEln5n2h998d7cpzXFdbrBMRe3suz4K1o=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "7df7ff7d8e00218376575f0acdcc5d66741351ee",
|
"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",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -34,22 +131,7 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs-lib": {
|
"nixpkgs_3": {
|
||||||
"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": {
|
"locked": {
|
||||||
"lastModified": 1660438583,
|
"lastModified": 1660438583,
|
||||||
"narHash": "sha256-rJUTYxFKlWUJI3njAwEc1pKAVooAViZGJvsgqfh/q/E=",
|
"narHash": "sha256-rJUTYxFKlWUJI3njAwEc1pKAVooAViZGJvsgqfh/q/E=",
|
||||||
|
|
@ -66,14 +148,106 @@
|
||||||
},
|
},
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-parts": "flake-parts",
|
"alejandra": "alejandra",
|
||||||
"nixpkgs": "nixpkgs",
|
"nil": "nil",
|
||||||
|
"nixpkgs": "nixpkgs_2",
|
||||||
|
"utils": "utils",
|
||||||
"yants": "yants"
|
"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": {
|
"yants": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": "nixpkgs_2"
|
"nixpkgs": "nixpkgs_3"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1686863218,
|
"lastModified": 1686863218,
|
||||||
|
|
|
||||||
43
flake.nix
43
flake.nix
|
|
@ -3,17 +3,42 @@
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||||
|
utils.url = "github:numtide/flake-utils";
|
||||||
|
nil.url = "github:oxalica/nil";
|
||||||
yants.url = "github:divnix/yants";
|
yants.url = "github:divnix/yants";
|
||||||
flake-parts.url = "github:hercules-ci/flake-parts";
|
alejandra = {
|
||||||
|
url = "github:kamadorueda/alejandra/3.0.0";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = {flake-parts, ...} @ inputs: let
|
outputs = {
|
||||||
in (flake-parts.lib.mkFlake {inherit inputs;} {
|
self,
|
||||||
systems = ["x86_64-linux"];
|
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;
|
||||||
|
|
||||||
imports = [
|
forSystem = system: let
|
||||||
./dev
|
pkgs = nixpkgs.legacyPackages.${system};
|
||||||
./lib
|
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;};};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,19 +1,9 @@
|
||||||
{
|
{
|
||||||
self,
|
version,
|
||||||
inputs,
|
yants,
|
||||||
...
|
|
||||||
}: let
|
}: let
|
||||||
inherit (builtins) readFile replaceStrings;
|
types = import ./types.nix {inherit yants;};
|
||||||
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 {
|
in {
|
||||||
flake.lib = {
|
mkNeovimPkg = import ./mkNeovimPkg.nix {inherit version types;};
|
||||||
mkNeovimPkg = import ./mkNeovimPkg.nix {inherit version types;};
|
mkPluginsFromInputs = import ./mkPluginsFromInputs.nix;
|
||||||
mkPluginsFromInputs = import ./mkPluginsFromInputs.nix;
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -106,13 +106,10 @@
|
||||||
src,
|
src,
|
||||||
version,
|
version,
|
||||||
...
|
...
|
||||||
}@opts:
|
}:
|
||||||
vimUtils.buildVimPlugin ({
|
vimUtils.buildVimPlugin ({
|
||||||
inherit src;
|
inherit src;
|
||||||
}
|
}
|
||||||
// (optionalAttrs (opts ? nvimRequireCheck) {
|
|
||||||
inherit (opts) nvimRequireCheck;
|
|
||||||
})
|
|
||||||
// (optionalAttrs (isNull version) {
|
// (optionalAttrs (isNull version) {
|
||||||
name = "runtime";
|
name = "runtime";
|
||||||
})
|
})
|
||||||
|
|
@ -130,7 +127,6 @@
|
||||||
root = ../.;
|
root = ../.;
|
||||||
fileset = ../lua/sloth-flake;
|
fileset = ../lua/sloth-flake;
|
||||||
};
|
};
|
||||||
nvimRequireCheck = "sloth-flake";
|
|
||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
dir=lua/sloth-flake
|
dir=lua/sloth-flake
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@
|
||||||
in rec {
|
in rec {
|
||||||
# The runtime object
|
# The runtime object
|
||||||
runtimeType = with yants;
|
runtimeType = with yants;
|
||||||
openStruct "runtime" {
|
struct "runtime" {
|
||||||
# The version of the runtime
|
# The version of the runtime
|
||||||
version = option string;
|
version = option string;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue