mirror of
https://github.com/NixOS/nix.git
synced 2025-11-14 22:42:41 +01:00
Switch to libgit2 experimental
Just patch the package for now, but we should make Nixpkgs provide what we need (whether that the experimental variant, or a 2.x release with the new API made non-experimental) before releasing this change.
This commit is contained in:
parent
cbe8ec7bd7
commit
9846305fee
8 changed files with 47 additions and 37 deletions
|
|
@ -74,4 +74,14 @@ scope: {
|
||||||
buildPhase = lib.replaceStrings [ "--without-python" ] [ "" ] old.buildPhase;
|
buildPhase = lib.replaceStrings [ "--without-python" ] [ "" ] old.buildPhase;
|
||||||
installPhase = lib.replaceStrings [ "--without-python" ] [ "" ] old.installPhase;
|
installPhase = lib.replaceStrings [ "--without-python" ] [ "" ] old.installPhase;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
libgit2 = pkgs.libgit2.overrideAttrs (attrs: {
|
||||||
|
cmakeFlags = (attrs.cmakeFlags or [ ]) ++ [
|
||||||
|
(lib.mesonBool "EXPERIMENTAL_SHA256" true)
|
||||||
|
];
|
||||||
|
|
||||||
|
postInstall = (attrs.postInstall or "") + ''
|
||||||
|
substituteInPlace $(find $dev/include -type f) --replace-quiet '#include "git2/' '#include "git2-experimental/'
|
||||||
|
'';
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,19 +1,19 @@
|
||||||
#include "nix/fetchers/git-utils.hh"
|
#include "nix/fetchers/git-utils.hh"
|
||||||
#include "nix/util/file-system.hh"
|
#include "nix/util/file-system.hh"
|
||||||
#include <gmock/gmock.h>
|
#include <gmock/gmock.h>
|
||||||
#include <git2/global.h>
|
#include <git2-experimental/global.h>
|
||||||
#include <git2/repository.h>
|
#include <git2-experimental/repository.h>
|
||||||
#include <git2/signature.h>
|
#include <git2-experimental/signature.h>
|
||||||
#include <git2/types.h>
|
#include <git2-experimental/types.h>
|
||||||
#include <git2/object.h>
|
#include <git2-experimental/object.h>
|
||||||
#include <git2/tag.h>
|
#include <git2-experimental/tag.h>
|
||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
#include "nix/util/fs-sink.hh"
|
#include "nix/util/fs-sink.hh"
|
||||||
#include "nix/util/serialise.hh"
|
#include "nix/util/serialise.hh"
|
||||||
#include "nix/fetchers/git-lfs-fetch.hh"
|
#include "nix/fetchers/git-lfs-fetch.hh"
|
||||||
|
|
||||||
#include <git2/blob.h>
|
#include <git2-experimental/blob.h>
|
||||||
#include <git2/tree.h>
|
#include <git2-experimental/tree.h>
|
||||||
|
|
||||||
namespace nix {
|
namespace nix {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
#include "nix/fetchers/fetchers.hh"
|
#include "nix/fetchers/fetchers.hh"
|
||||||
#include "nix/fetchers/git-utils.hh"
|
#include "nix/fetchers/git-utils.hh"
|
||||||
|
|
||||||
#include <git2.h>
|
#include <git2-experimental.h>
|
||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
|
|
||||||
#include <filesystem>
|
#include <filesystem>
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@ deps_private += rapidcheck
|
||||||
gtest = dependency('gtest', main : true)
|
gtest = dependency('gtest', main : true)
|
||||||
deps_private += gtest
|
deps_private += gtest
|
||||||
|
|
||||||
libgit2 = dependency('libgit2')
|
libgit2 = dependency('libgit2-experimental')
|
||||||
deps_private += libgit2
|
deps_private += libgit2
|
||||||
|
|
||||||
subdir('nix-meson-build-support/common')
|
subdir('nix-meson-build-support/common')
|
||||||
|
|
|
||||||
|
|
@ -7,10 +7,10 @@
|
||||||
#include "nix/util/hash.hh"
|
#include "nix/util/hash.hh"
|
||||||
#include "nix/store/ssh.hh"
|
#include "nix/store/ssh.hh"
|
||||||
|
|
||||||
#include <git2/attr.h>
|
#include <git2-experimental/attr.h>
|
||||||
#include <git2/config.h>
|
#include <git2-experimental/config.h>
|
||||||
#include <git2/errors.h>
|
#include <git2-experimental/errors.h>
|
||||||
#include <git2/remote.h>
|
#include <git2-experimental/remote.h>
|
||||||
|
|
||||||
#include <nlohmann/json.hpp>
|
#include <nlohmann/json.hpp>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,27 +13,27 @@
|
||||||
#include "nix/util/thread-pool.hh"
|
#include "nix/util/thread-pool.hh"
|
||||||
#include "nix/util/pool.hh"
|
#include "nix/util/pool.hh"
|
||||||
|
|
||||||
#include <git2/attr.h>
|
#include <git2-experimental/attr.h>
|
||||||
#include <git2/blob.h>
|
#include <git2-experimental/blob.h>
|
||||||
#include <git2/branch.h>
|
#include <git2-experimental/branch.h>
|
||||||
#include <git2/commit.h>
|
#include <git2-experimental/commit.h>
|
||||||
#include <git2/config.h>
|
#include <git2-experimental/config.h>
|
||||||
#include <git2/describe.h>
|
#include <git2-experimental/describe.h>
|
||||||
#include <git2/errors.h>
|
#include <git2-experimental/errors.h>
|
||||||
#include <git2/global.h>
|
#include <git2-experimental/global.h>
|
||||||
#include <git2/indexer.h>
|
#include <git2-experimental/indexer.h>
|
||||||
#include <git2/object.h>
|
#include <git2-experimental/object.h>
|
||||||
#include <git2/odb.h>
|
#include <git2-experimental/odb.h>
|
||||||
#include <git2/refs.h>
|
#include <git2-experimental/refs.h>
|
||||||
#include <git2/remote.h>
|
#include <git2-experimental/remote.h>
|
||||||
#include <git2/repository.h>
|
#include <git2-experimental/repository.h>
|
||||||
#include <git2/revparse.h>
|
#include <git2-experimental/revparse.h>
|
||||||
#include <git2/status.h>
|
#include <git2-experimental/status.h>
|
||||||
#include <git2/submodule.h>
|
#include <git2-experimental/submodule.h>
|
||||||
#include <git2/sys/odb_backend.h>
|
#include <git2-experimental/sys/odb_backend.h>
|
||||||
#include <git2/sys/mempack.h>
|
#include <git2-experimental/sys/mempack.h>
|
||||||
#include <git2/tag.h>
|
#include <git2-experimental/tag.h>
|
||||||
#include <git2/tree.h>
|
#include <git2-experimental/tree.h>
|
||||||
|
|
||||||
#include <boost/unordered/concurrent_flat_set.hpp>
|
#include <boost/unordered/concurrent_flat_set.hpp>
|
||||||
#include <boost/unordered/unordered_flat_map.hpp>
|
#include <boost/unordered/unordered_flat_map.hpp>
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
#include "nix/util/serialise.hh"
|
#include "nix/util/serialise.hh"
|
||||||
#include "nix/util/url.hh"
|
#include "nix/util/url.hh"
|
||||||
|
|
||||||
#include <git2/repository.h>
|
#include <git2-experimental/repository.h>
|
||||||
|
|
||||||
#include <nlohmann/json_fwd.hpp>
|
#include <nlohmann/json_fwd.hpp>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@ subdir('nix-meson-build-support/subprojects')
|
||||||
nlohmann_json = dependency('nlohmann_json', version : '>= 3.9')
|
nlohmann_json = dependency('nlohmann_json', version : '>= 3.9')
|
||||||
deps_public += nlohmann_json
|
deps_public += nlohmann_json
|
||||||
|
|
||||||
libgit2 = dependency('libgit2', version : '>= 1.9')
|
libgit2 = dependency('libgit2-experimental', version : '>= 1.9')
|
||||||
deps_private += libgit2
|
deps_private += libgit2
|
||||||
|
|
||||||
subdir('nix-meson-build-support/common')
|
subdir('nix-meson-build-support/common')
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue