mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-23 07:23:20 +00:00
75 lines
1.3 KiB
Nix
75 lines
1.3 KiB
Nix
{ lib
|
|
, stdenv
|
|
, fetchFromGitHub
|
|
, cacert
|
|
, cmake
|
|
, cmakerc
|
|
, fmt
|
|
, git
|
|
, gzip
|
|
, makeWrapper
|
|
, meson
|
|
, ninja
|
|
, openssh
|
|
, python3
|
|
, zip
|
|
, zstd
|
|
, extraRuntimeDeps ? []
|
|
}:
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
pname = "vcpkg-tool";
|
|
version = "2024-04-23";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "microsoft";
|
|
repo = "vcpkg-tool";
|
|
rev = finalAttrs.version;
|
|
hash = "sha256-PqmkQcpxuYJGZJs2qemv0hshvO4KTiKc1ZY0//Gq0pY=";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
cmake
|
|
cmakerc
|
|
fmt
|
|
ninja
|
|
makeWrapper
|
|
];
|
|
|
|
patches = [
|
|
./change-lock-location.patch
|
|
];
|
|
|
|
cmakeFlags = [
|
|
"-DVCPKG_DEPENDENCY_EXTERNAL_FMT=ON"
|
|
"-DVCPKG_DEPENDENCY_CMAKERC=ON"
|
|
];
|
|
|
|
postFixup = let
|
|
# These are the most common binaries used by vcpkg
|
|
# Extra binaries can be added via overlay when needed
|
|
runtimeDeps = [
|
|
cacert
|
|
cmake
|
|
git
|
|
gzip
|
|
meson
|
|
ninja
|
|
openssh
|
|
python3
|
|
zip
|
|
zstd
|
|
] ++ extraRuntimeDeps;
|
|
in ''
|
|
wrapProgram $out/bin/vcpkg --prefix PATH ${lib.makeBinPath runtimeDeps}
|
|
'';
|
|
|
|
meta = {
|
|
description = "Components of microsoft/vcpkg's binary";
|
|
mainProgram = "vcpkg";
|
|
homepage = "https://github.com/microsoft/vcpkg-tool";
|
|
license = lib.licenses.mit;
|
|
maintainers = with lib.maintainers; [ guekka gracicot ];
|
|
platforms = lib.platforms.all;
|
|
};
|
|
})
|