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: 9ba63260fd40
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: fafac02e4175
Choose a head ref
  • 1 commit
  • 2 files changed
  • 1 contributor

Commits on Apr 7, 2020

  1. gitAndTools.git-cinnabar: init at 0.5.4

    git-cinnabar calls into Mercurial as a library, so we make use the
    same version of Python as Mercurial.
    
    Support for Python 3 is an experimental feature in git-cinnabar, but
    we unconditionally use it here because:
    
    * Mercurial in Nixpkgs only supports Python 3.
    * git-cinnabar touches a network, and for that purpose it's good to
      use a version of Python that is going to get security updates.
    alyssais committed Apr 7, 2020
    Copy the full SHA
    fafac02 View commit details
Original file line number Diff line number Diff line change
@@ -68,6 +68,8 @@ let
# support for bugzilla
git-bz = callPackage ./git-bz { };

git-cinnabar = callPackage ./git-cinnabar { };

git-codeowners = callPackage ./git-codeowners { };

git-codereview = callPackage ./git-codereview { };
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{ stdenv, lib, fetchFromGitHub, autoconf, makeWrapper
, curl, libiconv, mercurial, zlib
}:

let
python3 = mercurial.python;
in

stdenv.mkDerivation rec {
pname = "git-cinnabar";
version = "0.5.4";

src = fetchFromGitHub {
owner = "glandium";
repo = "git-cinnabar";
rev = version;
sha256 = "1cjn2cc6mj4m736wxab9s6qx83p5n5ha8cr3x84s9ra6rxs8d7pi";
fetchSubmodules = true;
};

nativeBuildInputs = [ autoconf makeWrapper ];
buildInputs = [ curl zlib ] ++ lib.optional stdenv.isDarwin libiconv;

# Ignore submodule status failing due to no git in environment.
makeFlags = [ "SUBMODULE_STATUS=yes" ];

enableParallelBuilding = true;

installPhase = ''
mkdir -p $out/bin $out/libexec
install git-cinnabar-helper $out/bin
install git-cinnabar git-remote-hg $out/libexec
cp -r cinnabar mercurial $out/libexec
for pythonBin in git-cinnabar git-remote-hg; do
makeWrapper $out/libexec/$pythonBin $out/bin/$pythonBin \
--prefix PATH : ${lib.getBin python3}/bin \
--prefix GIT_CINNABAR_EXPERIMENTS , python3 \
--set PYTHONPATH ${mercurial}/${python3.sitePackages}
done
'';

meta = with lib; {
homepage = "https://github.com/glandium/git-cinnabar";
description = "git remote helper to interact with mercurial repositories";
license = licenses.gpl2;
maintainers = with maintainers; [ qyliss ];
platforms = platforms.all;
};
}