diff options
Diffstat (limited to 'pkgs/applications/version-management/mercurial')
-rw-r--r-- | pkgs/applications/version-management/mercurial/default.nix | 15 | ||||
-rw-r--r-- | pkgs/applications/version-management/mercurial/fix-rhg-type-aarch64.patch | 12 |
2 files changed, 24 insertions, 3 deletions
diff --git a/pkgs/applications/version-management/mercurial/default.nix b/pkgs/applications/version-management/mercurial/default.nix index 17d21f30e3b..9dc3e0329e3 100644 --- a/pkgs/applications/version-management/mercurial/default.nix +++ b/pkgs/applications/version-management/mercurial/default.nix @@ -21,13 +21,18 @@ let self = python3Packages.buildPythonApplication rec { pname = "mercurial${lib.optionalString fullBuild "-full"}"; - version = "6.0.3"; + version = "6.1"; src = fetchurl { url = "https://mercurial-scm.org/release/mercurial-${version}.tar.gz"; - sha256 = "sha256-Z/E2R6RlF6K1Z83Lc8mHIdddNqBDLeuxUCK3f5wTgzM="; + sha256 = "sha256-hvmGReRWWpJWmR3N4it3uOfSLKb7tgwfTNvYRpo4zB8="; }; + patches = [ + # Fix the type of libc buffer for aarch64-linux + ./fix-rhg-type-aarch64.patch + ]; + format = "other"; passthru = { inherit python; }; # pass it so that the same version can be used in hg2git @@ -35,7 +40,7 @@ let cargoDeps = if rustSupport then rustPlatform.fetchCargoTarball { inherit src; name = "mercurial-${version}"; - sha256 = "sha256-i4WROxezeqLX4hTdcPrqsf6dBqsNZz6fFAPzItYuklE="; + sha256 = "sha256-+Y91gEC8vmyutNpVFAAL4MSg4KnpFbhH12CIuMRx0Mc="; sourceRoot = "mercurial-${version}/rust"; } else null; cargoRoot = if rustSupport then "rust" else null; @@ -181,6 +186,10 @@ in nativeBuildInputs = self.nativeBuildInputs; dontUnpack = true; + dontPatch = true; + dontConfigure = true; + dontBuild = true; + doCheck = false; installPhase = '' runHook preInstall diff --git a/pkgs/applications/version-management/mercurial/fix-rhg-type-aarch64.patch b/pkgs/applications/version-management/mercurial/fix-rhg-type-aarch64.patch new file mode 100644 index 00000000000..84417b497c0 --- /dev/null +++ b/pkgs/applications/version-management/mercurial/fix-rhg-type-aarch64.patch @@ -0,0 +1,12 @@ +diff --git a/rust/hg-core/src/lock.rs b/rust/hg-core/src/lock.rs +--- a/rust/hg-core/src/lock.rs ++++ b/rust/hg-core/src/lock.rs +@@ -145,7 +145,7 @@ lazy_static::lazy_static! { + + /// Same as https://github.com/python/cpython/blob/v3.10.0/Modules/socketmodule.c#L5414 + const BUFFER_SIZE: usize = 1024; +- let mut buffer = [0_i8; BUFFER_SIZE]; ++ let mut buffer = [0 as libc::c_char; BUFFER_SIZE]; + let hostname_bytes = unsafe { + let result = libc::gethostname(buffer.as_mut_ptr(), BUFFER_SIZE); + if result != 0 { |