Files
nixpkgs/pkgs/applications/editors/vim/plugins/non-generated/moveline-nvim/default.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

55 lines
1.3 KiB
Nix

{
lib,
fetchFromGitHub,
rustPlatform,
vimUtils,
stdenv,
}:
let
version = "0.3.1-unstable-2023-07-06";
src = fetchFromGitHub {
owner = "willothy";
repo = "moveline.nvim";
rev = "570603637be8af20e97b91cf554fef29cab73ca6";
hash = "sha256-hq/n48JC1EgJbmb6b/1jQ8MNhbcsJD3wIYaKE1UiU30=";
};
moveline-lib = rustPlatform.buildRustPackage {
inherit src version;
pname = "moveline-lib";
# Upstream doesn't contain a cargo lock
cargoLock = {
lockFile = ./Cargo.lock;
};
postPatch = ''
ln -s ${./Cargo.lock} Cargo.lock
'';
};
in
vimUtils.buildVimPlugin {
inherit src version;
pname = "moveline-nvim";
preInstall =
# https://github.com/neovim/neovim/issues/21749
# Need to still copy generated library as `so` because neovim doesn't check for `dylib`
let
ext = stdenv.hostPlatform.extensions.sharedLibrary;
in
''
mkdir -p lua
ln -s ${moveline-lib}/lib/libmoveline${ext} lua/moveline.so
'';
# Plugin generates a non lua file output that needs to be manually required
nvimRequireCheck = "moveline";
meta = {
description = "Neovim plugin for moving lines up and down";
homepage = "https://github.com/willothy/moveline.nvim";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ redxtech ];
};
}