2021-05-03 20:48:10 +00:00
|
|
|
{ stdenv, makeWrapper, neovim, neovim-qt-unwrapped }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
let
|
2021-03-23 19:22:30 +00:00
|
|
|
unwrapped = neovim-qt-unwrapped;
|
2020-04-24 23:36:52 +00:00
|
|
|
in
|
2021-03-23 19:22:30 +00: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-08-04 22:07:22 +00:00
|
|
|
ln -s ${unwrapped}/share/icons $out/share/icons
|
2021-03-23 19:22:30 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
preferLocalBuild = true;
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
makeWrapper
|
|
|
|
];
|
|
|
|
|
|
|
|
passthru = {
|
|
|
|
inherit unwrapped;
|
|
|
|
};
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-03-23 19:22:30 +00:00
|
|
|
inherit (unwrapped) meta;
|
|
|
|
}
|