Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 2971c829e599
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: a54461f7a1bc
Choose a head ref
  • 2 commits
  • 3 files changed
  • 1 contributor

Commits on Jan 6, 2020

  1. mercurial_4: init at 4.9.1

    eraserhd authored and FRidh committed Jan 6, 2020
    Copy the full SHA
    de8700d View commit details
  2. graalvm8: use mercurial_4

    Commit 88a473f upgraded mercurial, made it use python3, and removed
    support for hg-git, breaking graalvm8.  Since hg-git does not
    officially support python3 or the new version of mercurial, this
    patch uses mercurial_4.
    
    Closes #76527.
    eraserhd authored and FRidh committed Jan 6, 2020
    Copy the full SHA
    a54461f View commit details
Showing with 76 additions and 1 deletion.
  1. +71 −0 pkgs/applications/version-management/mercurial/4.9.nix
  2. +2 −1 pkgs/development/compilers/graalvm/default.nix
  3. +3 −0 pkgs/top-level/all-packages.nix
71 changes: 71 additions & 0 deletions pkgs/applications/version-management/mercurial/4.9.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
{ stdenv, fetchurl, python2Packages, makeWrapper, unzip
, guiSupport ? false, tk ? null
, ApplicationServices
, mercurialSrc ? fetchurl rec {
meta.name = "mercurial-${meta.version}";
meta.version = "4.9.1";
url = "https://mercurial-scm.org/release/${meta.name}.tar.gz";
sha256 = "0iybbkd9add066729zg01kwz5hhc1s6lhp9rrnsmzq6ihyxj3p8v";
}
}:

let
inherit (python2Packages) docutils hg-git dulwich python;

in python2Packages.buildPythonApplication {

inherit (mercurialSrc.meta) name version;
src = mercurialSrc;

format = "other";

inherit python; # pass it so that the same version can be used in hg2git

buildInputs = [ makeWrapper docutils unzip ]
++ stdenv.lib.optionals stdenv.isDarwin [ ApplicationServices ];

propagatedBuildInputs = [ hg-git dulwich ];

makeFlags = [ "PREFIX=$(out)" ];

postInstall = (stdenv.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 (mercurialSrc.meta) 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 = stdenv.lib.licenses.gpl2;
maintainers = [ stdenv.lib.maintainers.eraserhd ];
updateWalker = true;
platforms = stdenv.lib.platforms.unix;
};
}

3 changes: 2 additions & 1 deletion pkgs/development/compilers/graalvm/default.nix
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
{ stdenv, lib, fetchFromGitHub, fetchurl, fetchzip, fetchgit, mercurial, python27, setJavaClassPath,
{ stdenv, lib, fetchFromGitHub, fetchurl, fetchzip, fetchgit, mercurial_4, python27, setJavaClassPath,
zlib, makeWrapper, openjdk, unzip, git, clang, llvm, which, icu, ruby, bzip2, glibc
# gfortran, readline, bzip2, lzma, pcre, curl, ed, tree ## WIP: fastr deps
}:

let
version = "19.1.1";
mercurial = mercurial_4;
truffleMake = ./truffle.make;
makeMxGitCache = list: out: ''
mkdir ${out}
3 changes: 3 additions & 0 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
@@ -20063,6 +20063,9 @@ in

menumaker = callPackage ../applications/misc/menumaker { };

mercurial_4 = callPackage ../applications/version-management/mercurial/4.9.nix {
inherit (darwin.apple_sdk.frameworks) ApplicationServices;
};
mercurial = callPackage ../applications/version-management/mercurial {
inherit (darwin.apple_sdk.frameworks) ApplicationServices;
};