nixpkgs/pkgs/by-name/al/alt-ergo/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

61 lines
1.7 KiB
Nix

{ darwin, fetchurl, lib, ocamlPackages, stdenv }:
let
pname = "alt-ergo";
version = "2.6.0";
src = fetchurl {
url = "https://github.com/OCamlPro/alt-ergo/releases/download/v${version}/alt-ergo-${version}.tbz";
hash = "sha256-EmkxGvJSeKRmiSuoeMyIi6WfF39T3QPxKixiOwP8834=";
};
in
let alt-ergo-lib = ocamlPackages.buildDunePackage rec {
pname = "alt-ergo-lib";
inherit version src;
buildInputs = with ocamlPackages; [ ppx_blob ];
propagatedBuildInputs = with ocamlPackages; [
camlzip
dolmen_loop
dune-build-info
fmt
ocplib-simplex
ppx_deriving
seq
stdlib-shims
zarith
];
}; in
let alt-ergo-parsers = ocamlPackages.buildDunePackage rec {
pname = "alt-ergo-parsers";
inherit version src;
nativeBuildInputs = [ ocamlPackages.menhir ];
propagatedBuildInputs = [ alt-ergo-lib ] ++ (with ocamlPackages; [ psmt2-frontend ]);
}; in
ocamlPackages.buildDunePackage {
inherit pname version src;
nativeBuildInputs = [ ocamlPackages.menhir ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.sigtool ];
propagatedBuildInputs = [ alt-ergo-parsers ] ++ (with ocamlPackages; [ cmdliner dune-site ppxlib ]);
outputs = [ "bin" "out" ];
installPhase = ''
runHook preInstall
dune install --prefix $bin ${pname}
mkdir -p $out/lib/ocaml/${ocamlPackages.ocaml.version}/site-lib
mv $bin/lib/alt-ergo $out/lib/ocaml/${ocamlPackages.ocaml.version}/site-lib/
runHook postInstall
'';
meta = {
description = "High-performance theorem prover and SMT solver";
homepage = "https://alt-ergo.ocamlpro.com/";
license = lib.licenses.ocamlpro_nc;
maintainers = [ lib.maintainers.thoughtpolice ];
};
}