diff --git a/pkgs/applications/science/logic/yices/default.nix b/pkgs/applications/science/logic/yices/default.nix index c5fc3a738373..c81d5a9ca618 100644 --- a/pkgs/applications/science/logic/yices/default.nix +++ b/pkgs/applications/science/logic/yices/default.nix @@ -12,6 +12,12 @@ stdenv.mkDerivation rec { sha256 = "1jx3854zxvfhxrdshbipxfgyq1yxb9ll9agjc2n0cj4vxkjyh9mn"; }; + patches = [ + # musl las no ldconfig, create symlinks explicitly + ./linux-no-ldconfig.patch + ]; + postPatch = "patchShebangs tests/regress/check.sh"; + nativeBuildInputs = [ autoreconfHook ]; buildInputs = [ cudd gmp-static gperf libpoly ]; configureFlags = @@ -23,22 +29,6 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; doCheck = true; - # Usual shenanigans - patchPhase = "patchShebangs tests/regress/check.sh"; - - # Includes a fix for the embedded soname being libyices.so.X.Y, but - # only installing the libyices.so.X.Y.Z file. - installPhase = let - ver_XdotY = lib.versions.majorMinor version; - in '' - make install LDCONFIG=true - # guard against packaging of unstable versions: they - # have a soname of hext (not current) release. - echo "Checking expected library version to be ${version}" - [ -f $out/lib/libyices.so.${version} ] - ln -sfr $out/lib/libyices.so.{${version},${ver_XdotY}} - ''; - meta = with lib; { description = "A high-performance theorem prover and SMT solver"; homepage = "http://yices.csl.sri.com"; diff --git a/pkgs/applications/science/logic/yices/linux-no-ldconfig.patch b/pkgs/applications/science/logic/yices/linux-no-ldconfig.patch new file mode 100644 index 000000000000..bad3da6ad4a2 --- /dev/null +++ b/pkgs/applications/science/logic/yices/linux-no-ldconfig.patch @@ -0,0 +1,13 @@ +--- a/Makefile.build ++++ b/Makefile.build +@@ -474,8 +474,9 @@ install-darwin: install-default + install-solaris: install-default + $(LDCONFIG) -n $(DESTDIR)$(libdir) && (cd $(DESTDIR)$(libdir) && $(LN_S) -f libyices.so.$(YICES_VERSION) libyices.so) + ++# avoid ldconfig as it's not present on musl + install-linux install-unix: install-default +- $(LDCONFIG) -n $(DESTDIR)$(libdir) && (cd $(DESTDIR)$(libdir) && $(LN_S) -f libyices.so.$(YICES_VERSION) libyices.so) ++ (cd $(DESTDIR)$(libdir) && $(LN_S) -f libyices.so.$(YICES_VERSION) libyices.so.$(MAJOR).$(MINOR) && $(LN_S) -f libyices.so.$(MAJOR).$(MINOR) libyices.so) + + # on FreeBSD: the library file is libyices.so.X.Y and ldconfig does not take -n + # TODO: fix this. We must also create a symbolic link: libyices.so.X in libdir