New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
color_coded: init at 2017-10-30 #33060
Conversation
pkgs/misc/vim-plugins/default.nix
Outdated
sha256 = "0l46ar1b3vy7gbrq2ic734vvw7zcvw6ar78zyhwz55h2lxfh89aq"; | ||
}; | ||
dependencies = []; | ||
buildInputs = [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file is generated, the custom part belongs in additional-nix-code/color_coded
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried that initially and found that my additional-nix-code/color_coded
wasn't being used at all; didn't find any further documentation and I see other plugins in default.nix
are specifying their build inputs, so I went ahead with it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's used when updating all of the plugins, vim-plugin-names-to-nix
generates the part until dependencies = [];
and appends the custom snippet afterwards.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I see the benefit of separating the build bits, since they likely don't change with the auto-generated bits. It's the way that it is because additional-nix-code/color_coded
didn't work for me and I didn't find any more docs or support elsewhere. If you have any more info, I can try to apply that. If it should just work then maybe I need to try it again.
pkgs/misc/vim-plugins/default.nix
Outdated
clang_version=$(clang --version | head -1 | sed 's/clang version \(\S\+\).*/\1/') | ||
. ./lib/generate_sources ${llvm_39} $clang_version | ||
|
||
cmake -DDOWNLOAD_CLANG=0 . |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I remember you asking about this in irc, could you link the mkDerivation
that did work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
with import <nixpkgs> {};
stdenv.mkDerivation {
name = "color_coded-2017-10-30";
src = fetchgit {
url = "https://github.com/jeaye/color_coded";
rev = "cb356b083362ea6f15bc690c5eb10b01326ad169";
sha256 = "0l46ar1b3vy7gbrq2ic734vvw7zcvw6ar78zyhwz55h2lxfh89aq";
};
dependencies = [];
buildInputs = [
stdenv
cmake
lua
ncurses
zlib
llvm
llvmPackages.clang.cc
];
cmakeFlags = [ "-DDOWNLOAD_CLANG=0" ];
preConfigure = ''
sed -i "s/add_dependencies(\S\+ \S\+_track_api)//" CMakeLists.txt
clang_version=$(clang --version | head -1 | sed 's/clang version \(\S\+\).*/\1/')
. ./lib/generate_sources ${llvm} $clang_version
'';
buildPhase = ''
patchShebangs .
make install
'';
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This fixes the issues with cmake #33203
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent. Thank you!
@GrahamcOfBorg build vimPlugins.color_coded |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Failure for system: x86_64-darwin
/nix/store/j3yfhwcz55i0yb8g5bnp40py9dzy9rf5-cmake-3.9.6/share/cmake-3.9/Modules/FindPackageHandleStandardArgs.cmake:377 (_FPHSA_FAILURE_MESSAGE)
/nix/store/j3yfhwcz55i0yb8g5bnp40py9dzy9rf5-cmake-3.9.6/share/cmake-3.9/Modules/FindThreads.cmake:212 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
CMakeLists.txt:50 (find_package)
-- Configuring incomplete, errors occurred!
See also "/tmp/nix-build-vimplugin-color_coded-2017-10-30.drv-0/color_coded-cb356b0/CMakeFiles/CMakeOutput.log".
See also "/tmp/nix-build-vimplugin-color_coded-2017-10-30.drv-0/color_coded-cb356b0/CMakeFiles/CMakeError.log".
builder for ‘/nix/store/mkkabx30riyr1xhbiz1irg132q9bfbq6-vimplugin-color_coded-2017-10-30.drv’ failed with exit code 1
error: build of ‘/nix/store/mkkabx30riyr1xhbiz1irg132q9bfbq6-vimplugin-color_coded-2017-10-30.drv’ failed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Success for system: x86_64-linux
wrong ELF type
wrong ELF type
wrong ELF type
wrong ELF type
wrong ELF type
wrong ELF type
wrong ELF type
wrong ELF type
wrong ELF type
/nix/store/xzvkzh9ryvkrj1mambqg8fyp02pzvzr8-vimplugin-color_coded-2017-10-30
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Success for system: aarch64-linux
wrong ELF type
wrong ELF type
wrong ELF type
wrong ELF type
wrong ELF type
wrong ELF type
wrong ELF type
wrong ELF type
wrong ELF type
/nix/store/pz1dfgzi6z5a4354qnkvgsfiivjpz86d-vimplugin-color_coded-2017-10-30
pkgs/misc/vim-plugins/default.nix
Outdated
ncurses | ||
zlib | ||
llvm_39 | ||
llvmPackages.clang.cc |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this might be causing the darwin failure, since the stdenv there already uses clang.
@GrahamcOfBorg build vimPlugins.color_coded |
1 similar comment
@GrahamcOfBorg build vimPlugins.color_coded |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Success for system: x86_64-darwin
[ 84%] Linking CXX executable color_coded_config_test
[ 84%] Built target color_coded_config_test
Scanning dependencies of target color_coded
[ 92%] Building CXX object CMakeFiles/color_coded.dir/src/main.cpp.o
[100%] Linking CXX shared library color_coded.so
[100%] Built target color_coded
installing
post-installation fixup
patching script interpreter paths in /nix/store/zrsnci01sln8f8zbiqacwwkfz107xxc4-vimplugin-color_coded-2017-10-30
/nix/store/zrsnci01sln8f8zbiqacwwkfz107xxc4-vimplugin-color_coded-2017-10-30
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Success for system: x86_64-linux
wrong ELF type
wrong ELF type
wrong ELF type
wrong ELF type
wrong ELF type
wrong ELF type
wrong ELF type
wrong ELF type
wrong ELF type
/nix/store/dy7ip4i5jbvxivya3mippzywdkah3bhz-vimplugin-color_coded-2017-10-30
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Success for system: aarch64-linux
wrong ELF type
wrong ELF type
wrong ELF type
wrong ELF type
wrong ELF type
wrong ELF type
wrong ELF type
wrong ELF type
wrong ELF type
/nix/store/gfndqcxlm6w907zx15zz3jlm5rd2kani-vimplugin-color_coded-2017-10-30
I've simplified this as much as possible and it builds on all platforms. Let me know if anything else is neeed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good now, could you squash the commits?
pkgs/misc/vim-plugins/default.nix
Outdated
}; | ||
dependencies = []; | ||
buildInputs = [ | ||
stdenv |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you don't need to add stdenv here, also nativeBuildInputs is more correct for cmake.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll remove stdenv, move cmake to nativeBuildInputs, and squash the commits tonight.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did this ever happen?
pkgs/misc/vim-plugins/default.nix
Outdated
@@ -4,6 +4,7 @@ | |||
, xkb_switch, rustracerd, fzf, skim | |||
, python3, boost, icu, ncurses | |||
, ycmd, makeWrapper, rake | |||
, lua51Packages, ncurses, zlib, llvm_39 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like meanwhile ncurses
was already added to the inputs for something else.
@LnL7 Good catch. Removed the extra |
@GrahamcOfBorg build vimPlugins.color_coded |
Failure on x86_64-darwin (full log) Attempted: vimPlugins.color_coded Partial log (click to expand)
|
Failure on x86_64-linux (full log) Attempted: vimPlugins.color_coded Partial log (click to expand)
|
Failure on aarch64-linux (full log) Attempted: vimPlugins.color_coded Partial log (click to expand)
|
Any ideas about the build failures? It worked at some point. |
The source hasn't changed and I'm specifically using Is there a better way to get access to the clang libs? |
Any updates on this pull request, please? |
Thank you for your contributions.
|
I marked this as stale due to inactivity. → More info |
If you're still interested in pushing this into nixpkgs, I'd suggest you re-submit. Since there hasn't been any activity for so long, I feel like it's best to close it. Please feel free to reopen if you'd like. |
Motivation for this change
It's a popular vim plugin which I'd like to have on my NixOS machines.
Things done
build-use-sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)This is a bit messier than it would be with
mkDerivation
, but I've found thatbuildVimPluginFrom2Nix
doesn't seem to have very good CMake support.