1 { lib, stdenv, fetchFromGitHub, copyPkgconfigItems, makePkgconfigItem
5 stdenv.mkDerivation rec {
9 src = fetchFromGitHub {
12 rev = "rel-${version}";
14 "2.1.0" = "sha256-sSvJgHxsRaJ/xHEK32fox0MFI7u+pj5ERLfNn2s8kC8=";
15 "2.0.0" = "sha256-qoeEM9SdpuFuBPeQlCzuhPLcJ+bMQkTUTGiT8QdU8rc=";
19 outputs = [ "out" "dev" "lib" ];
22 nativeBuildInputs = [ copyPkgconfigItems ];
28 cflags = [ "-I\${includedir}" ];
29 libs = [ "-L\${libdir}" "-lcadical" ];
31 includedir = "@includedir@";
34 inherit (meta) description;
39 # copyPkgconfigItems will substitute these in the pkg-config file
40 includedir = "${placeholder "dev"}/include";
41 libdir = "${placeholder "lib"}/lib";
44 enableParallelBuilding = true;
48 substituteInPlace makefile.in --replace-fail "ar rc" '$(AR) rc'
51 # the configure script is not generated by autotools and does not accept the
52 # arguments that the default configurePhase passes like --prefix and --libdir
64 install -Dm0755 build/cadical "$out/bin/cadical"
65 install -Dm0755 build/mobical "$out/bin/mobical"
66 install -Dm0644 src/ccadical.h "$dev/include/ccadical.h"
67 install -Dm0644 src/cadical.hpp "$dev/include/cadical.hpp"
68 install -Dm0644 build/libcadical.a "$lib/lib/libcadical.a"
69 mkdir -p "$out/share/doc/${pname}/"
70 install -Dm0755 {LICEN?E,README*,VERSION} "$out/share/doc/${pname}/"
76 description = "Simplified Satisfiability Solver";
77 maintainers = with maintainers; [ shnarazk ];
78 platforms = platforms.unix;
79 license = licenses.mit;
80 homepage = "https://fmv.jku.at/cadical/";