8 stdenv.mkDerivation rec {
10 version = "1.0.0--rc3";
12 src = fetchFromGitHub {
16 sha256 = "152gqnmr6wfmflf5l6447am4clmg3p69pvy3iw7yhaawjqa797sk";
20 # N.B. We need to create this file, otherwise it tries to use git to
21 # determine the package version, which we do not want.
22 echo "${version}" > .version-stamp
23 echo "${version}" > .commit-stamp
25 # N.B. We disable tests by force, since their build is broken.
26 sed -i '/add_subdirectory(tests)/d' ./CMakeLists.txt
28 # https://github.com/dcreager/libcork/issues/173
29 substituteInPlace cmake/FindCTargets.cmake \
30 --replace '\$'{exec_prefix}/'$'{CMAKE_INSTALL_LIBDIR} '$'{CMAKE_INSTALL_FULL_LIBDIR} \
31 --replace '\$'{prefix}/'$'{CMAKE_INSTALL_INCLUDEDIR} '$'{CMAKE_INSTALL_FULL_INCLUDEDIR} \
32 --replace '\$'{datarootdir}/'$'{base_docdir} '$'{CMAKE_INSTALL_FULL_DOCDIR}
35 nativeBuildInputs = [ cmake pkg-config ];
36 buildInputs = [ check ];
41 ln -s $out/lib/libcork.so $out/lib/libcork.so.1
45 homepage = "https://github.com/dcreager/libcork";
46 description = "Simple, easily embeddable cross-platform C library";
47 mainProgram = "cork-hash";
48 license = licenses.bsd3;
49 platforms = platforms.unix;
50 maintainers = with maintainers; [ lovesegfault ];