2021-05-01 02:29:59 +02:00
|
|
|
{ stdenv, makeWrapper, neovim, neovim-qt-unwrapped }:
|
2015-11-06 10:46:12 +01:00
|
|
|
|
2019-01-05 13:51:05 +01:00
|
|
|
let
|
2021-03-07 21:03:44 +01:00
|
|
|
unwrapped = neovim-qt-unwrapped;
|
2019-01-05 13:51:05 +01:00
|
|
|
in
|
2021-03-07 21:03:44 +01:00
|
|
|
stdenv.mkDerivation {
|
|
|
|
pname = "neovim-qt";
|
|
|
|
version = unwrapped.version;
|
|
|
|
buildCommand = if stdenv.isDarwin then ''
|
|
|
|
mkdir -p $out/Applications
|
|
|
|
cp -r ${unwrapped}/bin/nvim-qt.app $out/Applications
|
|
|
|
|
|
|
|
chmod -R a+w $out/Applications/nvim-qt.app/Contents/MacOS
|
|
|
|
wrapProgram $out/Applications/nvim-qt.app/Contents/MacOS/nvim-qt \
|
|
|
|
--prefix PATH : ${neovim}/bin
|
|
|
|
'' else ''
|
|
|
|
makeWrapper ${unwrapped}/bin/nvim-qt $out/bin/nvim-qt \
|
|
|
|
--prefix PATH : ${neovim}/bin
|
|
|
|
|
|
|
|
# link .desktop file
|
|
|
|
mkdir -p $out/share/pixmaps
|
|
|
|
ln -s ${unwrapped}/share/applications $out/share/applications
|
2023-07-17 14:56:11 +02:00
|
|
|
ln -s ${unwrapped}/share/icons $out/share/icons
|
2021-03-07 21:03:44 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
preferLocalBuild = true;
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
makeWrapper
|
|
|
|
];
|
|
|
|
|
|
|
|
passthru = {
|
|
|
|
inherit unwrapped;
|
|
|
|
};
|
2019-01-05 13:51:05 +01:00
|
|
|
|
2021-03-07 21:03:44 +01:00
|
|
|
inherit (unwrapped) meta;
|
|
|
|
}
|