2021-11-13 22:28:25 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, boost, zlib, botan2, libidn
|
2021-05-08 22:10:23 +00:00
|
|
|
, lua, pcre, sqlite, perl, pkg-config, expect, less
|
2014-06-10 05:20:00 +00:00
|
|
|
, bzip2, gmp, openssl
|
2021-05-08 22:10:23 +00:00
|
|
|
, autoreconfHook, texinfo
|
2022-05-20 20:38:52 +00:00
|
|
|
, fetchpatch
|
2014-06-10 05:20:00 +00:00
|
|
|
}:
|
2008-01-25 11:56:36 +00:00
|
|
|
|
2011-07-13 09:13:28 +00:00
|
|
|
let
|
2021-05-08 22:10:23 +00:00
|
|
|
version = "1.1-unstable-2021-05-01";
|
2021-01-15 13:21:58 +00:00
|
|
|
perlVersion = lib.getVersion perl;
|
2011-01-14 12:37:26 +00:00
|
|
|
in
|
|
|
|
|
|
|
|
assert perlVersion != "";
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-13 21:52:01 +00:00
|
|
|
pname = "monotone";
|
|
|
|
inherit version;
|
2011-07-13 09:13:28 +00:00
|
|
|
|
2021-05-08 22:10:23 +00:00
|
|
|
# src = fetchurl {
|
|
|
|
# url = "http://monotone.ca/downloads/${version}/monotone-${version}.tar.bz2";
|
|
|
|
# sha256 = "124cwgi2q86hagslbk5idxbs9j896rfjzryhr6z63r6l485gcp7r";
|
|
|
|
# };
|
|
|
|
|
|
|
|
# My mirror of upstream Monotone repository
|
|
|
|
# Could fetchmtn, but circular dependency; snapshot requested
|
|
|
|
# https://lists.nongnu.org/archive/html/monotone-devel/2021-05/msg00000.html
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "7c6f434c";
|
|
|
|
repo = "monotone-mirror";
|
|
|
|
rev = "b30b0e1c16def043d2dad57d1467d5bfdecdb070";
|
|
|
|
hash = "sha256:1hfy8vaap3184cd7h3qhz0da7c992idkc6q2nz9frhma45c5vgmd";
|
2008-01-25 11:56:36 +00:00
|
|
|
};
|
2011-07-13 09:13:28 +00:00
|
|
|
|
2021-08-17 17:27:34 +00:00
|
|
|
patches = [
|
|
|
|
./monotone-1.1-Adapt-to-changes-in-pcre-8.42.patch
|
|
|
|
./monotone-1.1-adapt-to-botan2.patch
|
2022-05-20 20:38:52 +00:00
|
|
|
(fetchpatch {
|
|
|
|
name = "rm-clang-float128-hack.patch";
|
|
|
|
url = "https://github.com/7c6f434c/monotone-mirror/commit/5f01a3a9326a8dbdae7fc911b208b7c319e5f456.patch";
|
|
|
|
revert = true;
|
|
|
|
sha256 = "0fzjdv49dx5lzvqhkvk50lkccagwx8h0bfha4a0k6l4qh36f9j7c";
|
|
|
|
})
|
2021-08-17 17:27:34 +00:00
|
|
|
];
|
2013-02-23 23:31:20 +00:00
|
|
|
|
2021-05-08 22:10:23 +00:00
|
|
|
postPatch = ''
|
|
|
|
sed -e 's@/usr/bin/less@${less}/bin/less@' -i src/unix/terminal.cc
|
|
|
|
'';
|
|
|
|
|
2022-04-23 06:11:11 +00:00
|
|
|
CXXFLAGS=" --std=c++11 ";
|
|
|
|
|
2021-05-08 22:10:23 +00:00
|
|
|
nativeBuildInputs = [ pkg-config autoreconfHook texinfo ];
|
|
|
|
buildInputs = [ boost zlib botan2 libidn lua pcre sqlite expect
|
|
|
|
openssl gmp bzip2 perl ];
|
2011-07-13 09:13:28 +00:00
|
|
|
|
2009-10-15 11:13:21 +00:00
|
|
|
postInstall = ''
|
2019-08-13 21:52:01 +00:00
|
|
|
mkdir -p $out/share/${pname}-${version}
|
|
|
|
cp -rv contrib/ $out/share/${pname}-${version}/contrib
|
2018-12-15 03:50:31 +00:00
|
|
|
mkdir -p $out/${perl.libPrefix}/${perlVersion}
|
|
|
|
cp -v contrib/Monotone.pm $out/${perl.libPrefix}/${perlVersion}
|
2021-05-08 22:10:23 +00:00
|
|
|
|
|
|
|
patchShebangs "$out/share/monotone"
|
|
|
|
patchShebangs "$out/share/${pname}-${version}"
|
|
|
|
|
|
|
|
find "$out"/share/{doc/monotone,${pname}-${version}}/contrib/ -type f | xargs sed -e 's@! */usr/bin/@!/usr/bin/env @; s@! */bin/bash@!/usr/bin/env bash@' -i
|
2009-10-15 11:13:21 +00:00
|
|
|
'';
|
2011-07-13 09:13:28 +00:00
|
|
|
|
2013-02-23 23:31:20 +00:00
|
|
|
#doCheck = true; # some tests fail (and they take VERY long)
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2010-11-02 11:20:24 +00:00
|
|
|
description = "A free distributed version control system";
|
2018-09-08 13:12:27 +00:00
|
|
|
maintainers = [ maintainers.raskin ];
|
|
|
|
platforms = platforms.unix;
|
2021-05-08 22:10:23 +00:00
|
|
|
license = licenses.gpl2Plus;
|
2009-07-07 15:05:15 +00:00
|
|
|
};
|
2008-01-25 11:56:36 +00:00
|
|
|
}
|