Skip to content

Commit

Permalink
feat: add buildOverrides, and initial moveline-nvim build step
Browse files Browse the repository at this point in the history
  • Loading branch information
redxtech committed Aug 11, 2024
1 parent 4a812c5 commit ba0eb67
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 2 deletions.
2 changes: 1 addition & 1 deletion overlay.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ prev.lib.composeManyExtensions [
in {
vimExtraPlugins = final.lib.makeExtensible (_: final.lib.recurseIntoAttrs origin);
})
# (import ./overrides.nix)
(import ./overrides.nix)
] final prev
29 changes: 28 additions & 1 deletion overrides.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ final: prev:

let
inherit (final) lib;
inherit (final.pkgs) fetchFromGitHub rustPlatform;

/*
* Mark broken packages here.
Expand Down Expand Up @@ -80,6 +81,31 @@ let
vim-textobj-parameter = [ mit ];
});

/*
* Add build step overrides here.
*/
buildOverrides = self: super: {
moveline-nvim = super.moveline-nvim.overrideAttrs (old: {
preInstall = let
src = fetchFromGitHub {
owner = "redxtech";
repo = "moveline.nvim";
rev = "9f67f4b9e752a87eea8205f0279f261a16c733d8";
hash = "sha256-B4t5+Q4Urx5bGm8glNpYkHhpp/rAhz+lDd2EpWFUYoY=";
};
moveline-lib = rustPlatform.buildRustPackage {
inherit src;
inherit (old) version;
pname = "moveline-lib";
cargoHash = "sha256-mA17kKigR5CaZoFY/Do7kJmQCxU8+JJY0uB6FvSM+7I=";
};
in ''
mkdir -p lua
ln -s ${moveline-lib}/lib/libmoveline.so lua/moveline.so
'';
});
};

# /*
# * Add dependencies to vim plugins if missing or incorrect in generated ./pkgs/vim-plugins.nix.
# */
Expand Down Expand Up @@ -240,7 +266,8 @@ in
vimExtraPlugins = prev.vimExtraPlugins.extend (lib.composeManyExtensions [
markBrokenPackages
fixLicenses
fixDependencies
buildOverrides
# fixDependencies
# onceHereButNowOfficiallyMaintainedPlugins
otherOverrides
]);
Expand Down

0 comments on commit ba0eb67

Please sign in to comment.