feat: neoflake and runtime plugin have their version
parent
1984b03580
commit
5dcd85f006
10
flake.nix
10
flake.nix
|
|
@ -17,7 +17,13 @@
|
||||||
utils,
|
utils,
|
||||||
alejandra,
|
alejandra,
|
||||||
...
|
...
|
||||||
} @ inputs:
|
} @ inputs: let
|
||||||
|
versionFile = builtins.replaceStrings ["\n"] [""] (builtins.readFile ./VERSION);
|
||||||
|
|
||||||
|
version = if self.sourceInfo ? dirtyShortRev
|
||||||
|
then "${versionFile}-${self.sourceInfo.dirtyShortRev}"
|
||||||
|
else versionFile;
|
||||||
|
in
|
||||||
utils.lib.mkFlake {
|
utils.lib.mkFlake {
|
||||||
inherit self inputs;
|
inherit self inputs;
|
||||||
outputsBuilder = channel: let
|
outputsBuilder = channel: let
|
||||||
|
|
@ -30,6 +36,6 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
lib = import ./lib.nix;
|
lib = import ./lib.nix {inherit version;};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
24
lib.nix
24
lib.nix
|
|
@ -1,4 +1,4 @@
|
||||||
{
|
{version}: {
|
||||||
mkNeovimPkg = {
|
mkNeovimPkg = {
|
||||||
pkgs,
|
pkgs,
|
||||||
package ? pkgs.neovim-unwrapped,
|
package ? pkgs.neovim-unwrapped,
|
||||||
|
|
@ -13,7 +13,7 @@
|
||||||
inherit (pkgs) lib vimUtils;
|
inherit (pkgs) lib vimUtils;
|
||||||
callPackage = lib.callPackageWith (pkgs // dependenciesExtraArgs);
|
callPackage = lib.callPackageWith (pkgs // dependenciesExtraArgs);
|
||||||
inherit (lib.lists) concatMap filter foldl' map optional reverseList;
|
inherit (lib.lists) concatMap filter foldl' map optional reverseList;
|
||||||
inherit (lib.attrsets) attrNames;
|
inherit (lib.attrsets) attrNames optionalAttrs;
|
||||||
inherit (lib.strings) concatStringsSep fileContents hasSuffix removePrefix removeSuffix replaceStrings;
|
inherit (lib.strings) concatStringsSep fileContents hasSuffix removePrefix removeSuffix replaceStrings;
|
||||||
inherit (lib.sources) sourceByRegex;
|
inherit (lib.sources) sourceByRegex;
|
||||||
# inherit (lib.debug) traceIf traceSeq traceVal traceValSeq traceValFn;
|
# inherit (lib.debug) traceIf traceSeq traceVal traceValSeq traceValFn;
|
||||||
|
|
@ -77,9 +77,9 @@
|
||||||
concatStringsSep "\n"
|
concatStringsSep "\n"
|
||||||
(concatMap (getLua type) plugins);
|
(concatMap (getLua type) plugins);
|
||||||
|
|
||||||
neoflake.plugin = vimUtils.buildVimPlugin rec {
|
neoflake.plugin = vimUtils.buildVimPlugin {
|
||||||
name = "neoflake";
|
inherit version;
|
||||||
pname = name;
|
pname = "neoflake";
|
||||||
src = ./lua/neoflake;
|
src = ./lua/neoflake;
|
||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
dir=lua/neoflake
|
dir=lua/neoflake
|
||||||
|
|
@ -100,10 +100,16 @@
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
runtimePlugin.plugin = {
|
runtimePlugin.plugin = vimUtils.buildVimPlugin ({
|
||||||
name = "runtime";
|
inherit (runtime) src;
|
||||||
src = runtime.src;
|
}
|
||||||
};
|
// (optionalAttrs (isNull runtime.version) {
|
||||||
|
name = "runtime";
|
||||||
|
})
|
||||||
|
// (optionalAttrs (! isNull runtime.version) {
|
||||||
|
inherit (runtime) version;
|
||||||
|
pname = "runtime";
|
||||||
|
}));
|
||||||
|
|
||||||
plugins = normalizePlugins (dependencies ++ [runtimePlugin neoflake]);
|
plugins = normalizePlugins (dependencies ++ [runtimePlugin neoflake]);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue