nixpkgs/pkgs/development/tools/poac/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

104 lines
2.4 KiB
Nix
Raw Normal View History

2022-07-24 22:53:54 +00:00
{ lib
, stdenv
, fetchFromGitHub
, cmake
, cpm-cmake
, git
2022-12-19 09:09:50 +00:00
, git2-cpp
2022-07-24 22:53:54 +00:00
, cacert
, boost179
, icu
, libarchive
, libgit2
, lz4
2022-12-19 09:09:50 +00:00
, mitama-cpp-result
2022-07-24 22:53:54 +00:00
, ninja
, openssl_3
2022-12-19 09:09:50 +00:00
, package-project-cmake
2022-07-24 22:53:54 +00:00
, spdlog
}:
let
glob = fetchFromGitHub {
owner = "p-ranav";
repo = "glob";
rev = "v0.0.1";
sha256 = "sha256-2y+a7YFBiYX8wbwCCWw1Cm+SFoXGB3ZxLPi/QdZhcdw=";
};
structopt = fetchFromGitHub {
owner = "p-ranav";
repo = "structopt";
rev = "e9722d3c2b52cf751ebc1911b93d9649c4e365cc";
sha256 = "sha256-jIfKUyY2QQ2/donywwlz65PY8u7xODGoG6SlNtUhwkg=";
};
toml11 = fetchFromGitHub {
owner = "ToruNiina";
repo = "toml11";
rev = "9086b1114f39a8fb10d08ca704771c2f9f247d02";
sha256 = "sha256-fHUElHO4ckNQq7Q88GdbHGxfaAvWoWtGB0eD9y2MnLo=";
};
in
stdenv.mkDerivation rec {
pname = "poac";
2022-12-19 09:09:50 +00:00
version = "0.5.1";
2022-07-24 22:53:54 +00:00
src = fetchFromGitHub {
owner = "poacpm";
repo = pname;
rev = version;
2022-12-19 09:09:50 +00:00
sha256 = "sha256-JgGa7lomDvZG5HLxGJMALcezjnZprexJDTxyTUjLetg=";
2022-07-24 22:53:54 +00:00
};
preConfigure = ''
mkdir -p ${placeholder "out"}/share/cpm
cp ${cpm-cmake}/share/cpm/CPM.cmake ${placeholder "out"}/share/cpm/CPM_0.35.1.cmake
'';
cmakeFlags = [
2022-12-19 09:09:50 +00:00
"-DPOAC_BUILD_TESTING=OFF"
2022-07-24 22:53:54 +00:00
"-DCPM_SOURCE_CACHE=${placeholder "out"}/share"
2022-12-19 09:09:50 +00:00
"-DFETCHCONTENT_SOURCE_DIR_GIT2-CPP=${git2-cpp.src}"
2022-07-24 22:53:54 +00:00
"-DFETCHCONTENT_SOURCE_DIR_GLOB=${glob}"
2022-12-19 09:09:50 +00:00
"-DFETCHCONTENT_SOURCE_DIR_PACKAGEPROJECT.CMAKE=${package-project-cmake.src}"
"-DFETCHCONTENT_SOURCE_DIR_MITAMA-CPP-RESULT=${mitama-cpp-result.src}"
2022-07-24 22:53:54 +00:00
"-DFETCHCONTENT_SOURCE_DIR_NINJA=${ninja.src}"
"-DFETCHCONTENT_SOURCE_DIR_STRUCTOPT=${structopt}"
"-DFETCHCONTENT_SOURCE_DIR_TOML11=${toml11}"
];
nativeBuildInputs = [ cmake git cacert ];
buildInputs = [
(boost179.override {
enableShared = stdenv.isDarwin;
enableStatic = !stdenv.isDarwin;
})
2022-12-19 09:09:50 +00:00
git2-cpp
2022-07-24 22:53:54 +00:00
glob
2022-12-19 09:09:50 +00:00
package-project-cmake
mitama-cpp-result
2022-07-24 22:53:54 +00:00
ninja
structopt
toml11
icu
libarchive
libgit2
lz4
openssl_3
spdlog
];
meta = with lib; {
homepage = "https://poac.pm";
description = "Package Manager for C++";
license = licenses.asl20;
maintainers = with maintainers; [ ken-matsui ];
platforms = platforms.unix;
# https://github.com/NixOS/nixpkgs/pull/189712#issuecomment-1237791234
broken = (stdenv.isLinux && stdenv.isAarch64)
# error: excess elements in scalar initializer on std::aligned_alloc
|| (stdenv.isDarwin && stdenv.isx86_64);
};
}