-
-
Save jeaye/dae23eb434383d1e1a67bf93adb98a10 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
''; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
color_coded = buildVimPluginFrom2Nix { # created by nix#NixDerivation | |
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_39 | |
llvmPackages.clang.cc | |
]; | |
buildPhase = '' | |
patchShebangs . | |
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_39} $clang_version | |
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_SKIP_BUILD_RPATH=ON \ | |
-DCMAKE_INSTALL_INCLUDEDIR=$out/include -DCMAKE_INSTALL_LIBDIR=$out/lib \ | |
-DCMAKE_INSTALL_NAME_DIR=$out/lib -DCMAKE_INSTALL_PREFIX=$out \ | |
-DDOWNLOAD_CLANG=0 . | |
make install | |
''; | |
}; | |
# Fails to install, since `make install` is doing something different (likely some more cmake differences?) | |
# Install the project... | |
# -- Install configuration: "Release" | |
# CMake Error at cmake_install.cmake:50 (file): | |
# file INSTALL cannot find | |
# "/tmp/nix-build-vimplugin-color_coded-2017-10-30.drv-0/color_coded-cb356b0/color_coded.so". |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment