1 Context
I am trying to build nix expressions for two packages:
OSVR-Core
OSVR-Vive
I have successfully written (1); however, I am having a problem with (2). This is partially because in order to build (2), you need (1) as a dependency. But here's the problem: (2) tries to paste a file into (1).
2 Error Message
Here is the error message I'm getting when trying to build (2):
-- Installing: /nix/store/9y6p1npy94sbpb39l0rd8rgdhbknll6r-OSVR-Core/lib/osvr-plugins-0/com_osvr_Vive.so
CMake Error at cmake_install.cmake:50 (file):
file INSTALL cannot copy file
"/tmp/nix-build-OSVR-Core.drv-0/OSVR-Vive-e0ebcdb/build/nix/store/9y6p1npy94sbpb39l0rd8rgdhbknll6r-OSV
R-Core/lib/osvr-plugins-0/com_osvr_Vive.so"
to
"/nix/store/9y6p1npy94sbpb39l0rd8rgdhbknll6r-OSVR-Core/lib/osvr-plugins-0/com_osvr_Vive.so".
make: *** [Makefile:74: install] Error 1
builder for ‘/nix/store/cj1yzm9x1pdyzwd76dh7xn1vq6zvcnq2-OSVR-Core.drv’ failed with exit code 2
As you can see, OSVR-Vive
tries to paste a file into /nix/store/*-OSVR-Core/lib/osvr-plugins-0
, and fails.
3 Nix Expressions (in case relevant)
OSVR-Core.nix
{ pkgs, stdenv, fetchgit, cmake, jsoncpp, opencv, python27, libusb1, boost }:
stdenv.mkDerivation {
name = "OSVR-Core";
buildInputs = with pkgs; [ cmake
jsoncpp
opencv
python27
libusb1
boost
(callPackage ./libfunctionality.nix { })
];
src = fetchgit {
url = "https://github.com/OSVR/OSVR-Core.git";
rev = "95655d3174851670b85e9be8e8620ba28f9872f4";
sha256 = "16sbfv4fxcvxqhm81in8lkvjpfbiz312kh7pm4vipj7dja1fchy8";
deepClone = true; # git clone --recursive
};
}
OSVR-Vive.nix
{ pkgs, stdenv, fetchgit, cmake, eigen3_3, boost, jsoncpp }:
stdenv.mkDerivation {
name = "OSVR-Vive";
buildInputs = with pkgs; [ cmake
(callPackage ./libfunctionality.nix { })
(callPackage ./OSVR-Core.nix { })
eigen3_3
boost
jsoncpp
];
src = fetchgit {
url = "https://github.com/OSVR/OSVR-Vive.git";
rev = "e0ebcdbe2d065448fcebacc2828712a946695004";
#sha256 = "1cf90x2ddqgylh98ssigr5c86l8psa3q512rl933kpz93n2can5g";
sha256 = "1d10gp7xalqdclskxc804fp56gz3k1sqzzqbdm3y54iwshmahwfw";
deepClone = true; # git clone --recursive
};
}