vcpkg-tool: init at 2023-09-15

This commit is contained in:
Guillaume Racicot 2023-10-10 16:10:23 -04:00
parent c56fe28662
commit 673432ef6e
3 changed files with 91 additions and 0 deletions

View File

@ -0,0 +1,14 @@
diff --git a/src/vcpkg/vcpkgpaths.cpp b/src/vcpkg/vcpkgpaths.cpp
index 3f588c21..e6f2bbed 100644
--- a/src/vcpkg/vcpkgpaths.cpp
+++ b/src/vcpkg/vcpkgpaths.cpp
@@ -579,7 +579,8 @@ namespace vcpkg
if (!args.do_not_take_lock)
{
std::error_code ec;
- const auto vcpkg_root_file = root / ".vcpkg-root";
+ fs.create_directories(Path{"/tmp/vcpkg"}, VCPKG_LINE_INFO);
+ const auto vcpkg_root_file = Path{"/tmp/vcpkg"} / Hash::get_string_sha256(root.c_str());
if (args.wait_for_lock.value_or(false))
{
file_lock_handle = fs.take_exclusive_file_lock(vcpkg_root_file, ec);

View File

@ -0,0 +1,73 @@
{ lib
, stdenv
, fetchFromGitHub
, cacert
, cmake
, cmakerc
, fmt
, git
, gzip
, makeWrapper
, meson
, ninja
, openssh
, python3
, zip
, zstd
, extraRuntimeDeps ? []
}:
stdenv.mkDerivation (finalAttrs: {
pname = "vcpkg-tool";
version = "2023-10-18";
src = fetchFromGitHub {
owner = "microsoft";
repo = "vcpkg-tool";
rev = finalAttrs.version;
hash = "sha256-Hm+GSKov9A6tmN10BHOTVy8aWkLOJNBMOQJNm4HnWuI=";
};
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";
homepage = "https://github.com/microsoft/vcpkg-tool";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ guekka gracicot ];
platforms = lib.platforms.all;
};
})

View File

@ -822,6 +822,10 @@ with pkgs;
sea-orm-cli = callPackage ../development/tools/sea-orm-cli { };
vcpkg-tool = callPackage ../by-name/vc/vcpkg-tool/package.nix {
fmt = fmt_10;
};
r3ctl = qt5.callPackage ../tools/misc/r3ctl { };
ptouch-print = callPackage ../misc/ptouch-print { };