acl2.libipasir: switch to finalAttrs pattern, switch to SRI hash (#527655)

This commit is contained in:
7c6f434c
2026-06-12 12:00:37 +00:00
committed by GitHub
@@ -6,18 +6,18 @@
unzip,
}:
stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
pname = "libipasirglucose4";
# This library has no version number AFAICT (beyond generally being based on
# Glucose 4.x), but it was submitted to the 2017 SAT competition so let's use
# that as the version number, I guess.
version = "2017";
libname = pname + stdenv.hostPlatform.extensions.sharedLibrary;
libname = finalAttrs.pname + stdenv.hostPlatform.extensions.sharedLibrary;
src = fetchurl {
url = "https://baldur.iti.kit.edu/sat-competition-2017/solvers/incremental/glucose-ipasir.zip";
sha256 = "0xchgady9vwdh8frmc8swz6va53igp2wj1y9sshd0g7549n87wdj";
hash = "sha256-svGDbCLlPNCg1skHycV9cRS1zecasZodgo3v5Jt6kHU=";
};
nativeBuildInputs = [ unzip ];
@@ -29,13 +29,13 @@ stdenv.mkDerivation rec {
makeFlags = [ "CXX=${stdenv.cc.targetPrefix}c++" ];
postBuild = ''
$CXX -shared -o ${libname} \
${lib.optionalString (!stdenv.cc.isClang) "-Wl,-soname,${libname}"} \
$CXX -shared -o ${finalAttrs.libname} \
${lib.optionalString (!stdenv.cc.isClang) "-Wl,-soname,${finalAttrs.libname}"} \
ipasirglucoseglue.o libipasirglucose4.a
'';
installPhase = ''
install -D ${libname} $out/lib/${libname}
install -D ${finalAttrs.libname} $out/lib/${finalAttrs.libname}
'';
meta = {
@@ -44,4 +44,4 @@ stdenv.mkDerivation rec {
platforms = lib.platforms.unix;
maintainers = with lib.maintainers; [ kini ];
};
}
})