mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-25 13:35:13 +00:00
Merge pull request #87227 from risicle/ris-git-fast-export-200213
gitAndTools.git-fast-export: 190107 -> 200213, fix
This commit is contained in:
commit
40ae9e79dd
@ -98,7 +98,7 @@ let
|
||||
|
||||
git-fame = callPackage ./git-fame {};
|
||||
|
||||
git-fast-export = callPackage ./fast-export { };
|
||||
git-fast-export = callPackage ./fast-export { mercurial = mercurial_4; };
|
||||
|
||||
git-filter-repo = callPackage ./git-filter-repo {
|
||||
pythonPackages = python3Packages;
|
||||
|
@ -1,13 +1,14 @@
|
||||
{stdenv, fetchgit, mercurial, makeWrapper}:
|
||||
{stdenv, fetchFromGitHub, git, mercurial, makeWrapper}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "fast-export";
|
||||
version = "190107";
|
||||
version = "200213";
|
||||
|
||||
src = fetchgit {
|
||||
url = "git://repo.or.cz/fast-export.git";
|
||||
src = fetchFromGitHub {
|
||||
owner = "frej";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "14azfps9jd5anivcvfwflgsvqdyy6gm9jy284kzx2ng9f7871d14";
|
||||
sha256 = "0hzyh66rlawxip4n2pvz7pbs0cq82clqv1d6c7hf60v1drjxw287";
|
||||
};
|
||||
|
||||
buildInputs = [mercurial.python mercurial makeWrapper];
|
||||
@ -27,11 +28,34 @@ stdenv.mkDerivation rec {
|
||||
|
||||
for script in $out/bin/*.sh; do
|
||||
wrapProgram $script \
|
||||
--prefix PATH : "${mercurial.python}/bin":$libexec \
|
||||
--prefix PATH : "${git}/bin":"${mercurial.python}/bin":$libexec \
|
||||
--prefix PYTHONPATH : "${mercurial}/${mercurial.python.sitePackages}":$sitepackagesPath
|
||||
done
|
||||
'';
|
||||
|
||||
doInstallCheck = true;
|
||||
# deliberately not adding git or hg into installCheckInputs - package should
|
||||
# be able to work without them in runtime env
|
||||
installCheckPhase = ''
|
||||
mkdir repo-hg
|
||||
pushd repo-hg
|
||||
${mercurial}/bin/hg init
|
||||
echo foo > bar
|
||||
${mercurial}/bin/hg add bar
|
||||
${mercurial}/bin/hg commit --message "baz"
|
||||
popd
|
||||
|
||||
mkdir repo-git
|
||||
pushd repo-git
|
||||
${git}/bin/git init
|
||||
${git}/bin/git config core.ignoreCase false # for darwin
|
||||
$out/bin/hg-fast-export.sh -r ../repo-hg/ --hg-hash
|
||||
for s in "foo" "bar" "baz" ; do
|
||||
(${git}/bin/git show | grep $s > /dev/null) && echo $s found
|
||||
done
|
||||
popd
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Import mercurial into git";
|
||||
homepage = "https://repo.or.cz/w/fast-export.git";
|
||||
|
Loading…
Reference in New Issue
Block a user