home: revert to built-in mercurialFull package

This commit is contained in:
Jez Cope 2022-01-07 16:46:50 +00:00
parent 47a8defda3
commit 7506c1269f
4 changed files with 1 additions and 94 deletions

View File

@ -25,9 +25,6 @@ in {
python = python38.withPackages
(py: with py; [ ipython sh invoke cookiecutter pyflakes isort ]);
ghc = haskellPackages.ghcWithPackages (pkgs: [ pkgs.tidal ]);
mercurial = pkgs.python38Packages.callPackage ./pkgs/mercurial.nix {
python3Packages = python38Packages;
};
in [
nmap
avahi
@ -40,7 +37,7 @@ in {
ncftp
nix-prefetch-git
nix-index
mercurial
mercurialFull
weechat
borgbackup
hydroxide

0
home/pkgs/.keep Normal file
View File

View File

@ -1,24 +0,0 @@
{ lib, buildPythonPackage, fetchPypi, dulwich, isPy3k, fetchpatch, brotli }:
buildPythonPackage rec {
pname = "hg-git";
version = "0.9.0";
src = fetchPypi {
inherit pname version;
sha256 = "0wbnhvn0c9w1hg0ykkqh7vqzr48sfgh33na6j08fqir86a6bvb3p";
};
propagatedBuildInputs = [ dulwich brotli ];
# circular dependency, tests need mercurial to be installed, but hg-git is a
# dependency of nixpkgs' mercurial package.
doCheck = false;
meta = with lib; {
description = "Push and pull from a Git server using Mercurial";
homepage = "http://hg-git.github.com/";
maintainers = with maintainers; [ koral ];
license = lib.licenses.gpl2Only;
};
}

View File

@ -1,66 +0,0 @@
{ lib, stdenv, fetchurl, python3Packages, makeWrapper, unzip, guiSupport ? false
, tk ? null, ApplicationServices ? null }:
let
inherit (python3Packages) docutils python dulwich;
hg-git = python3Packages.callPackage ./hg-git.nix { };
in python3Packages.buildPythonApplication rec {
pname = "mercurial";
version = "5.6";
src = fetchurl {
url = "https://mercurial-scm.org/release/mercurial-${version}.tar.gz";
sha256 = "1hk2y30zzdnlv8f71kabvh0xi9c7qhp28ksh20vpd0r712sv79yz";
};
format = "other";
passthru = {
inherit python;
}; # pass it so that the same version can be used in hg2git
buildInputs = [ makeWrapper docutils unzip ]
++ lib.optionals stdenv.isDarwin [ ApplicationServices ];
propagatedBuildInputs = [ hg-git dulwich ];
makeFlags = [ "PREFIX=$(out)" ];
postInstall = (lib.optionalString guiSupport ''
mkdir -p $out/etc/mercurial
cp contrib/hgk $out/bin
cat >> $out/etc/mercurial/hgrc << EOF
[extensions]
hgk=$out/lib/${python.libPrefix}/site-packages/hgext/hgk.py
EOF
# setting HG so that hgk can be run itself as well (not only hg view)
WRAP_TK=" --set TK_LIBRARY ${tk}/lib/${tk.libPrefix}
--set HG $out/bin/hg
--prefix PATH : ${tk}/bin "
'') + ''
for i in $(cd $out/bin && ls); do
wrapProgram $out/bin/$i \
$WRAP_TK
done
# copy hgweb.cgi to allow use in apache
mkdir -p $out/share/cgi-bin
cp -v hgweb.cgi contrib/hgweb.wsgi $out/share/cgi-bin
chmod u+x $out/share/cgi-bin/hgweb.cgi
# install bash/zsh completions
install -v -m644 -D contrib/bash_completion $out/share/bash-completion/completions/_hg
install -v -m644 -D contrib/zsh_completion $out/share/zsh/site-functions/_hg
'';
meta = {
inherit version;
description =
"A fast, lightweight SCM system for very large distributed projects";
homepage = "https://www.mercurial-scm.org";
downloadPage = "https://www.mercurial-scm.org/release/";
license = lib.licenses.gpl2;
maintainers = [ lib.maintainers.eelco ];
updateWalker = true;
platforms = lib.platforms.unix;
};
}