2021-10-28 06:52:43 +00:00
|
|
|
{ lib, stdenv
|
|
|
|
, build2
|
|
|
|
, fetchurl
|
|
|
|
, git
|
|
|
|
, libbpkg
|
|
|
|
, libbutl
|
|
|
|
, libodb
|
|
|
|
, libodb-sqlite
|
|
|
|
, openssl
|
|
|
|
, enableShared ? !stdenv.hostPlatform.isStatic
|
|
|
|
, enableStatic ? !enableShared
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "bpkg";
|
2022-10-30 15:09:59 +00:00
|
|
|
version = "0.15.0";
|
2021-10-28 06:52:43 +00:00
|
|
|
|
|
|
|
outputs = [ "out" "doc" "man" ];
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://pkg.cppget.org/1/alpha/build2/bpkg-${version}.tar.gz";
|
2022-10-30 15:09:59 +00:00
|
|
|
sha256 = "sha256-3F4Pv8YX++cNa6aKhPM67mrt/5oE1IeoZUSmljHqBfI=";
|
2021-10-28 06:52:43 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
strictDeps = true;
|
|
|
|
nativeBuildInputs = [
|
|
|
|
build2
|
|
|
|
];
|
|
|
|
buildInputs = [
|
2022-10-30 15:09:59 +00:00
|
|
|
build2
|
2021-10-28 06:52:43 +00:00
|
|
|
libbpkg
|
|
|
|
libbutl
|
|
|
|
libodb
|
|
|
|
libodb-sqlite
|
|
|
|
];
|
|
|
|
checkInputs = [
|
|
|
|
git
|
|
|
|
openssl
|
|
|
|
];
|
|
|
|
|
|
|
|
doCheck = !stdenv.isDarwin; # tests hang
|
|
|
|
|
|
|
|
# Failing test
|
|
|
|
postPatch = ''
|
|
|
|
rm tests/rep-create.testscript
|
|
|
|
'';
|
|
|
|
|
|
|
|
build2ConfigureFlags = [
|
|
|
|
"config.bin.lib=${build2.configSharedStatic enableShared enableStatic}"
|
|
|
|
];
|
|
|
|
|
2022-10-30 15:09:59 +00:00
|
|
|
postInstall = lib.optionalString stdenv.isDarwin ''
|
|
|
|
install_name_tool -add_rpath '${lib.getLib build2}/lib' "''${!outputBin}/bin/bpkg"
|
|
|
|
'';
|
|
|
|
|
2021-10-28 06:52:43 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "build2 package dependency manager";
|
|
|
|
# https://build2.org/bpkg/doc/bpkg.xhtml
|
|
|
|
longDescription = ''
|
|
|
|
The build2 package dependency manager is used to manipulate build
|
|
|
|
configurations, packages, and repositories.
|
|
|
|
'';
|
|
|
|
homepage = "https://build2.org/";
|
|
|
|
changelog = "https://git.build2.org/cgit/bpkg/tree/NEWS";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ r-burns ];
|
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
}
|