mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-21 04:13:12 +00:00
571c71e6f7
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.
52 lines
1.4 KiB
Nix
52 lines
1.4 KiB
Nix
{ lib, stdenv, cmake, fetchFromGitHub, fetchpatch, fixDarwinDylibNames }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "btor2tools";
|
|
version = "unstable-2024-08-07";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "boolector";
|
|
repo = "btor2tools";
|
|
rev = "44bcadbfede292ff4c4a4a8962cc18130de522fb";
|
|
sha256 = "0ncl4xwms8d656x95ga8v8zjybx4cmdl5hlcml7dpcgm3p8qj4ks";
|
|
};
|
|
|
|
nativeBuildInputs = [ cmake ] ++ lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames;
|
|
|
|
installPhase = ''
|
|
mkdir -p $out $dev/include/btor2parser/ $lib/lib
|
|
|
|
cp -vr bin $out
|
|
cp -v ../src/btor2parser/btor2parser.h $dev/include/btor2parser
|
|
cp -v lib/libbtor2parser.* $lib/lib
|
|
'';
|
|
|
|
doInstallCheck = true;
|
|
|
|
installCheckPhase = ''
|
|
runHook preInstallCheck
|
|
|
|
# make sure shared libraries are present and program can be executed
|
|
$out/bin/btorsim -h > /dev/null
|
|
|
|
runHook postInstallCheck
|
|
'';
|
|
|
|
outputs = [ "out" "dev" "lib" ];
|
|
|
|
cmakeFlags = [
|
|
# RPATH of binary /nix/store/.../bin/btorsim contains a forbidden reference to /build/
|
|
"-DCMAKE_SKIP_BUILD_RPATH=ON"
|
|
] ++ lib.optionals stdenv.hostPlatform.isDarwin [
|
|
"-DCMAKE_BUILD_WITH_INSTALL_NAME_DIR=ON"
|
|
];
|
|
|
|
meta = with lib; {
|
|
description = "Generic parser and tool package for the BTOR2 format";
|
|
homepage = "https://github.com/Boolector/btor2tools";
|
|
license = licenses.mit;
|
|
platforms = platforms.unix;
|
|
maintainers = with maintainers; [ thoughtpolice ];
|
|
};
|
|
}
|