Files
nixpkgs/pkgs/by-name/al/alive2/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

74 lines
1.3 KiB
Nix

{
lib,
clangStdenv,
fetchFromGitHub,
re2c,
z3,
hiredis,
llvm,
cmake,
ninja,
nix-update-script,
}:
clangStdenv.mkDerivation (finalAttrs: {
pname = "alive2";
version = "21.0";
src = fetchFromGitHub {
owner = "AliveToolkit";
repo = "alive2";
tag = "v${finalAttrs.version}";
hash = "sha256-LL6/Epn6iHQJGKb8PX+U6zvXK/WTlvOIJPr6JuGRsSU=";
};
nativeBuildInputs = [
cmake
ninja
re2c
];
buildInputs = [
z3
hiredis
llvm
];
strictDeps = true;
postPatch = ''
substituteInPlace CMakeLists.txt \
--replace-fail '-Werror' "" \
--replace-fail 'find_package(Git REQUIRED)' ""
'';
env = {
ALIVE2_HOME = "$PWD";
LLVM2_HOME = "${llvm}";
LLVM2_BUILD = "$LLVM2_HOME/build";
};
preBuild = ''
mkdir -p build
'';
installPhase = ''
runHook preInstall
mkdir -p $out/bin
cp alive $out/bin/
cp alive-jobserver $out/bin/
rm -rf $out/bin/CMakeFiles $out/bin/*.o
runHook postInstall
'';
passthru.updateScript = nix-update-script { };
meta = {
description = "Automatic verification of LLVM optimizations";
homepage = "https://github.com/AliveToolkit/alive2";
license = lib.licenses.mit;
platforms = lib.platforms.all;
maintainers = with lib.maintainers; [ shogo ];
teams = [ lib.teams.ngi ];
mainProgram = "alive";
};
})