uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead

https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948
this can do it nicely.

Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
Anton Arapov 2021-04-03 12:58:10 +02:00 committed by Alan Daniels
commit 56de2bcd43
30691 changed files with 3076956 additions and 0 deletions

View file

@ -0,0 +1,11 @@
--- tla-1.3.5/src/build-tools/auto-conf-lib/gnu-patch-test 2006-07-20 08:34:28.000000000 +0200
+++ tla-1.3.5/src/build-tools/auto-conf-lib/gnu-patch-test 2008-02-17 13:00:07.000000000 +0100
@@ -27,7 +27,7 @@ else
fi
CMP='cmp' # we require a working 'cmp' utility
-TMPDIR="/tmp/,patch-test.$$"
+TMPDIR="${TMPDIR:-/tmp}/,patch-test.$$"
ORIG_A="$TMPDIR/to-patch_a"
ORIG_PRISTINE_A="$TMPDIR/to-patch_a.the-original"

View file

@ -0,0 +1,31 @@
{ stdenv, fetchurl, which, diffutils, gnupatch, gnutar }:
stdenv.mkDerivation rec {
pname = "tla";
version = "1.3.5";
src = fetchurl {
url = "https://ftp.gnu.org/old-gnu/gnu-arch/tla-${version}.tar.gz";
sha256 = "01mfzj1i6p4s8191cgd5850hds1zls88hkf9rb6qx1vqjv585aj0";
};
patches = [ ./configure-tmpdir.patch ];
buildInputs = [ which ];
propagatedBuildInputs = [ diffutils gnupatch gnutar ];
# Instead of GNU Autoconf, tla uses Tom Lord's now
# defunct `package-framework'.
buildPhase = ''
mkdir +build && cd +build && \
../src/configure --prefix="$out" && \
make install
'';
meta = {
description = "GNU Arch (aka. `tla'), a distributed revision control system";
homepage = "https://www.gnu.org/software/gnu-arch/";
license = "GPL";
};
}

View file

@ -0,0 +1,96 @@
{ lib, autoPatchelfHook, bzip2, cairo, coreutils, fetchurl, gdk-pixbuf, glibc, pango, gtk2, kcoreaddons, ki18n, kio, kservice
, stdenv, runtimeShell, unzip
}:
let
pname = "bcompare";
version = "4.4.2.26348";
throwSystem = throw "Unsupported system: ${stdenv.hostPlatform.system}";
srcs = {
x86_64-linux = fetchurl {
url = "https://www.scootersoftware.com/${pname}-${version}_amd64.deb";
sha256 = "sha256-GotORErgPs7IPXATbBfIisDCNwp8csl7pDSwV77FylA=";
};
x86_64-darwin = fetchurl {
url = "https://www.scootersoftware.com/BCompareOSX-${version}.zip";
sha256 = "sha256-XqmtW2EGyFmOzCooXczP3mtMN5UVQCCx7DJnVDlzAko=";
};
aarch64-darwin = srcs.x86_64-darwin;
};
src = srcs.${stdenv.hostPlatform.system} or throwSystem;
linux = stdenv.mkDerivation {
inherit pname version src meta;
unpackPhase = ''
ar x $src
tar xfz data.tar.gz
'';
installPhase = ''
mkdir -p $out/{bin,lib,share}
cp -R usr/{bin,lib,share} $out/
# Remove library that refuses to be autoPatchelf'ed
rm $out/lib/beyondcompare/ext/bcompare_ext_kde.amd64.so
substituteInPlace $out/bin/${pname} \
--replace "/usr/lib/beyondcompare" "$out/lib/beyondcompare" \
--replace "ldd" "${glibc.out}/bin/ldd" \
--replace "/bin/bash" "${runtimeShell}"
# Create symlink bzip2 library
ln -s ${bzip2.out}/lib/libbz2.so.1 $out/lib/beyondcompare/libbz2.so.1.0
'';
nativeBuildInputs = [ autoPatchelfHook ];
buildInputs = [
stdenv.cc.cc.lib
gtk2
pango
cairo
kio
kservice
ki18n
kcoreaddons
gdk-pixbuf
bzip2
];
dontBuild = true;
dontConfigure = true;
dontWrapQtApps = true;
};
darwin = stdenv.mkDerivation {
inherit pname version src meta;
nativeBuildInputs = [ unzip ];
installPhase = ''
mkdir -p $out/Applications/BCompare.app
cp -R . $out/Applications/BCompare.app
'';
};
meta = with lib; {
description = "GUI application that allows to quickly and easily compare files and folders";
longDescription = ''
Beyond Compare is focused. Beyond Compare allows you to quickly and easily compare your files and folders.
By using simple, powerful commands you can focus on the differences you're interested in and ignore those you're not.
You can then merge the changes, synchronize your files, and generate reports for your records.
'';
homepage = "https://www.scootersoftware.com";
license = licenses.unfree;
maintainers = with maintainers; [ ktor arkivm ];
platforms = builtins.attrNames srcs;
};
in
if stdenv.isDarwin
then darwin
else linux

View file

@ -0,0 +1,63 @@
{ lib
, stdenv
, fetchFromGitHub
, expect
, which
, gnupg
, coreutils
, git
, pinentry
, gnutar
, procps
}:
stdenv.mkDerivation rec {
pname = "blackbox";
version = "2.0.0";
src = fetchFromGitHub {
owner = "stackexchange";
repo = pname;
rev = "v${version}";
sha256 = "1plwdmzds6dq2rlp84dgiashrfg0kg4yijhnxaapz2q4d1vvx8lq";
};
buildInputs = [ gnupg ];
# https://github.com/NixOS/nixpkgs/issues/134445
doCheck = !stdenv.isDarwin && stdenv.isx86_64;
checkInputs = [
expect
which
coreutils
pinentry.tty
git
gnutar
procps
];
postPatch = ''
patchShebangs bin tools
substituteInPlace Makefile \
--replace "PREFIX?=/usr/local" "PREFIX=$out"
substituteInPlace tools/confidence_test.sh \
--replace 'PATH="''${blackbox_home}:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/opt/local/bin:/usr/pkg/bin:/usr/pkg/gnu/bin:''${blackbox_home}"' \
"PATH=/build/source/bin/:$PATH"
'';
installPhase = ''
runHook preInstall
mkdir -p $out/bin
make copy-install
runHook postInstall
'';
meta = with lib; {
description = "Safely store secrets in a VCS repo";
maintainers = with maintainers; [ ericsagnes ];
license = licenses.mit;
platforms = platforms.all;
};
}

View file

@ -0,0 +1,29 @@
{ lib, python3, git, mercurial}:
python3.pkgs.buildPythonApplication rec {
pname = "bumpver";
version = "2021.1110";
src = python3.pkgs.fetchPypi {
inherit pname version;
sha256 = "b6a0ddb78db7e00ae7ffe895bf8ef97f91e6310dfc1c4721896bdfd044b1cb03";
};
prePatch = ''
substituteInPlace setup.py \
--replace "if any(arg.startswith(\"bdist\") for arg in sys.argv):" ""\
--replace "import lib3to6" ""\
--replace "package_dir = lib3to6.fix(package_dir)" ""
'';
propagatedBuildInputs = with python3.pkgs; [ pathlib2 click toml lexid colorama setuptools ];
checkInputs = [ python3.pkgs.pytestCheckHook git mercurial];
meta = with lib; {
description = "Bump version numbers in project files";
homepage = "https://pypi.org/project/bumpver/";
license = licenses.mit;
maintainers = with maintainers; [ kfollesdal ];
};
}

View file

@ -0,0 +1,23 @@
{ lib, fetchFromGitHub, rustPlatform }:
rustPlatform.buildRustPackage rec {
pname = "commit-formatter";
version = "0.2.1";
src = fetchFromGitHub {
owner = "Eliot00";
repo = pname;
rev = "v${version}";
sha256 = "EYzhb9jJ4MzHxIbaTb1MxeXUgoxTwcnq5JdxAv2uNcA=";
};
cargoSha256 = "AeHQCoP1HOftlOt/Yala3AXocMlwwIXIO2i1AsFSvGQ=";
meta = with lib; {
description = "A CLI tool to help you write git commit";
homepage = "https://github.com/Eliot00/commit-formatter";
license = with licenses; [ asl20 /* or */ mit ];
maintainers = with maintainers; [ elliot ];
mainProgram = "git-cf";
};
}

View file

@ -0,0 +1,122 @@
{ buildPythonApplication
, colorama
, decli
, fetchFromGitHub
, git
, jinja2
, lib
, packaging
, poetry
, pytest-freezegun
, pytest-mock
, pytest-regressions
, pytestCheckHook
, pyyaml
, questionary
, termcolor
, tomlkit
, typing-extensions
, argcomplete, fetchPypi
}:
let
# NOTE: Upstream requires argcomplete <2, so we make it here.
argcomplete_1 = argcomplete.overrideAttrs (old: rec {
version = "1.12.3";
src = fetchPypi {
inherit (old) pname;
inherit version;
sha256 = "sha256-LH2//YwEXqU0kh5jsL5v5l6IWZmQ2NxAisjFQrcqVEU=";
};
});
in
buildPythonApplication rec {
pname = "commitizen";
version = "2.21.2";
src = fetchFromGitHub {
owner = "commitizen-tools";
repo = pname;
rev = "v${version}";
sha256 = "sha256-7S676bpSrlAqpbgDj9nAo0WjeitbbHoYc693MJm35Js=";
deepClone = true;
};
format = "pyproject";
nativeBuildInputs = [ poetry ];
propagatedBuildInputs = [
termcolor
questionary
colorama
decli
tomlkit
jinja2
pyyaml
argcomplete_1
typing-extensions
packaging
];
doCheck = true;
checkInputs = [
pytestCheckHook
pytest-freezegun
pytest-mock
pytest-regressions
argcomplete_1
git
];
# NB: These require full git history
disabledTests = [
"test_breaking_change_content_v1"
"test_breaking_change_content_v1_beta"
"test_breaking_change_content_v1_multiline"
"test_bump_command_prelease"
"test_bump_dry_run"
"test_bump_files_only"
"test_bump_local_version"
"test_bump_major_increment"
"test_bump_minor_increment"
"test_bump_on_git_with_hooks_no_verify_disabled"
"test_bump_on_git_with_hooks_no_verify_enabled"
"test_bump_patch_increment"
"test_bump_tag_exists_raises_exception"
"test_bump_when_bumpping_is_not_support"
"test_bump_when_version_inconsistent_in_version_files"
"test_bump_with_changelog_arg"
"test_bump_with_changelog_config"
"test_bump_with_changelog_to_stdout_arg"
"test_changelog_config_flag_increment"
"test_changelog_config_start_rev_option"
"test_changelog_from_start"
"test_changelog_from_version_zero_point_two"
"test_changelog_hook"
"test_changelog_incremental_angular_sample"
"test_changelog_incremental_keep_a_changelog_sample"
"test_changelog_incremental_keep_a_changelog_sample_with_annotated_tag"
"test_changelog_incremental_with_release_candidate_version"
"test_changelog_is_persisted_using_incremental"
"test_changelog_multiple_incremental_do_not_add_new_lines"
"test_changelog_replacing_unreleased_using_incremental"
"test_changelog_with_different_cz"
"test_get_commits"
"test_get_commits_author_and_email"
"test_get_commits_with_signature"
"test_get_latest_tag_name"
"test_is_staging_clean_when_updating_file"
"test_none_increment_should_not_call_git_tag_and_error_code_is_not_zero"
"test_prevent_prerelease_when_no_increment_detected"
];
meta = with lib; {
description = "Tool to create committing rules for projects, auto bump versions, and generate changelogs";
homepage = "https://github.com/commitizen-tools/commitizen";
license = licenses.mit;
maintainers = with maintainers; [ lovesegfault ];
};
}

View file

@ -0,0 +1,44 @@
{ lib, stdenv, fetchurl, makeWrapper, asciidoc, docbook_xml_dtd_45, docbook_xsl
, coreutils, cvs, diffutils, findutils, git, python3, rsync
}:
stdenv.mkDerivation rec {
pname = "cvs-fast-export";
version = "1.59";
src = fetchurl {
url = "http://www.catb.org/~esr/cvs-fast-export/cvs-fast-export-${version}.tar.gz";
sha256 = "sha256-JDnNg/VMmPJI6F07o77L4ChYDollLFB1YCL75WSp6No=";
};
strictDeps = true;
nativeBuildInputs = [ makeWrapper asciidoc ];
buildInputs = [ python3 ];
postPatch = ''
patchShebangs .
'';
preBuild = ''
makeFlagsArray=(
XML_CATALOG_FILES="${docbook_xml_dtd_45}/xml/dtd/docbook/catalog.xml ${docbook_xsl}/xml/xsl/docbook/catalog.xml"
LIBS=""
prefix="$out"
)
'';
postInstall = ''
wrapProgram $out/bin/cvssync --prefix PATH : ${lib.makeBinPath [ rsync ]}
wrapProgram $out/bin/cvsconvert --prefix PATH : $out/bin:${lib.makeBinPath [
coreutils cvs diffutils findutils git
]}
'';
meta = with lib; {
description = "Export an RCS or CVS history as a fast-import stream";
license = licenses.gpl2Plus;
maintainers = with maintainers; [ dfoxfranke ];
homepage = "http://www.catb.org/esr/cvs-fast-export/";
platforms = platforms.unix;
};
}

View file

@ -0,0 +1,16 @@
diff --git a/src/client.c b/src/client.c
index 751406b..b45d89c 100644
--- a/src/client.c
+++ b/src/client.c
@@ -3558,9 +3558,9 @@ connect_to_pserver (cvsroot_t *root, struct buffer **to_server_p,
* code.
*/
read_line_via (from_server, to_server, &read_buf);
- sscanf (read_buf, "%s %d", write_buf, &codenum);
+ count = sscanf (read_buf, "%*s %d", &codenum);
- if ((codenum / 100) != 2)
+ if (count != 1 || (codenum / 100) != 2)
error (1, 0, "proxy server %s:%d does not support http tunnelling",
root->proxy_hostname, proxy_port_number);
free (read_buf);

View file

@ -0,0 +1,29 @@
--- a/src/rsh-client.c.orig 2005-10-02 17:17:21.000000000 +0200
+++ b/src/rsh-client.c 2017-11-07 16:56:06.957370469 +0100
@@ -53,7 +53,7 @@
char *cvs_server = (root->cvs_server != NULL
? root->cvs_server : getenv ("CVS_SERVER"));
int i = 0;
- /* This needs to fit "rsh", "-b", "-l", "USER", "host",
+ /* This needs to fit "rsh", "-b", "-l", "USER", "--", "host",
"cmd (w/ args)", and NULL. We leave some room to grow. */
char *rsh_argv[10];
@@ -97,6 +97,9 @@
rsh_argv[i++] = root->username;
}
+ /* Only non-option arguments from here. (CVE-2017-12836) */
+ rsh_argv[i++] = "--";
+
rsh_argv[i++] = root->hostname;
rsh_argv[i++] = cvs_server;
rsh_argv[i++] = "server";
@@ -171,6 +174,7 @@
*p++ = root->username;
}
+ *p++ = "--";
*p++ = root->hostname;
*p++ = command;
*p++ = NULL;

View file

@ -0,0 +1,51 @@
{ lib, stdenv, fetchurl, fetchpatch, nano }:
stdenv.mkDerivation rec {
pname = "cvs";
version = "1.12.13";
src = fetchurl {
url = "mirror://savannah/cvs/source/feature/${version}/cvs-${version}.tar.bz2";
sha256 = "0pjir8cwn0087mxszzbsi1gyfc6373vif96cw4q3m1x6p49kd1bq";
};
patches = [
./getcwd-chroot.patch
./CVE-2012-0804.patch
./CVE-2017-12836.patch
(fetchpatch {
url = "https://raw.githubusercontent.com/Homebrew/formula-patches/24118ec737c7/cvs/vasnprintf-high-sierra-fix.diff";
sha256 = "1ql6aaia7xkfq3vqhlw5bd2z2ywka82zk01njs1b2szn699liymg";
})
];
hardeningDisable = [ "fortify" "format" ];
preConfigure = ''
# Apply the Debian patches.
for p in "debian/patches/"*; do
echo "applying \`$p' ..."
patch --verbose -p1 < "$p"
done
'';
configureFlags = [
"--with-editor=${nano}/bin/nano"
# Required for cross-compilation.
"cvs_cv_func_printf_ptr=yes"
];
makeFlags = [
"AR=${stdenv.cc.targetPrefix}ar"
];
doCheck = false; # fails 1 of 1 tests
meta = with lib; {
homepage = "http://cvs.nongnu.org";
description = "Concurrent Versions System - a source control system";
license = licenses.gpl2Plus; # library is GPLv2, main is GPLv1
platforms = platforms.all;
};
}

View file

@ -0,0 +1,302 @@
Fix Gnulib's getcwd in chroots.
From Debian bug #456164, http://bugs.debian.org/456164 .
--- cvs-1.12.13.orig/debian/patches/20_readdir_errno
+++ cvs-1.12.13/debian/patches/20_readdir_errno
@@ -0,0 +1,121 @@
+# From Gnulib:
+# http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=commitdiff;h=0b78641d85af3b72e3b9d94cb7b94e45f3c08ee5
+# We don't need this directly, but it's required so that 21_getcwd_chroot
+# applies cleanly.
+#
+# 2005-10-29 Paul Eggert <eggert@cs.ucla.edu>
+#
+# * getcwd.c (__getcwd): Don't assume that system calls after readdir
+# leave errno alone. Problem reported by Dmitry V. Levin.
+
+--- cvs-1.12.13-old/lib/getcwd.c
++++ cvs-1.12.13/lib/getcwd.c
+@@ -201,6 +201,8 @@ __getcwd (char *buf, size_t size)
+ ino_t dotino;
+ bool mount_point;
+ int parent_status;
++ size_t dirroom;
++ size_t namlen;
+
+ /* Look at the parent directory. */
+ #ifdef AT_FDCWD
+@@ -241,11 +243,20 @@ __getcwd (char *buf, size_t size)
+ goto lose;
+ dotlist[dotlen++] = '/';
+ #endif
+- /* Clear errno to distinguish EOF from error if readdir returns
+- NULL. */
+- __set_errno (0);
+- while ((d = __readdir (dirstream)) != NULL)
++ for (;;)
+ {
++ /* Clear errno to distinguish EOF from error if readdir returns
++ NULL. */
++ __set_errno (0);
++ d = __readdir (dirstream);
++ if (d == NULL)
++ {
++ if (errno == 0)
++ /* EOF on dirstream, which means that the current directory
++ has been removed. */
++ __set_errno (ENOENT);
++ goto lose;
++ }
+ if (d->d_name[0] == '.' &&
+ (d->d_name[1] == '\0' ||
+ (d->d_name[1] == '.' && d->d_name[2] == '\0')))
+@@ -303,48 +314,38 @@ __getcwd (char *buf, size_t size)
+ break;
+ }
+ }
+- if (d == NULL)
+- {
+- if (errno == 0)
+- /* EOF on dirstream, which means that the current directory
+- has been removed. */
+- __set_errno (ENOENT);
+- goto lose;
+- }
+- else
+- {
+- size_t dirroom = dirp - dir;
+- size_t namlen = _D_EXACT_NAMLEN (d);
+
+- if (dirroom <= namlen)
++ dirroom = dirp - dir;
++ namlen = _D_EXACT_NAMLEN (d);
++
++ if (dirroom <= namlen)
++ {
++ if (size != 0)
+ {
+- if (size != 0)
+- {
+- __set_errno (ERANGE);
+- goto lose;
+- }
+- else
+- {
+- char *tmp;
+- size_t oldsize = allocated;
++ __set_errno (ERANGE);
++ goto lose;
++ }
++ else
++ {
++ char *tmp;
++ size_t oldsize = allocated;
+
+- allocated += MAX (allocated, namlen);
+- if (allocated < oldsize
+- || ! (tmp = realloc (dir, allocated)))
+- goto memory_exhausted;
++ allocated += MAX (allocated, namlen);
++ if (allocated < oldsize
++ || ! (tmp = realloc (dir, allocated)))
++ goto memory_exhausted;
+
+- /* Move current contents up to the end of the buffer.
+- This is guaranteed to be non-overlapping. */
+- dirp = memcpy (tmp + allocated - (oldsize - dirroom),
+- tmp + dirroom,
+- oldsize - dirroom);
+- dir = tmp;
+- }
++ /* Move current contents up to the end of the buffer.
++ This is guaranteed to be non-overlapping. */
++ dirp = memcpy (tmp + allocated - (oldsize - dirroom),
++ tmp + dirroom,
++ oldsize - dirroom);
++ dir = tmp;
+ }
+- dirp -= namlen;
+- memcpy (dirp, d->d_name, namlen);
+- *--dirp = '/';
+ }
++ dirp -= namlen;
++ memcpy (dirp, d->d_name, namlen);
++ *--dirp = '/';
+
+ thisdev = dotdev;
+ thisino = dotino;
--- cvs-1.12.13.orig/debian/patches/21_getcwd_chroot
+++ cvs-1.12.13/debian/patches/21_getcwd_chroot
@@ -0,0 +1,172 @@
+# From Gnulib:
+# http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=commitdiff;h=79c0a43808d9ca85acd04600149fc1a9b75bd1b9
+#
+# 2006-07-03 Paul Eggert <eggert@cs.ucla.edu>
+#
+# Merge from coreutils.
+#
+# 2006-03-19 Jim Meyering <jim@meyering.net>
+#
+# Work even in a chroot where d_ino values for entries in "/"
+# don't match the stat.st_ino values for the same names.
+# * getcwd.c (__getcwd): When no d_ino value matches the target inode
+# number, iterate through all entries again, using lstat instead.
+# Reported by Kenshi Muto in http://bugs.debian.org/355810, and by
+# Zouhir Hafidi in https://bugzilla.redhat.com/bugzilla/190656.
+#
+# * getcwd.c (__getcwd): Clarify a comment.
+# Use memcpy in place of a call to strcpy.
+
+--- cvs-1.12.13-old/lib/getcwd.c
++++ cvs-1.12.13/lib/getcwd.c
+@@ -211,6 +211,7 @@ __getcwd (char *buf, size_t size)
+ int parent_status;
+ size_t dirroom;
+ size_t namlen;
++ bool use_d_ino = true;
+
+ /* Look at the parent directory. */
+ #ifdef AT_FDCWD
+@@ -257,11 +258,26 @@ __getcwd (char *buf, size_t size)
+ NULL. */
+ __set_errno (0);
+ d = __readdir (dirstream);
++
++ /* When we've iterated through all directory entries without finding
++ one with a matching d_ino, rewind the stream and consider each
++ name again, but this time, using lstat. This is necessary in a
++ chroot on at least one system (glibc-2.3.6 + linux 2.6.12), where
++ .., ../.., ../../.., etc. all had the same device number, yet the
++ d_ino values for entries in / did not match those obtained
++ via lstat. */
++ if (d == NULL && errno == 0 && use_d_ino)
++ {
++ use_d_ino = false;
++ rewinddir (dirstream);
++ d = __readdir (dirstream);
++ }
++
+ if (d == NULL)
+ {
+ if (errno == 0)
+- /* EOF on dirstream, which means that the current directory
+- has been removed. */
++ /* EOF on dirstream, which can mean e.g., that the current
++ directory has been removed. */
+ __set_errno (ENOENT);
+ goto lose;
+ }
+@@ -269,58 +285,65 @@ __getcwd (char *buf, size_t size)
+ (d->d_name[1] == '\0' ||
+ (d->d_name[1] == '.' && d->d_name[2] == '\0')))
+ continue;
+- if (MATCHING_INO (d, thisino) || mount_point)
++
++ if (use_d_ino)
+ {
+- int entry_status;
++ bool match = (MATCHING_INO (d, thisino) || mount_point);
++ if (! match)
++ continue;
++ }
++
++ {
++ int entry_status;
+ #ifdef AT_FDCWD
+- entry_status = fstatat (fd, d->d_name, &st, AT_SYMLINK_NOFOLLOW);
++ entry_status = fstatat (fd, d->d_name, &st, AT_SYMLINK_NOFOLLOW);
+ #else
+- /* Compute size needed for this file name, or for the file
+- name ".." in the same directory, whichever is larger.
+- Room for ".." might be needed the next time through
+- the outer loop. */
+- size_t name_alloc = _D_ALLOC_NAMLEN (d);
+- size_t filesize = dotlen + MAX (sizeof "..", name_alloc);
+-
+- if (filesize < dotlen)
+- goto memory_exhausted;
+-
+- if (dotsize < filesize)
+- {
+- /* My, what a deep directory tree you have, Grandma. */
+- size_t newsize = MAX (filesize, dotsize * 2);
+- size_t i;
+- if (newsize < dotsize)
+- goto memory_exhausted;
+- if (dotlist != dots)
+- free (dotlist);
+- dotlist = malloc (newsize);
+- if (dotlist == NULL)
+- goto lose;
+- dotsize = newsize;
+-
+- i = 0;
+- do
+- {
+- dotlist[i++] = '.';
+- dotlist[i++] = '.';
+- dotlist[i++] = '/';
+- }
+- while (i < dotlen);
+- }
+-
+- strcpy (dotlist + dotlen, d->d_name);
+- entry_status = __lstat (dotlist, &st);
++ /* Compute size needed for this file name, or for the file
++ name ".." in the same directory, whichever is larger.
++ Room for ".." might be needed the next time through
++ the outer loop. */
++ size_t name_alloc = _D_ALLOC_NAMLEN (d);
++ size_t filesize = dotlen + MAX (sizeof "..", name_alloc);
++
++ if (filesize < dotlen)
++ goto memory_exhausted;
++
++ if (dotsize < filesize)
++ {
++ /* My, what a deep directory tree you have, Grandma. */
++ size_t newsize = MAX (filesize, dotsize * 2);
++ size_t i;
++ if (newsize < dotsize)
++ goto memory_exhausted;
++ if (dotlist != dots)
++ free (dotlist);
++ dotlist = malloc (newsize);
++ if (dotlist == NULL)
++ goto lose;
++ dotsize = newsize;
++
++ i = 0;
++ do
++ {
++ dotlist[i++] = '.';
++ dotlist[i++] = '.';
++ dotlist[i++] = '/';
++ }
++ while (i < dotlen);
++ }
++
++ memcpy (dotlist + dotlen, d->d_name, _D_ALLOC_NAMLEN (d));
++ entry_status = __lstat (dotlist, &st);
+ #endif
+- /* We don't fail here if we cannot stat() a directory entry.
+- This can happen when (network) file systems fail. If this
+- entry is in fact the one we are looking for we will find
+- out soon as we reach the end of the directory without
+- having found anything. */
+- if (entry_status == 0 && S_ISDIR (st.st_mode)
+- && st.st_dev == thisdev && st.st_ino == thisino)
+- break;
+- }
++ /* We don't fail here if we cannot stat() a directory entry.
++ This can happen when (network) file systems fail. If this
++ entry is in fact the one we are looking for we will find
++ out soon as we reach the end of the directory without
++ having found anything. */
++ if (entry_status == 0 && S_ISDIR (st.st_mode)
++ && st.st_dev == thisdev && st.st_ino == thisino)
++ break;
++ }
+ }
+
+ dirroom = dirp - dir;

View file

@ -0,0 +1,40 @@
{ lib, fetchurl, makeWrapper
, pypy2Packages
, cvs, subversion, git, breezy
, installShellFiles
}:
pypy2Packages.buildPythonApplication rec {
pname = "cvs2svn";
version = "2.5.0";
src = fetchurl {
url = "https://github.com/mhagger/cvs2svn/releases/download/${version}/${pname}-${version}.tar.gz";
sha256 = "1ska0z15sjhyfi860rjazz9ya1gxbf5c0h8dfqwz88h7fccd22b4";
};
nativeBuildInputs = [ makeWrapper installShellFiles ];
checkInputs = [ subversion git breezy ];
checkPhase = "${pypy2Packages.python.interpreter} run-tests.py";
doCheck = false; # Couldn't find node 'transaction...' in expected output tree
postInstall = ''
for i in bzr svn git; do
wrapProgram $out/bin/cvs2$i \
--prefix PATH : "${lib.makeBinPath [ cvs ]}"
$out/bin/cvs2$i --man > csv2$i.1
installManPage csv2$i.1
done
'';
meta = with lib; {
description = "A tool to convert CVS repositories to Subversion repositories";
homepage = "https://github.com/mhagger/cvs2svn";
maintainers = with maintainers; [ makefu viraptor ];
platforms = platforms.unix;
license = licenses.asl20;
};
}

View file

@ -0,0 +1,61 @@
{ lib, stdenv, fetchurl, fetchpatch, cvs, zlib }:
stdenv.mkDerivation rec {
pname = "cvsps";
version = "2.1";
src = fetchurl {
url = "mirror://debian/pool/main/c/cvsps/cvsps_${version}.orig.tar.gz";
sha256 = "0nh7q7zcmagx0i63h6fqqkkq9i55k77myvb8h6jn2f266f5iklwi";
};
# Patches from https://sources.debian.net/src/cvsps/2.1-7/debian/patches
patches =
[ (fetchpatch {
url = "https://sources.debian.net/data/main/c/cvsps/2.1-7/debian/patches/01_ignoretrunk.patch";
sha256 = "1gzb97dw2a6bm0bmim7p7wvsn0r82y3a8n22ln6rbbkkd8vlnzcb";
})
(fetchpatch {
url = "https://sources.debian.net/data/main/c/cvsps/2.1-7/debian/patches/02_dynamicbufferalloc.patch";
sha256 = "0dm7azxnw0g9pdqkb3y4y2h047zgrclbh40av6c868wfp2j6l9sc";
})
(fetchpatch {
url = "https://sources.debian.net/data/main/c/cvsps/2.1-7/debian/patches/03_diffoptstypo.patch";
sha256 = "06n8652g7inpv8cgqir7ijq00qw1fr0v44m2pbmgx7ilmna2vrcw";
})
(fetchpatch {
url = "https://sources.debian.net/data/main/c/cvsps/2.1-7/debian/patches/05-inet_addr_fix.patch";
sha256 = "10w6px96dz8bb69asjzshvp787ccazmqnjsggqc4gwdal95q3cn7";
})
(fetchpatch {
url = "https://sources.debian.net/data/main/c/cvsps/2.1-7/debian/patches/fix-makefile";
sha256 = "0m92b55hgldwg6lwdaybbj0n3lw1b3wj2xkk1cz1ywq073bpf3jm";
})
(fetchpatch {
url = "https://sources.debian.net/data/main/c/cvsps/2.1-7/debian/patches/fix-manpage";
sha256 = "0gky14rhx82wv0gj8bkc74ki5xilhv5i3k1jc7khklr4lb6mmhpx";
})
];
buildInputs = [ cvs zlib ];
installFlags = [ "prefix=$(out)" ];
meta = {
description = "A tool to generate CVS patch set information";
longDescription = ''
CVSps is a program for generating `patchset' information from a
CVS repository. A patchset in this case is defined as a set of
changes made to a collection of files, and all committed at the
same time (using a single "cvs commit" command).
'';
homepage = "http://www.cobite.com/cvsps/";
license = lib.licenses.gpl2;
platforms = lib.platforms.unix;
};
}

View file

@ -0,0 +1,67 @@
{ lib, stdenv
, fetchurl
, makeWrapper
, cvs
, perl
, nettools
, findutils
, rsync
, coreutils
, diffutils
} :
stdenv.mkDerivation rec {
pname = "cvsq";
version = "1.11";
src = fetchurl {
url = "http://www.linta.de/~aehlig/cvsq/cvsq-${version}.tgz";
sha256 = "0491k4skk3jyyd6plp2kcihmxxav9rsch7vd1yi697m2fqckp5ws";
};
nativeBuildInputs = [ makeWrapper ];
buildInputs = [ cvs perl nettools findutils rsync coreutils diffutils ];
makeFlags = [ "prefix=$(out)" ];
postInstall = ''
substituteInPlace $out/bin/cvsq --replace "/bin/sh" "${stdenv.shell}"
substituteInPlace $out/bin/lcvs --replace "/bin/sh" "${stdenv.shell}"
wrapProgram $out/bin/cvsq --prefix PATH : ${lib.makeBinPath
[ cvs nettools findutils rsync coreutils diffutils ]}
wrapProgram $out/bin/cvsq-branch --prefix PATH : ${lib.makeBinPath
[ cvs nettools findutils rsync coreutils diffutils ]}
wrapProgram $out/bin/cvsq-merge --prefix PATH : ${lib.makeBinPath
[ cvs nettools findutils rsync coreutils diffutils ]}
wrapProgram $out/bin/cvsq-switch --prefix PATH : ${lib.makeBinPath
[ cvs nettools findutils rsync coreutils diffutils ]}
wrapProgram $out/bin/lcvs --prefix PATH : ${lib.makeBinPath
[ cvs nettools findutils rsync coreutils diffutils ]}
'';
meta = {
description = "A collection of tools to work locally with CVS";
longDescription = ''
cvsq is a collection of tools to work locally with CVS.
cvsq queues commits and other cvs commands in a queue to be executed later,
when the machine is online again. In case of a commit (the default action)
an actual copy of the working directory is made, so that you can continue
editing without affecting the scheduled commit. You can even schedule
several successive commits to the same file and they will be correctly
committed as successive commits at the time of upload. This is different
from an earlier script also named cvsq that you might have seen elsewhere.
lcvs uses rsync to maintain a local copy of a cvs repository. It also
gives a convenient interface to call cvs in such a way that it believes the
current working directory refers to the local copy rather than to the actual
repository. This is useful for commands like log, diff, etc; however it cannot
be used for commits (that's what cvsq is for).
'';
homepage = "https://www.linta.de/~aehlig/cvsq/";
license = lib.licenses.bsd3;
maintainers = with lib.maintainers; [ clkamp ];
platforms = lib.platforms.all;
};
}

View file

@ -0,0 +1,18 @@
{ pkgs, nodejs, stdenv, lib, ... }:
let
nodePackages = import ./node-composition.nix {
inherit pkgs nodejs;
inherit (stdenv.hostPlatform) system;
};
in
nodePackages.commitizen.override {
name = "cz-cli";
meta = with lib; {
description = "The commitizen command line utility";
homepage = "https://commitizen.github.io/cz-cli";
maintainers = with maintainers; [ freezeboy ];
license = licenses.mit;
platforms = platforms.linux ++ platforms.darwin;
};
}

View file

@ -0,0 +1,9 @@
#!/usr/bin/env nix-shell
#! nix-shell -I nixpkgs=../../../.. -i bash -p nodePackages.node2nix
node2nix \
--node-env node-env.nix \
--development \
--input package.json \
--output node-packages.nix \
--composition node-composition.nix

View file

@ -0,0 +1,17 @@
# This file has been generated by node2nix 1.9.0. Do not edit!
{pkgs ? import <nixpkgs> {
inherit system;
}, system ? builtins.currentSystem, nodejs ? pkgs."nodejs-12_x"}:
let
nodeEnv = import ./node-env.nix {
inherit (pkgs) stdenv lib python2 runCommand writeTextFile writeShellScript;
inherit pkgs nodejs;
libtool = if pkgs.stdenv.isDarwin then pkgs.darwin.cctools else null;
};
in
import ./node-packages.nix {
inherit (pkgs) fetchurl nix-gitignore stdenv lib fetchgit;
inherit nodeEnv;
}

View file

@ -0,0 +1,588 @@
# This file originates from node2nix
{lib, stdenv, nodejs, python2, pkgs, libtool, runCommand, writeTextFile, writeShellScript}:
let
# Workaround to cope with utillinux in Nixpkgs 20.09 and util-linux in Nixpkgs master
utillinux = if pkgs ? utillinux then pkgs.utillinux else pkgs.util-linux;
python = if nodejs ? python then nodejs.python else python2;
# Create a tar wrapper that filters all the 'Ignoring unknown extended header keyword' noise
tarWrapper = runCommand "tarWrapper" {} ''
mkdir -p $out/bin
cat > $out/bin/tar <<EOF
#! ${stdenv.shell} -e
$(type -p tar) "\$@" --warning=no-unknown-keyword --delay-directory-restore
EOF
chmod +x $out/bin/tar
'';
# Function that generates a TGZ file from a NPM project
buildNodeSourceDist =
{ name, version, src, ... }:
stdenv.mkDerivation {
name = "node-tarball-${name}-${version}";
inherit src;
buildInputs = [ nodejs ];
buildPhase = ''
export HOME=$TMPDIR
tgzFile=$(npm pack | tail -n 1) # Hooks to the pack command will add output (https://docs.npmjs.com/misc/scripts)
'';
installPhase = ''
mkdir -p $out/tarballs
mv $tgzFile $out/tarballs
mkdir -p $out/nix-support
echo "file source-dist $out/tarballs/$tgzFile" >> $out/nix-support/hydra-build-products
'';
};
# Common shell logic
installPackage = writeShellScript "install-package" ''
installPackage() {
local packageName=$1 src=$2
local strippedName
local DIR=$PWD
cd $TMPDIR
unpackFile $src
# Make the base dir in which the target dependency resides first
mkdir -p "$(dirname "$DIR/$packageName")"
if [ -f "$src" ]
then
# Figure out what directory has been unpacked
packageDir="$(find . -maxdepth 1 -type d | tail -1)"
# Restore write permissions to make building work
find "$packageDir" -type d -exec chmod u+x {} \;
chmod -R u+w "$packageDir"
# Move the extracted tarball into the output folder
mv "$packageDir" "$DIR/$packageName"
elif [ -d "$src" ]
then
# Get a stripped name (without hash) of the source directory.
# On old nixpkgs it's already set internally.
if [ -z "$strippedName" ]
then
strippedName="$(stripHash $src)"
fi
# Restore write permissions to make building work
chmod -R u+w "$strippedName"
# Move the extracted directory into the output folder
mv "$strippedName" "$DIR/$packageName"
fi
# Change to the package directory to install dependencies
cd "$DIR/$packageName"
}
'';
# Bundle the dependencies of the package
#
# Only include dependencies if they don't exist. They may also be bundled in the package.
includeDependencies = {dependencies}:
lib.optionalString (dependencies != []) (
''
mkdir -p node_modules
cd node_modules
''
+ (lib.concatMapStrings (dependency:
''
if [ ! -e "${dependency.name}" ]; then
${composePackage dependency}
fi
''
) dependencies)
+ ''
cd ..
''
);
# Recursively composes the dependencies of a package
composePackage = { name, packageName, src, dependencies ? [], ... }@args:
builtins.addErrorContext "while evaluating node package '${packageName}'" ''
installPackage "${packageName}" "${src}"
${includeDependencies { inherit dependencies; }}
cd ..
${lib.optionalString (builtins.substring 0 1 packageName == "@") "cd .."}
'';
pinpointDependencies = {dependencies, production}:
let
pinpointDependenciesFromPackageJSON = writeTextFile {
name = "pinpointDependencies.js";
text = ''
var fs = require('fs');
var path = require('path');
function resolveDependencyVersion(location, name) {
if(location == process.env['NIX_STORE']) {
return null;
} else {
var dependencyPackageJSON = path.join(location, "node_modules", name, "package.json");
if(fs.existsSync(dependencyPackageJSON)) {
var dependencyPackageObj = JSON.parse(fs.readFileSync(dependencyPackageJSON));
if(dependencyPackageObj.name == name) {
return dependencyPackageObj.version;
}
} else {
return resolveDependencyVersion(path.resolve(location, ".."), name);
}
}
}
function replaceDependencies(dependencies) {
if(typeof dependencies == "object" && dependencies !== null) {
for(var dependency in dependencies) {
var resolvedVersion = resolveDependencyVersion(process.cwd(), dependency);
if(resolvedVersion === null) {
process.stderr.write("WARNING: cannot pinpoint dependency: "+dependency+", context: "+process.cwd()+"\n");
} else {
dependencies[dependency] = resolvedVersion;
}
}
}
}
/* Read the package.json configuration */
var packageObj = JSON.parse(fs.readFileSync('./package.json'));
/* Pinpoint all dependencies */
replaceDependencies(packageObj.dependencies);
if(process.argv[2] == "development") {
replaceDependencies(packageObj.devDependencies);
}
replaceDependencies(packageObj.optionalDependencies);
/* Write the fixed package.json file */
fs.writeFileSync("package.json", JSON.stringify(packageObj, null, 2));
'';
};
in
''
node ${pinpointDependenciesFromPackageJSON} ${if production then "production" else "development"}
${lib.optionalString (dependencies != [])
''
if [ -d node_modules ]
then
cd node_modules
${lib.concatMapStrings (dependency: pinpointDependenciesOfPackage dependency) dependencies}
cd ..
fi
''}
'';
# Recursively traverses all dependencies of a package and pinpoints all
# dependencies in the package.json file to the versions that are actually
# being used.
pinpointDependenciesOfPackage = { packageName, dependencies ? [], production ? true, ... }@args:
''
if [ -d "${packageName}" ]
then
cd "${packageName}"
${pinpointDependencies { inherit dependencies production; }}
cd ..
${lib.optionalString (builtins.substring 0 1 packageName == "@") "cd .."}
fi
'';
# Extract the Node.js source code which is used to compile packages with
# native bindings
nodeSources = runCommand "node-sources" {} ''
tar --no-same-owner --no-same-permissions -xf ${nodejs.src}
mv node-* $out
'';
# Script that adds _integrity fields to all package.json files to prevent NPM from consulting the cache (that is empty)
addIntegrityFieldsScript = writeTextFile {
name = "addintegrityfields.js";
text = ''
var fs = require('fs');
var path = require('path');
function augmentDependencies(baseDir, dependencies) {
for(var dependencyName in dependencies) {
var dependency = dependencies[dependencyName];
// Open package.json and augment metadata fields
var packageJSONDir = path.join(baseDir, "node_modules", dependencyName);
var packageJSONPath = path.join(packageJSONDir, "package.json");
if(fs.existsSync(packageJSONPath)) { // Only augment packages that exist. Sometimes we may have production installs in which development dependencies can be ignored
console.log("Adding metadata fields to: "+packageJSONPath);
var packageObj = JSON.parse(fs.readFileSync(packageJSONPath));
if(dependency.integrity) {
packageObj["_integrity"] = dependency.integrity;
} else {
packageObj["_integrity"] = "sha1-000000000000000000000000000="; // When no _integrity string has been provided (e.g. by Git dependencies), add a dummy one. It does not seem to harm and it bypasses downloads.
}
if(dependency.resolved) {
packageObj["_resolved"] = dependency.resolved; // Adopt the resolved property if one has been provided
} else {
packageObj["_resolved"] = dependency.version; // Set the resolved version to the version identifier. This prevents NPM from cloning Git repositories.
}
if(dependency.from !== undefined) { // Adopt from property if one has been provided
packageObj["_from"] = dependency.from;
}
fs.writeFileSync(packageJSONPath, JSON.stringify(packageObj, null, 2));
}
// Augment transitive dependencies
if(dependency.dependencies !== undefined) {
augmentDependencies(packageJSONDir, dependency.dependencies);
}
}
}
if(fs.existsSync("./package-lock.json")) {
var packageLock = JSON.parse(fs.readFileSync("./package-lock.json"));
if(![1, 2].includes(packageLock.lockfileVersion)) {
process.stderr.write("Sorry, I only understand lock file versions 1 and 2!\n");
process.exit(1);
}
if(packageLock.dependencies !== undefined) {
augmentDependencies(".", packageLock.dependencies);
}
}
'';
};
# Reconstructs a package-lock file from the node_modules/ folder structure and package.json files with dummy sha1 hashes
reconstructPackageLock = writeTextFile {
name = "addintegrityfields.js";
text = ''
var fs = require('fs');
var path = require('path');
var packageObj = JSON.parse(fs.readFileSync("package.json"));
var lockObj = {
name: packageObj.name,
version: packageObj.version,
lockfileVersion: 1,
requires: true,
dependencies: {}
};
function augmentPackageJSON(filePath, dependencies) {
var packageJSON = path.join(filePath, "package.json");
if(fs.existsSync(packageJSON)) {
var packageObj = JSON.parse(fs.readFileSync(packageJSON));
dependencies[packageObj.name] = {
version: packageObj.version,
integrity: "sha1-000000000000000000000000000=",
dependencies: {}
};
processDependencies(path.join(filePath, "node_modules"), dependencies[packageObj.name].dependencies);
}
}
function processDependencies(dir, dependencies) {
if(fs.existsSync(dir)) {
var files = fs.readdirSync(dir);
files.forEach(function(entry) {
var filePath = path.join(dir, entry);
var stats = fs.statSync(filePath);
if(stats.isDirectory()) {
if(entry.substr(0, 1) == "@") {
// When we encounter a namespace folder, augment all packages belonging to the scope
var pkgFiles = fs.readdirSync(filePath);
pkgFiles.forEach(function(entry) {
if(stats.isDirectory()) {
var pkgFilePath = path.join(filePath, entry);
augmentPackageJSON(pkgFilePath, dependencies);
}
});
} else {
augmentPackageJSON(filePath, dependencies);
}
}
});
}
}
processDependencies("node_modules", lockObj.dependencies);
fs.writeFileSync("package-lock.json", JSON.stringify(lockObj, null, 2));
'';
};
prepareAndInvokeNPM = {packageName, bypassCache, reconstructLock, npmFlags, production}:
let
forceOfflineFlag = if bypassCache then "--offline" else "--registry http://www.example.com";
in
''
# Pinpoint the versions of all dependencies to the ones that are actually being used
echo "pinpointing versions of dependencies..."
source $pinpointDependenciesScriptPath
# Patch the shebangs of the bundled modules to prevent them from
# calling executables outside the Nix store as much as possible
patchShebangs .
# Deploy the Node.js package by running npm install. Since the
# dependencies have been provided already by ourselves, it should not
# attempt to install them again, which is good, because we want to make
# it Nix's responsibility. If it needs to install any dependencies
# anyway (e.g. because the dependency parameters are
# incomplete/incorrect), it fails.
#
# The other responsibilities of NPM are kept -- version checks, build
# steps, postprocessing etc.
export HOME=$TMPDIR
cd "${packageName}"
runHook preRebuild
${lib.optionalString bypassCache ''
${lib.optionalString reconstructLock ''
if [ -f package-lock.json ]
then
echo "WARNING: Reconstruct lock option enabled, but a lock file already exists!"
echo "This will most likely result in version mismatches! We will remove the lock file and regenerate it!"
rm package-lock.json
else
echo "No package-lock.json file found, reconstructing..."
fi
node ${reconstructPackageLock}
''}
node ${addIntegrityFieldsScript}
''}
npm ${forceOfflineFlag} --nodedir=${nodeSources} ${npmFlags} ${lib.optionalString production "--production"} rebuild
if [ "''${dontNpmInstall-}" != "1" ]
then
# NPM tries to download packages even when they already exist if npm-shrinkwrap is used.
rm -f npm-shrinkwrap.json
npm ${forceOfflineFlag} --nodedir=${nodeSources} ${npmFlags} ${lib.optionalString production "--production"} install
fi
'';
# Builds and composes an NPM package including all its dependencies
buildNodePackage =
{ name
, packageName
, version
, dependencies ? []
, buildInputs ? []
, production ? true
, npmFlags ? ""
, dontNpmInstall ? false
, bypassCache ? false
, reconstructLock ? false
, preRebuild ? ""
, dontStrip ? true
, unpackPhase ? "true"
, buildPhase ? "true"
, meta ? {}
, ... }@args:
let
extraArgs = removeAttrs args [ "name" "dependencies" "buildInputs" "dontStrip" "dontNpmInstall" "preRebuild" "unpackPhase" "buildPhase" "meta" ];
in
stdenv.mkDerivation ({
name = "${name}-${version}";
buildInputs = [ tarWrapper python nodejs ]
++ lib.optional (stdenv.isLinux) utillinux
++ lib.optional (stdenv.isDarwin) libtool
++ buildInputs;
inherit nodejs;
inherit dontStrip; # Stripping may fail a build for some package deployments
inherit dontNpmInstall preRebuild unpackPhase buildPhase;
compositionScript = composePackage args;
pinpointDependenciesScript = pinpointDependenciesOfPackage args;
passAsFile = [ "compositionScript" "pinpointDependenciesScript" ];
installPhase = ''
source ${installPackage}
# Create and enter a root node_modules/ folder
mkdir -p $out/lib/node_modules
cd $out/lib/node_modules
# Compose the package and all its dependencies
source $compositionScriptPath
${prepareAndInvokeNPM { inherit packageName bypassCache reconstructLock npmFlags production; }}
# Create symlink to the deployed executable folder, if applicable
if [ -d "$out/lib/node_modules/.bin" ]
then
ln -s $out/lib/node_modules/.bin $out/bin
fi
# Create symlinks to the deployed manual page folders, if applicable
if [ -d "$out/lib/node_modules/${packageName}/man" ]
then
mkdir -p $out/share
for dir in "$out/lib/node_modules/${packageName}/man/"*
do
mkdir -p $out/share/man/$(basename "$dir")
for page in "$dir"/*
do
ln -s $page $out/share/man/$(basename "$dir")
done
done
fi
# Run post install hook, if provided
runHook postInstall
'';
meta = {
# default to Node.js' platforms
platforms = nodejs.meta.platforms;
} // meta;
} // extraArgs);
# Builds a node environment (a node_modules folder and a set of binaries)
buildNodeDependencies =
{ name
, packageName
, version
, src
, dependencies ? []
, buildInputs ? []
, production ? true
, npmFlags ? ""
, dontNpmInstall ? false
, bypassCache ? false
, reconstructLock ? false
, dontStrip ? true
, unpackPhase ? "true"
, buildPhase ? "true"
, ... }@args:
let
extraArgs = removeAttrs args [ "name" "dependencies" "buildInputs" ];
in
stdenv.mkDerivation ({
name = "node-dependencies-${name}-${version}";
buildInputs = [ tarWrapper python nodejs ]
++ lib.optional (stdenv.isLinux) utillinux
++ lib.optional (stdenv.isDarwin) libtool
++ buildInputs;
inherit dontStrip; # Stripping may fail a build for some package deployments
inherit dontNpmInstall unpackPhase buildPhase;
includeScript = includeDependencies { inherit dependencies; };
pinpointDependenciesScript = pinpointDependenciesOfPackage args;
passAsFile = [ "includeScript" "pinpointDependenciesScript" ];
installPhase = ''
source ${installPackage}
mkdir -p $out/${packageName}
cd $out/${packageName}
source $includeScriptPath
# Create fake package.json to make the npm commands work properly
cp ${src}/package.json .
chmod 644 package.json
${lib.optionalString bypassCache ''
if [ -f ${src}/package-lock.json ]
then
cp ${src}/package-lock.json .
fi
''}
# Go to the parent folder to make sure that all packages are pinpointed
cd ..
${lib.optionalString (builtins.substring 0 1 packageName == "@") "cd .."}
${prepareAndInvokeNPM { inherit packageName bypassCache reconstructLock npmFlags production; }}
# Expose the executables that were installed
cd ..
${lib.optionalString (builtins.substring 0 1 packageName == "@") "cd .."}
mv ${packageName} lib
ln -s $out/lib/node_modules/.bin $out/bin
'';
} // extraArgs);
# Builds a development shell
buildNodeShell =
{ name
, packageName
, version
, src
, dependencies ? []
, buildInputs ? []
, production ? true
, npmFlags ? ""
, dontNpmInstall ? false
, bypassCache ? false
, reconstructLock ? false
, dontStrip ? true
, unpackPhase ? "true"
, buildPhase ? "true"
, ... }@args:
let
nodeDependencies = buildNodeDependencies args;
in
stdenv.mkDerivation {
name = "node-shell-${name}-${version}";
buildInputs = [ python nodejs ] ++ lib.optional (stdenv.isLinux) utillinux ++ buildInputs;
buildCommand = ''
mkdir -p $out/bin
cat > $out/bin/shell <<EOF
#! ${stdenv.shell} -e
$shellHook
exec ${stdenv.shell}
EOF
chmod +x $out/bin/shell
'';
# Provide the dependencies in a development shell through the NODE_PATH environment variable
inherit nodeDependencies;
shellHook = lib.optionalString (dependencies != []) ''
export NODE_PATH=${nodeDependencies}/lib/node_modules
export PATH="${nodeDependencies}/bin:$PATH"
'';
};
in
{
buildNodeSourceDist = lib.makeOverridable buildNodeSourceDist;
buildNodePackage = lib.makeOverridable buildNodePackage;
buildNodeDependencies = lib.makeOverridable buildNodeDependencies;
buildNodeShell = lib.makeOverridable buildNodeShell;
}

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,3 @@
[
"commitizen"
]

View file

@ -0,0 +1,2 @@
source 'https://rubygems.org'
gem 'danger-gitlab'

View file

@ -0,0 +1,92 @@
GEM
remote: https://rubygems.org/
specs:
addressable (2.8.0)
public_suffix (>= 2.0.2, < 5.0)
claide (1.0.3)
claide-plugins (0.9.2)
cork
nap
open4 (~> 1.3)
colored2 (3.1.2)
cork (0.3.0)
colored2 (~> 3.1)
danger (8.3.1)
claide (~> 1.0)
claide-plugins (>= 0.9.2)
colored2 (~> 3.1)
cork (~> 0.1)
faraday (>= 0.9.0, < 2.0)
faraday-http-cache (~> 2.0)
git (~> 1.7)
kramdown (~> 2.3)
kramdown-parser-gfm (~> 1.0)
no_proxy_fix
octokit (~> 4.7)
terminal-table (>= 1, < 4)
danger-gitlab (8.0.0)
danger
gitlab (~> 4.2, >= 4.2.0)
faraday (1.7.0)
faraday-em_http (~> 1.0)
faraday-em_synchrony (~> 1.0)
faraday-excon (~> 1.1)
faraday-httpclient (~> 1.0.1)
faraday-net_http (~> 1.0)
faraday-net_http_persistent (~> 1.1)
faraday-patron (~> 1.0)
faraday-rack (~> 1.0)
multipart-post (>= 1.2, < 3)
ruby2_keywords (>= 0.0.4)
faraday-em_http (1.0.0)
faraday-em_synchrony (1.0.0)
faraday-excon (1.1.0)
faraday-http-cache (2.2.0)
faraday (>= 0.8)
faraday-httpclient (1.0.1)
faraday-net_http (1.0.1)
faraday-net_http_persistent (1.2.0)
faraday-patron (1.0.0)
faraday-rack (1.0.0)
git (1.9.1)
rchardet (~> 1.8)
gitlab (4.17.0)
httparty (~> 0.18)
terminal-table (~> 1.5, >= 1.5.1)
httparty (0.18.1)
mime-types (~> 3.0)
multi_xml (>= 0.5.2)
kramdown (2.3.1)
rexml
kramdown-parser-gfm (1.1.0)
kramdown (~> 2.0)
mime-types (3.3.1)
mime-types-data (~> 3.2015)
mime-types-data (3.2021.0704)
multi_xml (0.6.0)
multipart-post (2.1.1)
nap (1.1.0)
no_proxy_fix (0.1.2)
octokit (4.21.0)
faraday (>= 0.9)
sawyer (~> 0.8.0, >= 0.5.3)
open4 (1.3.4)
public_suffix (4.0.6)
rchardet (1.8.0)
rexml (3.2.5)
ruby2_keywords (0.0.5)
sawyer (0.8.2)
addressable (>= 2.3.5)
faraday (> 0.8, < 2.0)
terminal-table (1.8.0)
unicode-display_width (~> 1.1, >= 1.1.1)
unicode-display_width (1.7.0)
PLATFORMS
ruby
DEPENDENCIES
danger-gitlab
BUNDLED WITH
2.1.4

View file

@ -0,0 +1,14 @@
{ lib, bundlerApp }:
bundlerApp {
pname = "danger-gitlab";
gemdir = ./.;
exes = [ "danger" ];
meta = with lib; {
description = "A gem that exists to ensure all dependencies are set up for Danger with GitLab";
homepage = "https://github.com/danger/danger-gitlab-gem";
license = licenses.mit;
maintainers = teams.serokell.members;
};
}

View file

@ -0,0 +1,388 @@
{
addressable = {
dependencies = ["public_suffix"];
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "022r3m9wdxljpbya69y2i3h9g3dhhfaqzidf95m6qjzms792jvgp";
type = "gem";
};
version = "2.8.0";
};
claide = {
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "0kasxsms24fgcdsq680nz99d5lazl9rmz1qkil2y5gbbssx89g0z";
type = "gem";
};
version = "1.0.3";
};
claide-plugins = {
dependencies = ["cork" "nap" "open4"];
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "0bhw5j985qs48v217gnzva31rw5qvkf7qj8mhp73pcks0sy7isn7";
type = "gem";
};
version = "0.9.2";
};
colored2 = {
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "0jlbqa9q4mvrm73aw9mxh23ygzbjiqwisl32d8szfb5fxvbjng5i";
type = "gem";
};
version = "3.1.2";
};
cork = {
dependencies = ["colored2"];
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "1g6l780z1nj4s3jr11ipwcj8pjbibvli82my396m3y32w98ar850";
type = "gem";
};
version = "0.3.0";
};
danger = {
dependencies = ["claide" "claide-plugins" "colored2" "cork" "faraday" "faraday-http-cache" "git" "kramdown" "kramdown-parser-gfm" "no_proxy_fix" "octokit" "terminal-table"];
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "12nmycrlwr8ca2s0fx76k81gjw12iz15k1n0qanszv5d4l1ykj2l";
type = "gem";
};
version = "8.3.1";
};
danger-gitlab = {
dependencies = ["danger" "gitlab"];
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "1a530kx5s5rbx5yx3jqay56lkksqh0yj468hcpg16faiyv8dfza9";
type = "gem";
};
version = "8.0.0";
};
faraday = {
dependencies = ["faraday-em_http" "faraday-em_synchrony" "faraday-excon" "faraday-httpclient" "faraday-net_http" "faraday-net_http_persistent" "faraday-patron" "faraday-rack" "multipart-post" "ruby2_keywords"];
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "0r6ik2yvsbx6jj30vck32da2bbvj4m0gf4jhp09vr75i1d6jzfvb";
type = "gem";
};
version = "1.7.0";
};
faraday-em_http = {
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "12cnqpbak4vhikrh2cdn94assh3yxza8rq2p9w2j34bqg5q4qgbs";
type = "gem";
};
version = "1.0.0";
};
faraday-em_synchrony = {
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "1vgrbhkp83sngv6k4mii9f2s9v5lmp693hylfxp2ssfc60fas3a6";
type = "gem";
};
version = "1.0.0";
};
faraday-excon = {
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "0h09wkb0k0bhm6dqsd47ac601qiaah8qdzjh8gvxfd376x1chmdh";
type = "gem";
};
version = "1.1.0";
};
faraday-http-cache = {
dependencies = ["faraday"];
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "0lhfwlk4mhmw9pdlgdsl2bq4x45w7s51jkxjryf18wym8iiw36g7";
type = "gem";
};
version = "2.2.0";
};
faraday-httpclient = {
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "0fyk0jd3ks7fdn8nv3spnwjpzx2lmxmg2gh4inz3by1zjzqg33sc";
type = "gem";
};
version = "1.0.1";
};
faraday-net_http = {
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "1fi8sda5hc54v1w3mqfl5yz09nhx35kglyx72w7b8xxvdr0cwi9j";
type = "gem";
};
version = "1.0.1";
};
faraday-net_http_persistent = {
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "0dc36ih95qw3rlccffcb0vgxjhmipsvxhn6cw71l7ffs0f7vq30b";
type = "gem";
};
version = "1.2.0";
};
faraday-patron = {
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "19wgsgfq0xkski1g7m96snv39la3zxz6x7nbdgiwhg5v82rxfb6w";
type = "gem";
};
version = "1.0.0";
};
faraday-rack = {
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "1h184g4vqql5jv9s9im6igy00jp6mrah2h14py6mpf9bkabfqq7g";
type = "gem";
};
version = "1.0.0";
};
git = {
dependencies = ["rchardet"];
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "0s6426k24ph44kbx1qb16ciar170iczs8ivyl29ckin2ygmrrlvm";
type = "gem";
};
version = "1.9.1";
};
gitlab = {
dependencies = ["httparty" "terminal-table"];
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "00p8z8sxk78zik2dwdhflkvaynp5ximy2xc8cw6bz93gkr1xy8n3";
type = "gem";
};
version = "4.17.0";
};
httparty = {
dependencies = ["mime-types" "multi_xml"];
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "17gpnbf2a7xkvsy20jig3ljvx8hl5520rqm9pffj2jrliq1yi3w7";
type = "gem";
};
version = "0.18.1";
};
kramdown = {
dependencies = ["rexml"];
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "0jdbcjv4v7sj888bv3vc6d1dg4ackkh7ywlmn9ln2g9alk7kisar";
type = "gem";
};
version = "2.3.1";
};
kramdown-parser-gfm = {
dependencies = ["kramdown"];
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "0a8pb3v951f4x7h968rqfsa19c8arz21zw1vaj42jza22rap8fgv";
type = "gem";
};
version = "1.1.0";
};
mime-types = {
dependencies = ["mime-types-data"];
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "1zj12l9qk62anvk9bjvandpa6vy4xslil15wl6wlivyf51z773vh";
type = "gem";
};
version = "3.3.1";
};
mime-types-data = {
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "0dlxwc75iy0dj23x824cxpvpa7c8aqcpskksrmb32j6m66h5mkcy";
type = "gem";
};
version = "3.2021.0704";
};
multi_xml = {
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "0lmd4f401mvravi1i1yq7b2qjjli0yq7dfc4p1nj5nwajp7r6hyj";
type = "gem";
};
version = "0.6.0";
};
multipart-post = {
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "1zgw9zlwh2a6i1yvhhc4a84ry1hv824d6g2iw2chs3k5aylpmpfj";
type = "gem";
};
version = "2.1.1";
};
nap = {
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "0xm5xssxk5s03wjarpipfm39qmgxsalb46v1prsis14x1xk935ll";
type = "gem";
};
version = "1.1.0";
};
no_proxy_fix = {
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "006dmdb640v1kq0sll3dnlwj1b0kpf3i1p27ygyffv8lpcqlr6sf";
type = "gem";
};
version = "0.1.2";
};
octokit = {
dependencies = ["faraday" "sawyer"];
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "0ak64rb48d8z98nw6q70r6i0i3ivv61iqla40ss5l79491qfnn27";
type = "gem";
};
version = "4.21.0";
};
open4 = {
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "1cgls3f9dlrpil846q0w7h66vsc33jqn84nql4gcqkk221rh7px1";
type = "gem";
};
version = "1.3.4";
};
public_suffix = {
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "1xqcgkl7bwws1qrlnmxgh8g4g9m10vg60bhlw40fplninb3ng6d9";
type = "gem";
};
version = "4.0.6";
};
rchardet = {
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "1isj1b3ywgg2m1vdlnr41lpvpm3dbyarf1lla4dfibfmad9csfk9";
type = "gem";
};
version = "1.8.0";
};
rexml = {
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "08ximcyfjy94pm1rhcx04ny1vx2sk0x4y185gzn86yfsbzwkng53";
type = "gem";
};
version = "3.2.5";
};
ruby2_keywords = {
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "1vz322p8n39hz3b4a9gkmz9y7a5jaz41zrm2ywf31dvkqm03glgz";
type = "gem";
};
version = "0.0.5";
};
sawyer = {
dependencies = ["addressable" "faraday"];
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "0yrdchs3psh583rjapkv33mljdivggqn99wkydkjdckcjn43j3cz";
type = "gem";
};
version = "0.8.2";
};
terminal-table = {
dependencies = ["unicode-display_width"];
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "1512cngw35hsmhvw4c05rscihc59mnj09m249sm9p3pik831ydqk";
type = "gem";
};
version = "1.8.0";
};
unicode-display_width = {
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "06i3id27s60141x6fdnjn5rar1cywdwy64ilc59cz937303q3mna";
type = "gem";
};
version = "1.7.0";
};
}

View file

@ -0,0 +1,97 @@
{ lib
, python3
, fetchFromGitHub
, fetchpatch
, enableGoogle ? false
, enableAWS ? false
, enableAzure ? false
, enableSSH ? false
}:
python3.pkgs.buildPythonApplication rec {
pname = "dvc";
version = "2.10.2";
format = "setuptools";
src = fetchFromGitHub {
owner = "iterative";
repo = pname;
rev = version;
hash = "sha256-boaQSg0jajWQZKB5wvcP2musVR2/pifT4pU64Y5hiQ0=";
};
nativeBuildInputs = with python3.pkgs; [
setuptools-scm
setuptools-scm-git-archive
];
propagatedBuildInputs = with python3.pkgs; [
aiohttp-retry
appdirs
colorama
configobj
configobj
dictdiffer
diskcache
distro
dpath
dvclive
dvc-render
flatten-dict
flufl_lock
funcy
grandalf
nanotime
networkx
packaging
pathspec
ply
psutil
pydot
pygtrie
pyparsing
python-benedict
requests
rich
ruamel-yaml
scmrepo
shortuuid
shtab
tabulate
toml
tqdm
typing-extensions
voluptuous
zc_lockfile
] ++ lib.optional enableGoogle [
google-cloud-storage
] ++ lib.optional enableAWS [
boto3
] ++ lib.optional enableAzure [
azure-storage-blob
] ++ lib.optional enableSSH [
paramiko
] ++ lib.optionals (pythonOlder "3.8") [
importlib-metadata
] ++ lib.optionals (pythonOlder "3.9") [
importlib-resources
];
postPatch = ''
substituteInPlace setup.cfg \
--replace "grandalf==0.6" "grandalf>=0.6" \
--replace "scmrepo==0.0.19" "scmrepo"
substituteInPlace dvc/daemon.py \
--subst-var-by dvc "$out/bin/dcv"
'';
# Tests require access to real cloud services
doCheck = false;
meta = with lib; {
description = "Version Control System for Machine Learning Projects";
homepage = "https://dvc.org";
license = licenses.asl20;
maintainers = with maintainers; [ cmcdragonkai fab ];
};
}

View file

@ -0,0 +1,18 @@
diff --git a/dvc/daemon.py b/dvc/daemon.py
index 9854a0e1..fefdd613 100644
--- a/dvc/daemon.py
+++ b/dvc/daemon.py
@@ -103,11 +103,8 @@ def daemon(args):
logger.debug("skipping launching a new daemon.")
return
- cmd = ["daemon", "-q"] + args
-
- env = fix_env()
- file_path = os.path.abspath(inspect.stack()[0][1])
- env["PYTHONPATH"] = os.path.dirname(os.path.dirname(file_path))
+ cmd = [ "@dvc@" , "daemon", "-q"] + args
+ env = os.environ.copy()
env[DVC_DAEMON] = "1"
_spawn(cmd, env)

View file

@ -0,0 +1,32 @@
{ lib, fetchurl, fetchpatch, stdenv, zlib, ncurses, libiconv }:
stdenv.mkDerivation rec {
pname = "fnc";
version = "0.12";
src = fetchurl {
url = "https://fnc.bsdbox.org/tarball/${version}/fnc-${version}.tar.gz";
sha256 = "05cg8id4d1ia8y60y3x23167bl1rn2fdpkf1jfj3aklhlihvkbxd";
};
buildInputs = [ libiconv ncurses zlib ];
makeFlags = [ "PREFIX=$(out)" ];
preInstall = ''
mkdir -p $out/bin
'';
meta = with lib; {
description = "Interactive ncurses browser for Fossil repositories";
longDescription = ''
An interactive ncurses browser for Fossil repositories.
fnc uses libfossil to create a fossil ui experience in the terminal.
'';
homepage = "https://fnc.bsdbox.org";
license = licenses.isc;
platforms = platforms.all;
maintainers = with maintainers; [ abbe ];
};
}

View file

@ -0,0 +1,66 @@
{ lib, stdenv
, installShellFiles
, tcl
, libiconv
, fetchurl
, zlib
, openssl
, readline
, withInternalSqlite ? true
, sqlite
, ed
, which
, tcllib
, withJson ? true
}:
stdenv.mkDerivation rec {
pname = "fossil";
version = "2.18";
src = fetchurl {
url = "https://www.fossil-scm.org/home/tarball/version-${version}/fossil-${version}.tar.gz";
sha256 = "0iimdzfdl5687xyqxfadbn640x45n3933q1nfx7b32rl4v3vk778";
};
nativeBuildInputs = [ installShellFiles tcl tcllib ];
buildInputs = [ zlib openssl readline which ed ]
++ lib.optional stdenv.isDarwin libiconv
++ lib.optional (!withInternalSqlite) sqlite;
enableParallelBuilding = true;
doCheck = stdenv.hostPlatform == stdenv.buildPlatform;
configureFlags =
lib.optional (!withInternalSqlite) "--disable-internal-sqlite"
++ lib.optional withJson "--json";
preBuild = ''
export USER=nonexistent-but-specified-user
'';
installPhase = ''
mkdir -p $out/bin
INSTALLDIR=$out/bin make install
installManPage fossil.1
installShellCompletion --name fossil.bash tools/fossil-autocomplete.bash
'';
meta = with lib; {
description = "Simple, high-reliability, distributed software configuration management";
longDescription = ''
Fossil is a software configuration management system. Fossil is
software that is designed to control and track the development of a
software project and to record the history of the project. There are
many such systems in use today. Fossil strives to distinguish itself
from the others by being extremely simple to setup and operate.
'';
homepage = "https://www.fossil-scm.org/";
license = licenses.bsd2;
maintainers = with maintainers; [ maggesi viric ];
platforms = platforms.all;
};
}

View file

@ -0,0 +1,43 @@
{ lib, stdenv, fetchurl }:
stdenv.mkDerivation rec {
pname = "gerrit";
version = "3.5.1";
src = fetchurl {
url = "https://gerrit-releases.storage.googleapis.com/gerrit-${version}.war";
sha256 = "3fb5de878b6470dc8ef65ce22f2709cb8baecb5f16d89497dfaa33a0f33f7920";
};
buildCommand = ''
mkdir -p "$out"/webapps/
ln -s ${src} "$out"/webapps/gerrit-${version}.war
'';
passthru = {
# A list of plugins that are part of the gerrit.war file.
# Use `java -jar gerrit.war ls | grep plugins/` to generate that list.
plugins = [
"codemirror-editor"
"commit-message-length-validator"
"delete-project"
"download-commands"
"gitiles"
"hooks"
"plugin-manager"
"replication"
"reviewnotes"
"singleusergroup"
"webhooks"
];
};
meta = with lib; {
homepage = "https://www.gerritcodereview.com/index.md";
license = licenses.asl20;
description = "A web based code review and repository management for the git version control system";
sourceProvenance = with sourceTypes; [ binaryBytecode ];
maintainers = with maintainers; [ flokli jammerful zimbatm ];
platforms = platforms.unix;
};
}

View file

@ -0,0 +1,48 @@
{ lib, stdenv, fetchurl, jre, makeWrapper }:
stdenv.mkDerivation rec {
pname = "bfg-repo-cleaner";
version = "1.13.0";
jarName = "bfg-${version}.jar";
src = fetchurl {
url = "mirror://maven/com/madgag/bfg/${version}/${jarName}";
sha256 = "1kn84rsvms1v5l1j2xgrk7dc7mnsmxkc6sqd94mnim22vnwvl8mz";
};
nativeBuildInputs = [ makeWrapper ];
buildInputs = [ jre ];
dontUnpack = true;
installPhase = ''
mkdir -p $out/share/java
mkdir -p $out/bin
cp $src $out/share/java/$jarName
makeWrapper "${jre}/bin/java" $out/bin/bfg --add-flags "-cp $out/share/java/$jarName com.madgag.git.bfg.cli.Main"
'';
meta = with lib; {
homepage = "https://rtyley.github.io/bfg-repo-cleaner/";
# Descriptions taken with minor modification from the homepage of bfg-repo-cleaner
description = "Removes large or troublesome blobs in a git repository like git-filter-branch does, but faster";
longDescription = ''
The BFG is a simpler, faster alternative to git-filter-branch for
cleansing bad data out of your Git repository history, in particular removing
crazy big files and removing passwords, credentials, and other private data.
The git-filter-branch command is enormously powerful and can do things
that the BFG can't - but the BFG is much better for the tasks above, because
it's faster (10-720x), simpler (dedicated to just removing things), and
beautiful (can use Scala instead of bash to script customizations).
'';
sourceProvenance = with sourceTypes; [ binaryBytecode ];
license = licenses.gpl3;
maintainers = [ maintainers.changlinli ];
mainProgram = "bfg";
platforms = platforms.unix;
downloadPage = "https://mvnrepository.com/artifact/com.madgag/bfg/${version}";
};
}

View file

@ -0,0 +1,31 @@
{ lib
, buildGoModule
, fetchFromGitHub
, git
}:
buildGoModule rec {
pname = "bit";
version = "1.1.2";
src = fetchFromGitHub {
owner = "chriswalz";
repo = pname;
rev = "v${version}";
sha256 = "sha256-18R0JGbG5QBDghF4SyhXaKe9UY5UzF7Ap0Y061Z1SZ8=";
};
vendorSha256 = "sha256-3Y/B14xX5jaoL44rq9+Nn4niGViLPPXBa8WcJgTvYTA=";
propagatedBuildInputs = [ git ];
# Tests require a repository
doCheck = false;
meta = with lib; {
description = "Command-line tool for git";
homepage = "https://github.com/chriswalz/bit";
license = with licenses; [ asl20 ];
maintainers = with maintainers; [ fab ];
};
}

View file

@ -0,0 +1,2 @@
source 'https://rubygems.org'
gem 'atlassian-stash'

View file

@ -0,0 +1,27 @@
GEM
remote: https://rubygems.org/
specs:
addressable (2.5.0)
public_suffix (~> 2.0, >= 2.0.2)
atlassian-stash (0.7.0)
commander (~> 4.1.2)
git (>= 1.2.5)
json (>= 1.7.5)
launchy (~> 2.4.2)
commander (4.1.6)
highline (~> 1.6.11)
git (1.3.0)
highline (1.6.21)
json (2.0.2)
launchy (2.4.3)
addressable (~> 2.3)
public_suffix (2.0.5)
PLATFORMS
ruby
DEPENDENCIES
atlassian-stash
BUNDLED WITH
2.1.4

View file

@ -0,0 +1,22 @@
{ lib, bundlerEnv, ruby, bundlerUpdateScript }:
bundlerEnv rec {
name = "bitbucket-server-cli-${version}";
version = (import ./gemset.nix).atlassian-stash.version;
inherit ruby;
gemdir = ./.;
pname = "atlassian-stash";
passthru.updateScript = bundlerUpdateScript "bitbucket-server-cli";
meta = with lib; {
description = "A command line interface to interact with BitBucket Server (formerly Atlassian Stash)";
homepage = "https://bitbucket.org/atlassian/bitbucket-server-cli";
license = licenses.mit;
maintainers = with maintainers; [ jgertm nicknovitski ];
mainProgram = "stash";
platforms = platforms.unix;
};
}

View file

@ -0,0 +1,66 @@
{
addressable = {
source = {
remotes = ["https://rubygems.org"];
sha256 = "1j5r0anj8m4qlf2psnldip4b8ha2bsscv11lpdgnfh4nnchzjnxw";
type = "gem";
};
version = "2.5.0";
};
atlassian-stash = {
source = {
remotes = ["https://rubygems.org"];
sha256 = "1rsf9h5w5wiglwv0fqwp45fq06fxbg68cqkc3bpqvps1i1qm0p6i";
type = "gem";
};
version = "0.7.0";
};
commander = {
source = {
remotes = ["https://rubygems.org"];
sha256 = "0x9i8hf083wjlgj09nl1p9j8sr5g7amq0fdmxjqs4cxdbg3wpmsb";
type = "gem";
};
version = "4.1.6";
};
git = {
source = {
remotes = ["https://rubygems.org"];
sha256 = "1waikaggw7a1d24nw0sh8fd419gbf7awh000qhsf411valycj6q3";
type = "gem";
};
version = "1.3.0";
};
highline = {
source = {
remotes = ["https://rubygems.org"];
sha256 = "06bml1fjsnrhd956wqq5k3w8cyd09rv1vixdpa3zzkl6xs72jdn1";
type = "gem";
};
version = "1.6.21";
};
json = {
source = {
remotes = ["https://rubygems.org"];
sha256 = "1lhinj9vj7mw59jqid0bjn2hlfcnq02bnvsx9iv81nl2han603s0";
type = "gem";
};
version = "2.0.2";
};
launchy = {
source = {
remotes = ["https://rubygems.org"];
sha256 = "190lfbiy1vwxhbgn4nl4dcbzxvm049jwc158r2x7kq3g5khjrxa2";
type = "gem";
};
version = "2.4.3";
};
public_suffix = {
source = {
remotes = ["https://rubygems.org"];
sha256 = "040jf98jpp6w140ghkhw2hvc1qx41zvywx5gj7r2ylr1148qnj7q";
type = "gem";
};
version = "2.0.5";
};
}

View file

@ -0,0 +1,46 @@
{ lib
, buildPythonApplication
, fetchFromGitHub
, pytestCheckHook
, pythonOlder
, testfixtures
}:
buildPythonApplication rec {
pname = "bump2version";
version = "1.0.1";
disabled = pythonOlder "3.6";
src = fetchFromGitHub {
owner = "c4urself";
repo = pname;
rev = "v${version}";
sha256 = "sha256-j6HKi3jTwSgGBrA8PCJJNg+yQqRMo1aqaLgPGf4KAKU=";
};
checkInputs = [
pytestCheckHook
testfixtures
];
disabledTests = [
# X's in pytest are git tests which won't run in sandbox
"usage_string_fork"
"test_usage_string"
"test_defaults_in_usage_with_config"
];
pythonImportsCheck = [ "bumpversion" ];
meta = with lib; {
description = "Version-bump your software with a single command";
longDescription = ''
A small command line tool to simplify releasing software by updating
all version strings in your source code by the correct increment.
'';
homepage = "https://github.com/c4urself/bump2version";
license = licenses.mit;
maintainers = with maintainers; [ jefflabonte ];
};
}

View file

@ -0,0 +1,79 @@
{ pname, version, src, gitSrc, buildInputs ? []
, homepage, description, maintainers
}:
{ lib, stdenv, openssl, zlib, asciidoc, libxml2, libxslt
, docbook_xsl, pkg-config
, coreutils, gnused, groff, docutils
, gzip, bzip2, lzip, xz, zstd
, python3Packages
}:
stdenv.mkDerivation {
inherit pname version src gitSrc;
nativeBuildInputs = [
pkg-config asciidoc
] ++ (with python3Packages; [ python wrapPython ]);
buildInputs = buildInputs ++ [
openssl zlib libxml2 libxslt docbook_xsl
];
pythonPath = with python3Packages; [ pygments markdown ];
postPatch = ''
sed -e 's|"gzip"|"${gzip}/bin/gzip"|' \
-e 's|"bzip2"|"${bzip2.bin}/bin/bzip2"|' \
-e 's|"lzip"|"${lzip}/bin/lzip"|' \
-e 's|"xz"|"${xz.bin}/bin/xz"|' \
-e 's|"zstd"|"${zstd}/bin/zstd"|' \
-i ui-snapshot.c
substituteInPlace filters/html-converters/man2html \
--replace 'groff' '${groff}/bin/groff'
substituteInPlace filters/html-converters/rst2html \
--replace 'rst2html.py' '${docutils}/bin/rst2html.py'
'';
# Give cgit a git source tree and pass configuration parameters (as make
# variables).
preBuild = ''
mkdir -p git
tar --strip-components=1 -xf "$gitSrc" -C git
'';
makeFlags = [
"prefix=$(out)"
"CGIT_SCRIPT_PATH=$(out)/cgit/"
"CC=${stdenv.cc.targetPrefix}cc"
"AR=${stdenv.cc.targetPrefix}ar"
];
# Install manpage.
postInstall = ''
# xmllint fails:
#make install-man
# bypassing xmllint works:
a2x --no-xmllint -f manpage cgitrc.5.txt
mkdir -p "$out/share/man/man5"
cp cgitrc.5 "$out/share/man/man5"
wrapPythonProgramsIn "$out/lib/cgit/filters" "$out $pythonPath"
for script in $out/lib/cgit/filters/*.sh $out/lib/cgit/filters/html-converters/txt2html; do
wrapProgram $script --prefix PATH : '${lib.makeBinPath [ coreutils gnused ]}'
done
'';
stripDebugList = [ "cgit" ];
enableParallelBuilding = true;
meta = {
inherit homepage description;
license = lib.licenses.gpl2;
platforms = lib.platforms.linux;
maintainers = maintainers ++ (with lib.maintainers; [ qyliss ]);
};
}

View file

@ -0,0 +1,25 @@
{ lib, fetchurl, callPackage, luajit }:
callPackage (import ./common.nix rec {
pname = "cgit";
version = "1.2.3";
src = fetchurl {
url = "https://git.zx2c4.com/cgit/snapshot/${pname}-${version}.tar.xz";
sha256 = "193d990ym10qlslk0p8mjwp2j6rhqa7fq0y1iff65lvbyv914pss";
};
# cgit is tightly coupled with git and needs a git source tree to build.
# IMPORTANT: Remember to check which git version cgit needs on every version
# bump (look for "GIT_VER" in the top-level Makefile).
gitSrc = fetchurl {
url = "mirror://kernel/software/scm/git/git-2.25.1.tar.xz";
sha256 = "09lzwa183nblr6l8ib35g2xrjf9wm9yhk3szfvyzkwivdv69c9r2";
};
buildInputs = [ luajit ];
homepage = "https://git.zx2c4.com/cgit/about/";
description = "Web frontend for git repositories";
maintainers = with lib.maintainers; [ bjornfor ];
}) {}

View file

@ -0,0 +1,23 @@
{ lib, fetchurl, callPackage }:
callPackage (import ./common.nix rec {
pname = "cgit-pink";
version = "1.4.1";
src = fetchurl {
url = "https://git.causal.agency/cgit-pink/snapshot/cgit-pink-${version}.tar.gz";
sha256 = "1ma6j3r4ba5fhd47pc6xn5bmxaqr8ci2pvky9v100n1hh5n6q97i";
};
# cgit-pink is tightly coupled with git and needs a git source tree to build.
# IMPORTANT: Remember to check which git version cgit-pink needs on every
# version bump (look for "GIT_VER" in the top-level Makefile).
gitSrc = fetchurl {
url = "mirror://kernel/software/scm/git/git-2.36.1.tar.xz";
sha256 = "0w43a35mhc2qf2gjkxjlnkf2lq8g0snf34iy5gqx2678yq7llpa0";
};
homepage = "https://git.causal.agency/cgit-pink/about/";
description = "cgit fork aiming for better maintenance";
maintainers = with lib.maintainers; [ sternenseemann ];
}) {}

View file

@ -0,0 +1,30 @@
{ lib, buildGoModule, fetchFromGitHub, git }:
buildGoModule rec {
pname = "conform";
version = "0.1.0-alpha.25";
src = fetchFromGitHub {
owner = "siderolabs";
repo = "conform";
rev = "v${version}";
sha256 = "sha256-WgWgigpqPoEBY4tLjbzK02WFwrCWPGQWJ5eakLv5IWw=";
};
vendorSha256 = "sha256-Oigt7tAK4jhBQtfG1wdLHqi11NWu6uJn5fmuqTmR76E=";
ldflags = [
"-s"
"-w"
"-X github.com/talos-systems/conform/internal/version.Tag=v${version}"
];
checkInputs = [ git ];
meta = with lib; {
description = "Policy enforcement for your pipelines";
homepage = "https://github.com/siderolabs/conform";
license = licenses.mpl20;
maintainers = with maintainers; [ jmgilman jk ];
};
}

View file

@ -0,0 +1,81 @@
{ lib, stdenv, fetchFromGitHub, ruby, gnugrep, diffutils, git, darcs }:
stdenv.mkDerivation {
pname = "darcs-to-git";
version = "2015-06-04";
src = fetchFromGitHub {
owner = "purcell";
repo = "darcs-to-git";
rev = "e5fee32495908fe0f7d700644c7b37347b7a0a5b";
sha256 = "sha256-UQI3av+0zj1SNwEonwuk5n2RjZN3+tSJFJuFCjrorFM=";
};
patchPhase = let
matchExecution = ''(\<(output_of|system|run)\([^"%]*("|%w\()|^[^"`]*`)'';
in ''
sed -r -i \
-e '1s|^#!.*|#!${ruby}/bin/ruby|' \
-e 's!${matchExecution}git\>!\1${git}/bin/git!' \
-e 's!${matchExecution}darcs\>!\1${darcs}/bin/darcs!' \
-e 's!${matchExecution}diff\>!\1${diffutils}/bin/diff!' \
-e 's!\<egrep\>!${gnugrep}/bin/egrep!g' \
-e 's!%w\(darcs init\)!%w(${darcs}/bin/darcs init)!' \
darcs-to-git
'';
installPhase = ''
install -vD darcs-to-git "$out/bin/darcs-to-git"
'';
doCheck = true;
checkPhase = ''
orig_dir="$(pwd)"
darcs_repos="$(pwd)/darcs_test_repos"
git_repos="$(pwd)/git_test_repos"
test_home="$(pwd)/test_home"
mkdir "$darcs_repos" "$git_repos" "$test_home"
cd "$darcs_repos"
${darcs}/bin/darcs init
echo "this is a test file" > new_file1
${darcs}/bin/darcs add new_file1
HOME="$test_home" ${darcs}/bin/darcs record -a -m c1 -A none
echo "testfile1" > new_file1
echo "testfile2" > new_file2
${darcs}/bin/darcs add new_file2
HOME="$test_home" ${darcs}/bin/darcs record -a -m c2 -A none
${darcs}/bin/darcs mv new_file2 only_one_file
rm -f new_file1
HOME="$test_home" ${darcs}/bin/darcs record -a -m c3 -A none
cd "$git_repos"
HOME="$test_home" PATH= "$orig_dir/darcs-to-git" "$darcs_repos"
assertFileContents() {
echo -n "File $1 contains '$2'..." >&2
if [ "x$(cat "$1")" = "x$2" ]; then
echo " passed." >&2
return 0
else
echo " failed: '$(cat "$1")' != '$2'" >&2
return 1
fi
}
echo "Checking if converted repository matches original repository:" >&2
assertFileContents only_one_file testfile2
${git}/bin/git reset --hard HEAD^
assertFileContents new_file1 testfile1
assertFileContents new_file2 testfile2
${git}/bin/git reset --hard HEAD^
assertFileContents new_file1 "this is a test file"
echo "All checks passed." >&2
cd "$orig_dir"
rm -rf "$darcs_repos" "$git_repos" "$test_home"
'';
meta = {
description = "Converts a Darcs repository into a Git repository";
homepage = "http://www.sanityinc.com/articles/converting-darcs-repositories-to-git";
license = lib.licenses.mit;
platforms = lib.platforms.unix;
};
}

View file

@ -0,0 +1,41 @@
{ stdenv
, lib
, fetchFromGitHub
, rustPlatform
, installShellFiles
, DiskArbitration
, Foundation
, libiconv
, Security
}:
rustPlatform.buildRustPackage rec {
pname = "delta";
version = "0.13.0";
src = fetchFromGitHub {
owner = "dandavison";
repo = pname;
rev = version;
sha256 = "sha256-5h4epV3RORZiynW1fkFLImqPunC3PZ/YzLiSrzescww=";
};
cargoSha256 = "sha256-4dPTcrT8Gx3WfT0sauqnCSmcGE9LrgIqgHrY5l503ZA=";
nativeBuildInputs = [ installShellFiles ];
buildInputs = lib.optionals stdenv.isDarwin [ DiskArbitration Foundation libiconv Security ];
postInstall = ''
installShellCompletion --bash --name delta.bash etc/completion/completion.bash
installShellCompletion --zsh --name _delta etc/completion/completion.zsh
'';
meta = with lib; {
homepage = "https://github.com/dandavison/delta";
description = "A syntax-highlighting pager for git";
changelog = "https://github.com/dandavison/delta/releases/tag/${version}";
license = licenses.mit;
maintainers = with maintainers; [ marsam zowoq SuperSandro2000 ];
};
}

View file

@ -0,0 +1,57 @@
{lib, stdenv, git, perl, ncurses, coreutils, fetchFromGitHub, makeWrapper, ...}:
stdenv.mkDerivation rec {
pname = "diff-so-fancy";
version = "1.4.3";
src = fetchFromGitHub {
owner = "so-fancy";
repo = "diff-so-fancy";
rev = "v${version}";
sha256 = "sha256-/xdBvq2u1s5/yzjwr3MLxpaD1CNktcPijXJTKW3Bc4c=";
};
nativeBuildInputs = [
makeWrapper
];
buildInputs = [
perl # needed for patchShebangs
];
dontBuild = true;
installPhase = ''
runHook preInstall
mkdir -p $out/bin $out/lib/diff-so-fancy
# diff-so-fancy executable searches for it's library relative to
# itself, so we are copying executable to lib, and only symlink it
# from bin/
cp diff-so-fancy $out/lib/diff-so-fancy
cp -r lib $out/lib/diff-so-fancy
ln -s $out/lib/diff-so-fancy/diff-so-fancy $out/bin
# ncurses is needed for `tput`
wrapProgram $out/lib/diff-so-fancy/diff-so-fancy \
--prefix PATH : "${git}/share/git/contrib/diff-highlight" \
--prefix PATH : "${git}/bin" \
--prefix PATH : "${coreutils}/bin" \
--prefix PATH : "${ncurses.out}/bin"
runHook postInstall
'';
meta = with lib; {
homepage = "https://github.com/so-fancy/diff-so-fancy";
description = "Good-looking diffs filter for git";
license = licenses.mit;
platforms = platforms.all;
longDescription = ''
diff-so-fancy builds on the good-lookin' output of git contrib's
diff-highlight to upgrade your diffs' appearances.
'';
maintainers = with maintainers; [ fpletz globin ma27 ];
};
}

View file

@ -0,0 +1,67 @@
{lib, stdenv, fetchFromGitHub, git, mercurial, makeWrapper}:
stdenv.mkDerivation rec {
pname = "fast-export";
version = "210917";
src = fetchFromGitHub {
owner = "frej";
repo = pname;
rev = "v${version}";
sha256 = "0xg8r9rbqv7mriraqxdks2mgj7j4c9gap3kc05y1kxi3nniywyd3";
};
nativeBuildInputs = [ makeWrapper ];
buildInputs = [mercurial.python mercurial];
installPhase = ''
binPath=$out/bin
libexecPath=$out/libexec/${pname}
sitepackagesPath=$out/${mercurial.python.sitePackages}
mkdir -p $binPath $libexecPath $sitepackagesPath
# Patch shell scripts so they can execute the Python scripts
sed -i "s|ROOT=.*|ROOT=$libexecPath|" *.sh
mv hg-fast-export.sh hg-reset.sh $binPath
mv hg-fast-export.py hg-reset.py $libexecPath
mv hg2git.py pluginloader plugins $sitepackagesPath
for script in $out/bin/*.sh; do
wrapProgram $script \
--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 lib; {
description = "Import mercurial into git";
homepage = "https://repo.or.cz/w/fast-export.git";
license = licenses.gpl2;
maintainers = [ maintainers.koral ];
platforms = platforms.unix;
};
}

View file

@ -0,0 +1,45 @@
{ fetchFromGitHub
, gitMinimal
, gfold
, lib
, libiconv
, makeWrapper
, rustPlatform
, Security
, stdenv
, testVersion
}:
let
pname = "gfold";
version = "4.0.0";
in
rustPlatform.buildRustPackage {
inherit pname version;
src = fetchFromGitHub {
owner = "nickgerace";
repo = pname;
rev = version;
sha256 = "1yh5173qhi9bd41zss9k21nm0xnr2sa918kvlyr5xvzhq47rrwz5";
};
cargoSha256 = "sha256-o2fMIlj+veTmhfqi7BVpxr3520SOwWLmVS2UU83EVjo=";
buildInputs = lib.optionals stdenv.isDarwin [ libiconv Security ];
passthru.tests.version = testVersion {
package = gfold;
command = "gfold --version";
inherit version;
};
meta = with lib; {
description =
"CLI tool to help keep track of your Git repositories, written in Rust";
homepage = "https://github.com/nickgerace/gfold";
license = licenses.asl20;
maintainers = [ maintainers.shanesveller ];
platforms = platforms.unix;
};
}

View file

@ -0,0 +1,64 @@
{ lib
, buildGoModule
, fetchFromGitHub
, installShellFiles
, makeWrapper
, bash
, coreutils
, git
, pandoc
}:
let
version = "1.3.0";
commit = "5bfe79b3632f15c442e8dc51ec206ab76354487f";
in buildGoModule {
pname = "gg-scm";
inherit version;
src = fetchFromGitHub {
owner = "gg-scm";
repo = "gg";
rev = "v${version}";
sha256 = "e628aeddb94d2470de860df09ef65499f8c5493fb336bf3df8502842ee02487f";
};
postPatch = ''
substituteInPlace cmd/gg/editor_unix.go \
--replace /bin/sh ${bash}/bin/sh
'';
subPackages = [ "cmd/gg" ];
ldflags = [
"-s" "-w"
"-X" "main.versionInfo=${version}"
"-X" "main.buildCommit=${commit}"
];
vendorSha256 = "214dc073dad7b323ea449acf24c5b578d573432eeaa1506cf5761a2d7f5ce405";
nativeBuildInputs = [ pandoc installShellFiles makeWrapper ];
checkInputs = [ bash coreutils git ];
buildInputs = [ bash git ];
postInstall = ''
wrapProgram $out/bin/gg --suffix PATH : ${git}/bin
pandoc --standalone --to man misc/gg.1.md -o misc/gg.1
installManPage misc/gg.1
installShellCompletion --cmd gg \
--bash misc/gg.bash \
--zsh misc/_gg.zsh
'';
meta = with lib; {
mainProgram = "gg";
description = "Git with less typing";
longDescription = ''
gg is an alternative command-line interface for Git heavily inspired by Mercurial.
It's designed for less typing in common workflows,
making Git easier to use for both novices and advanced users alike.
'';
homepage = "https://gg-scm.io/";
changelog = "https://github.com/gg-scm/gg/blob/v${version}/CHANGELOG.md";
license = licenses.asl20;
maintainers = with maintainers; [ zombiezen ];
};
}

View file

@ -0,0 +1,52 @@
{ lib, fetchFromGitHub, buildGoModule, installShellFiles }:
buildGoModule rec {
pname = "gh";
version = "2.11.3";
src = fetchFromGitHub {
owner = "cli";
repo = "cli";
rev = "v${version}";
sha256 = "sha256-b00bP0usTpYr5EShyckmZ+a1Mw48payU/KllSck47fI=";
};
vendorSha256 = "sha256-soNQXtpQ217scP606UA05+r9WIrUAMOCDBsfLKrVD+Q=";
nativeBuildInputs = [ installShellFiles ];
# upstream unsets these to handle cross but it breaks our build
postPatch = ''
substituteInPlace Makefile \
--replace "GOOS= GOARCH= GOARM= GOFLAGS= CGO_ENABLED=" ""
'';
buildPhase = ''
runHook preBuild
make GO_LDFLAGS="-s -w" GH_VERSION=${version} bin/gh manpages
runHook postBuild
'';
installPhase = ''
runHook preInstall
install -Dm755 bin/gh -t $out/bin
installManPage share/man/*/*.[1-9]
for shell in bash fish zsh; do
$out/bin/gh completion -s $shell > gh.$shell
installShellCompletion gh.$shell
done
runHook postInstall
'';
# fails with `unable to find git executable in PATH`
doCheck = false;
meta = with lib; {
description = "GitHub CLI tool";
homepage = "https://cli.github.com/";
changelog = "https://github.com/cli/cli/releases/tag/v${version}";
license = licenses.mit;
maintainers = with maintainers; [ zowoq ];
};
}

View file

@ -0,0 +1,36 @@
{ lib, buildGoModule, fetchFromGitHub }:
buildGoModule rec {
pname = "ghorg";
version = "1.7.13";
src = fetchFromGitHub {
owner = "gabrie30";
repo = "ghorg";
rev = "v${version}";
sha256 = "sha256-EQCu+2qMKu+e6G5iXAQn5cz0MZqHrF2wnKNO8Fkpp/Y=";
};
doCheck = false;
vendorSha256 = null;
subPackages = [ "." ];
ldflags = [ "-s" "-w" "-X main.version=${version}" ];
meta = with lib; {
description = "Quickly clone an entire org/users repositories into one directory";
longDescription = ''
ghorg allows you to quickly clone all of an orgs, or users repos into a
single directory. This can be useful in many situations including
- Searching an orgs/users codebase with ack, silver searcher, grep etc..
- Bash scripting
- Creating backups
- Onboarding
- Performing Audits
'';
homepage = "https://github.com/gabrie30/ghorg";
license = licenses.asl20;
maintainers = with maintainers; [ vidbina ];
};
}

View file

@ -0,0 +1,33 @@
{ lib, buildGoModule, fetchFromGitHub }:
buildGoModule rec {
pname = "ghq";
version = "1.3.0";
src = fetchFromGitHub {
owner = "x-motemen";
repo = "ghq";
rev = "v${version}";
sha256 = "sha256-tGublfC6EeY3T/45lxmsm5zsmlgq/guS64OutAWy6AY=";
};
vendorSha256 = "sha256-ZUnnvZERWXnOs4hybw8JDlGdM7QFaMfs6o3SYy0UwTM=";
doCheck = false;
ldflags = [
"-X=main.Version=${version}"
];
postInstall = ''
install -m 444 -D ${src}/misc/zsh/_ghq $out/share/zsh/site-functions/_ghq
install -m 444 -D ${src}/misc/bash/_ghq $out/share/bash-completion/completions/_ghq
'';
meta = {
description = "Remote repository management made easy";
homepage = "https://github.com/x-motemen/ghq";
maintainers = with lib.maintainers; [ sigma ];
license = lib.licenses.mit;
};
}

View file

@ -0,0 +1,30 @@
{ lib, buildGoModule, fetchFromGitHub }:
buildGoModule rec {
pname = "ghr";
version = "0.14.0";
src = fetchFromGitHub {
owner = "tcnksm";
repo = "ghr";
rev = "v${version}";
sha256 = "sha256-pF1TPvQLPa5BbXZ9rRCq7xWofXCBRa9CDgNxX/kaTMo=";
};
vendorSha256 = "sha256-+e9Q4Pw9pJyOXVz85KhOSuybj1PBcJi51fGR3a2Gixk=";
# Tests require a Github API token, and networking
doCheck = false;
doInstallCheck = true;
installCheckPhase = ''
$out/bin/ghr --version
'';
meta = with lib; {
homepage = "https://github.com/tcnksm/ghr";
description = "Upload multiple artifacts to GitHub Release in parallel";
license = licenses.mit;
maintainers = [ maintainers.ivar ];
};
}

View file

@ -0,0 +1,34 @@
{ lib, stdenv, fetchFromGitHub, rustPlatform, installShellFiles, Security }:
rustPlatform.buildRustPackage rec {
pname = "git-absorb";
version = "0.6.7";
src = fetchFromGitHub {
owner = "tummychow";
repo = pname;
rev = "refs/tags/${version}";
sha256 = "sha256-qhUw1wjXn1tyiH175+BadcoKoZ0wHxpMTKDIKOcJjQ0=";
};
nativeBuildInputs = [ installShellFiles ];
buildInputs = lib.optionals stdenv.isDarwin [ Security ];
cargoSha256 = "sha256-Wh2kA12CggbgdofWJwPAy+587qfMUPSy9nQmO11+keY=";
postInstall = ''
installManPage Documentation/git-absorb.1
installShellCompletion --cmd git-absorb \
--bash <($out/bin/git-absorb --gen-completions bash) \
--fish <($out/bin/git-absorb --gen-completions fish) \
--zsh <($out/bin/git-absorb --gen-completions zsh)
'';
meta = with lib; {
homepage = "https://github.com/tummychow/git-absorb";
description = "git commit --fixup, but automatic";
license = [ licenses.bsd3 ];
maintainers = [ maintainers.marsam ];
};
}

View file

@ -0,0 +1,33 @@
{ lib, buildPythonApplication, fetchFromGitHub, pyqt5, qt5, git-annex-adapter }:
buildPythonApplication rec {
pname = "git-annex-metadata-gui";
version = "0.2.0";
src = fetchFromGitHub {
owner = "alpernebbi";
repo = "git-annex-metadata-gui";
rev = "v${version}";
sha256 = "03kch67k0q9lcs817906g864wwabkn208aiqvbiyqp1qbg99skam";
};
prePatch = ''
substituteInPlace setup.py --replace "'PyQt5', " ""
'';
nativeBuildInputs = [ qt5.wrapQtAppsHook ];
preFixup = ''
makeWrapperArgs+=("''${qtWrapperArgs[@]}")
'';
propagatedBuildInputs = [ pyqt5 git-annex-adapter ];
meta = with lib; {
homepage = "https://github.com/alpernebbi/git-annex-metadata-gui";
description = "Graphical interface for git-annex metadata commands";
maintainers = with maintainers; [ dotlambda ];
license = licenses.gpl3Plus;
platforms = with platforms; linux;
};
}

View file

@ -0,0 +1,25 @@
{ lib
, buildPythonApplication
, fetchPypi
, dropbox
, annexremote
, humanfriendly
}:
buildPythonApplication rec {
pname = "git-annex-remote-dbx";
version = "1.0.3";
src = fetchPypi {
inherit pname version;
sha256 = "5b6f8025ed1e9877f06882ddbd81f701a8e094647ab97595e2afc09016835a7c";
};
propagatedBuildInputs = [ dropbox annexremote humanfriendly ];
meta = with lib; {
description = "A git-annex special remote for Dropbox";
homepage = "https://pypi.org/project/git-annex-remote-dbx/";
license = licenses.mit;
};
}

View file

@ -0,0 +1,34 @@
{ lib
, buildPythonApplication
, fetchPypi
, annexremote
, drivelib
, GitPython
, tenacity
, humanfriendly
}:
buildPythonApplication rec {
pname = "git-annex-remote-googledrive";
version = "1.3.2";
src = fetchPypi {
inherit pname version;
sha256 = "0rwjcdvfgzdlfgrn1rrqwwwiqqzyh114qddrbfwd46ld5spry6r1";
};
propagatedBuildInputs = [ annexremote drivelib GitPython tenacity humanfriendly ];
# while git-annex does come with a testremote command that *could* be used,
# testing this special remote obviously depends on authenticating with google
doCheck = false;
pythonImportsCheck = [ "git_annex_remote_googledrive" ];
meta = with lib; {
description = "A git-annex special remote for Google Drive";
homepage = "https://pypi.org/project/git-annex-remote-googledrive/";
license = licenses.gpl3Only;
maintainers = with maintainers; [ gravndal ];
};
}

View file

@ -0,0 +1,30 @@
{ lib, stdenv, fetchFromGitHub, rclone, makeWrapper }:
stdenv.mkDerivation rec {
pname = "git-annex-remote-rclone";
version = "0.6";
rev = "v${version}";
src = fetchFromGitHub {
inherit rev;
owner = "DanielDent";
repo = "git-annex-remote-rclone";
sha256 = "0j0hlxji8d974fq7zd4xc02n0jpi31ylhxc7z4zp8iiwad5mkpxp";
};
nativeBuildInputs = [ makeWrapper ];
installPhase = ''
mkdir -p $out/bin
cp git-annex-remote-rclone $out/bin
wrapProgram "$out/bin/git-annex-remote-rclone" \
--prefix PATH ":" "${lib.makeBinPath [ rclone ]}"
'';
meta = with lib; {
homepage = "https://github.com/DanielDent/git-annex-remote-rclone";
description = "Use rclone supported cloud storage providers with git-annex";
license = licenses.gpl3;
maintainers = [ maintainers.montag451 ];
};
}

View file

@ -0,0 +1,27 @@
{ lib, stdenv, fetchgit, autoconf, automake, libtool, gmp }:
stdenv.mkDerivation rec {
pname = "git-annex-utils";
version = "0.04-3-g531bb33";
src = fetchgit {
url = "http://git.mysteryvortex.com/repositories/git-annex-utils.git";
rev = "531bb33";
sha256 = "1sv7s2ykc840cjwbfn7ayy743643x9i1lvk4cd55w9l052xvzj65";
};
nativeBuildInputs = [ autoconf automake ];
buildInputs = [ libtool gmp ];
preConfigure = "./autogen.sh";
meta = {
description = "gadu, a du like utility for annexed files";
longDescription = ''
This is a set of utilities that are handy to use with git-annex repositories.
Currently there is only one utility gadu, a du like utility for annexed files.
'';
homepage = "http://git-annex.mysteryvortex.com/git-annex-utils.html";
license = lib.licenses.gpl3;
maintainers = with lib.maintainers; [ woffs ];
mainProgram = "gadu";
platforms = lib.platforms.all;
};
}

View file

@ -0,0 +1,23 @@
{ lib, buildGoPackage, fetchFromGitHub }:
buildGoPackage rec {
pname = "git-appraise-unstable";
version = "2018-02-26";
rev = "2414523905939525559e4b2498c5597f86193b61";
goPackagePath = "github.com/google/git-appraise";
src = fetchFromGitHub {
inherit rev;
owner = "google";
repo = "git-appraise";
sha256 = "04xkp1jpas1dfms6i9j09bgkydih0q10nhwn75w9ds8hi2qaa3sa";
};
meta = {
description = "Distributed code review system for Git repos";
homepage = "https://github.com/google/git-appraise";
license = lib.licenses.asl20;
maintainers = [ lib.maintainers.vdemeester ];
};
}

View file

@ -0,0 +1,26 @@
{ python3Packages, lib, git, graphviz }:
python3Packages.buildPythonApplication rec {
pname = "git-big-picture";
version = "1.1.1";
format = "wheel";
src = python3Packages.fetchPypi {
inherit format version;
pname = "git_big_picture"; # underscores needed for working download URL
python = "py3"; # i.e. no Python 2.7
sha256 = "a20a480057ced1585c4c38497d27a5012f12dd29697313f0bb8fa6ddbb5c17d8";
};
postFixup = ''
wrapProgram $out/bin/git-big-picture \
--prefix PATH ":" ${ lib.makeBinPath [ git graphviz ] }
'';
meta = {
description = "Tool for visualization of Git repositories";
homepage = "https://github.com/git-big-picture/git-big-picture";
license = lib.licenses.gpl3Plus;
maintainers = [ lib.maintainers.nthorne ];
};
}

View file

@ -0,0 +1,57 @@
{ lib
, fetchFromGitHub
, fetchpatch
, git
, libiconv
, ncurses
, openssl
, pkg-config
, rustPlatform
, sqlite
, stdenv
, Security
, SystemConfiguration
}:
rustPlatform.buildRustPackage rec {
pname = "git-branchless";
version = "0.3.12";
src = fetchFromGitHub {
owner = "arxanas";
repo = "git-branchless";
rev = "v${version}";
sha256 = "sha256-1bUHltONLfJumkxPnzGJFMMyS02LVqjpDL+KgiewyoQ=";
};
cargoSha256 = "sha256-3+ULHqtKAhf4AdoLPK/3IqnfOcskoh6ctlQnY1oTHJ8=";
nativeBuildInputs = [ pkg-config ];
buildInputs = [
ncurses
openssl
sqlite
] ++ lib.optionals stdenv.isDarwin [
Security
SystemConfiguration
libiconv
];
preCheck = ''
export TEST_GIT=${git}/bin/git
export TEST_GIT_EXEC_PATH=$(${git}/bin/git --exec-path)
'';
# FIXME: these tests deadlock when run in the Nix sandbox
checkFlags = [
"--skip=test_checkout_pty"
"--skip=test_next_ambiguous_interactive"
];
meta = with lib; {
description = "A suite of tools to help you visualize, navigate, manipulate, and repair your commit history";
homepage = "https://github.com/arxanas/git-branchless";
license = licenses.gpl2Only;
maintainers = with maintainers; [ msfjarvis nh2 hmenke ];
};
}

View file

@ -0,0 +1,37 @@
{ lib, buildGoModule, fetchFromGitHub }:
buildGoModule rec {
pname = "git-bug";
version = "0.7.2"; # the `rev` below pins the version of the source to get
rev = "cc4a93c8ce931b1390c61035b888ad17110b7bd6";
src = fetchFromGitHub {
inherit rev;
owner = "MichaelMure";
repo = "git-bug";
sha256 = "0r6wh0y1fj3d3fbbrzq5n9k6z94xvwqww3xfbslkgyrin5bmziiq";
};
vendorSha256 = "15hhsrwwjc4krfc2d0r15lys3vr9rb9xk62pan4jr9ycbv0dny90";
doCheck = false;
ldflags = [
"-X github.com/MichaelMure/git-bug/commands.GitCommit=${rev}"
"-X github.com/MichaelMure/git-bug/commands.GitLastTag=${version}"
"-X github.com/MichaelMure/git-bug/commands.GitExactTag=${version}"
];
postInstall = ''
install -D -m 0644 misc/bash_completion/git-bug "$out/share/bash-completion/completions/git-bug"
install -D -m 0644 misc/zsh_completion/git-bug "$out/share/zsh/site-functions/git-bug"
install -D -m 0644 -t "$out/share/man/man1" doc/man/*
'';
meta = with lib; {
description = "Distributed bug tracker embedded in Git";
homepage = "https://github.com/MichaelMure/git-bug";
license = licenses.gpl3Only;
maintainers = with maintainers; [ royneary ];
};
}

View file

@ -0,0 +1,26 @@
{ lib, fetchFromGitHub, buildGoModule }:
buildGoModule rec {
pname = "git-chglog";
version = "0.15.1";
src = fetchFromGitHub {
owner = "git-chglog";
repo = "git-chglog";
rev = "v${version}";
sha256 = "sha256-UlhJ004ceXpdB/9296cL2sbBYsjV8D+3YS1vmFgnko8=";
};
vendorSha256 = "sha256-FLFPcmkrhZ+/UX1xpexsDv3cgC/Ocj4qTFJOX+rmdyQ=";
ldflags = [ "-s" "-w" "-X=main.Version=v${version}" ];
subPackages = [ "cmd/git-chglog" ];
meta = with lib; {
description = "CHANGELOG generator implemented in Go (Golang)";
homepage = "https://github.com/git-chglog/git-chglog";
license = licenses.mit;
maintainers = with maintainers; [ ldenefle ];
};
}

View file

@ -0,0 +1,54 @@
{ stdenv, lib, fetchFromGitHub, autoconf, makeWrapper
, curl, libiconv, mercurial, zlib
}:
let
python3 = mercurial.python;
in
stdenv.mkDerivation rec {
pname = "git-cinnabar";
version = "0.5.7";
src = fetchFromGitHub {
owner = "glandium";
repo = "git-cinnabar";
rev = version;
sha256 = "04dsjlsw98avrckldx7rc70b2zsbajzkyqqph4c7d9xd5djh3yaj";
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 = ''
runHook preInstall
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
runHook postInstall
'';
meta = with lib; {
homepage = "https://github.com/glandium/git-cinnabar";
description = "git remote helper to interact with mercurial repositories";
license = licenses.gpl2Only;
maintainers = with maintainers; [ qyliss ];
platforms = platforms.all;
};
}

View file

@ -0,0 +1,27 @@
{ lib, stdenv, fetchFromGitHub, rustPlatform, Security }:
rustPlatform.buildRustPackage rec {
pname = "git-cliff";
version = "0.7.0";
src = fetchFromGitHub {
owner = "orhun";
repo = "git-cliff";
rev = "v${version}";
sha256 = "sha256-wVHL2+didmiN7UlEeIuSr+8LhkFKCOD3of4rKVg1i1o=";
};
cargoSha256 = "sha256-5jhloUnaGXXDu2LCO86SMJo8ETIxLAivv3hx9gEqtJ4=";
# attempts to run the program on .git in src which is not deterministic
doCheck = false;
buildInputs = lib.optionals stdenv.isDarwin [ Security ];
meta = with lib; {
description = "A highly customizable Changelog Generator that follows Conventional Commit specifications";
homepage = "https://github.com/orhun/git-cliff";
license = licenses.gpl3Only;
maintainers = with maintainers; [ siraben ];
};
}

View file

@ -0,0 +1,21 @@
{ lib, rustPlatform, fetchFromGitHub }:
rustPlatform.buildRustPackage rec {
pname = "git-codeowners";
version = "0.1.2";
src = fetchFromGitHub {
owner = "softprops";
repo = "git-codeowners";
rev = "v${version}";
sha256 = "0bzq4ridzb4l1zqrj1r0vlzkjpgfaqwky5jf49cwjhz4ybwrfpkq";
};
cargoSha256 = "00wi64v2zn8rp8fjwbdwyvl3pva5sn9xclaawp2m222dqnlszb2d";
meta = with lib; {
homepage = "https://github.com/softprops/git-codeowners";
description = "a git extension to work with CODEOWNERS files";
license = licenses.mit;
maintainers = with maintainers; [ zimbatm ];
};
}

View file

@ -0,0 +1,26 @@
{ lib, buildGoModule, fetchFromGitHub, git }:
buildGoModule rec {
pname = "git-codereview";
version = "1.0.3";
src = fetchFromGitHub {
owner = "golang";
repo = "review";
rev = "v${version}";
sha256 = "sha256-Hyo2UWGlxxeSz3E73DeA0VoOnBJ1VedvpshnATJGbFo=";
};
vendorSha256 = "sha256-pQpattmS9VmO3ZIQUFn66az8GSmB4IvYhTTCFn6SUmo=";
ldflags = [ "-s" "-w" ];
checkInputs = [ git ];
meta = with lib; {
description = "Manage the code review process for Git changes using a Gerrit server";
homepage = "https://golang.org/x/review/git-codereview";
license = licenses.bsd3;
maintainers = [ maintainers.edef ];
};
}

View file

@ -0,0 +1,34 @@
{ lib, fetchFromGitHub, python3Packages, gettext, git, qt5 }:
let
inherit (python3Packages) buildPythonApplication pyqt5 sip_4 pyinotify;
in buildPythonApplication rec {
pname = "git-cola";
version = "3.12.0";
src = fetchFromGitHub {
owner = "git-cola";
repo = "git-cola";
rev = "v${version}";
sha256 = "1f8jpfa916nszj431cmp41bxj2m76k2n8qnscqgxrc0k3pnnp3wc";
};
buildInputs = [ git gettext ];
propagatedBuildInputs = [ pyqt5 sip_4 pyinotify ];
nativeBuildInputs = [ qt5.wrapQtAppsHook ];
doCheck = false;
preFixup = ''
makeWrapperArgs+=("''${qtWrapperArgs[@]}")
'';
meta = with lib; {
homepage = "https://github.com/git-cola/git-cola";
description = "A sleek and powerful Git GUI";
license = licenses.gpl2;
platforms = platforms.linux;
maintainers = [ maintainers.bobvanderlinden ];
};
}

View file

@ -0,0 +1,23 @@
{ lib, buildGoModule, fetchFromGitHub }:
buildGoModule rec {
pname = "git-credential-1password";
version = "1.0.0";
src = fetchFromGitHub {
owner = "develerik";
repo = pname;
rev = "v${version}";
sha256 = "sha256-WMEUa0mSxmeFXQBejwxtlhWuuLKguugavRaBUVpYA3g=";
};
vendorSha256 = "sha256-eUjaSpmQpSOvSBW+7ajXiEDepkyvHsIiEY0RGpfnao0=";
meta = with lib; {
description = "A git credential helper for 1Password";
homepage = "https://github.com/develerik/git-credential-1password";
changelog = "https://github.com/develerik/git-credential-1password/releases/tag/v${version}";
license = licenses.isc;
maintainers = [ maintainers.ivankovnatsky ];
};
}

View file

@ -0,0 +1,65 @@
{ fetchFromGitHub
, git
, gnupg
, makeWrapper
, openssl
, lib
, stdenv
, libxslt
, docbook_xsl
}:
stdenv.mkDerivation rec {
pname = "git-crypt";
version = "0.7.0";
src = fetchFromGitHub {
owner = "AGWA";
repo = pname;
rev = version;
sha256 = "sha256-GcGCX6hoKL+sNLAeGEzZpaM+cdFjcNlwYExfOFEPi0I=";
};
strictDeps = true;
nativeBuildInputs = [ libxslt makeWrapper ];
buildInputs = [ openssl ];
postPatch = ''
substituteInPlace commands.cpp \
--replace '(escape_shell_arg(our_exe_path()))' '= "git-crypt"'
'';
makeFlags = [
"PREFIX=${placeholder "out"}"
"ENABLE_MAN=yes"
"DOCBOOK_XSL=${docbook_xsl}/share/xml/docbook-xsl-nons/manpages/docbook.xsl"
];
postFixup = ''
wrapProgram $out/bin/git-crypt \
--suffix PATH : ${lib.makeBinPath [ git gnupg ]}
'';
meta = with lib; {
homepage = "https://www.agwa.name/projects/git-crypt";
description = "Transparent file encryption in git";
longDescription = ''
git-crypt enables transparent encryption and decryption of files in a git
repository. Files which you choose to protect are encrypted when
committed, and decrypted when checked out. git-crypt lets you freely
share a repository containing a mix of public and private
content. git-crypt gracefully degrades, so developers without the secret
key can still clone and commit to a repository with encrypted files. This
lets you store your secret material (such as keys or passwords) in the
same repository as your code, without requiring you to lock down your
entire repository.
'';
downloadPage = "https://github.com/AGWA/git-crypt/releases";
license = licenses.gpl3;
maintainers = with maintainers; [ dochang SuperSandro2000 ];
platforms = platforms.unix;
};
}

View file

@ -0,0 +1,28 @@
{ lib, python3Packages, fetchFromGitHub, git }:
python3Packages.buildPythonApplication rec {
pname = "git-delete-merged-branches";
version = "6.4.0";
src = fetchFromGitHub {
owner = "hartwork";
repo = pname;
rev = version;
sha256 = "sha256-swAc8ObZY78nVQyjTrVG81xBqTYnWHVDFpiUApbowqU=";
};
propagatedBuildInputs = with python3Packages; [
colorama
prompt-toolkit
];
checkInputs = [ git ]
++ (with python3Packages; [ parameterized ]);
meta = with lib; {
description = "Command-line tool to delete merged Git branches";
homepage = "https://pypi.org/project/git-delete-merged-branches/";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ SuperSandro2000 ];
};
}

View file

@ -0,0 +1,42 @@
{ lib, stdenv, fetchFromGitHub, unixtools, which }:
stdenv.mkDerivation rec {
pname = "git-extras";
version = "6.4.0";
src = fetchFromGitHub {
owner = "tj";
repo = "git-extras";
rev = version;
sha256 = "sha256-Cn7IXMzgg0QIsNIHz+X14Gkmop0UbsSBlGlGkmg71ek=";
};
postPatch = ''
patchShebangs check_dependencies.sh
'';
nativeBuildInputs = [
unixtools.column
which
];
dontBuild = true;
installFlags = [
"PREFIX=${placeholder "out"}"
"SYSCONFDIR=${placeholder "out"}/share"
];
postInstall = ''
# bash completion is already handled by make install
install -D etc/git-extras-completion.zsh $out/share/zsh/site-functions/_git_extras
'';
meta = with lib; {
homepage = "https://github.com/tj/git-extras";
description = "GIT utilities -- repo summary, repl, changelog population, author commit percentages and more";
license = licenses.mit;
platforms = platforms.all;
maintainers = with maintainers; [ spwhitt cko SuperSandro2000 ];
};
}

View file

@ -0,0 +1,4 @@
source 'https://rubygems.org'
# Specify your gem's dependencies in git_fame.gemspec
gem "git_fame"

View file

@ -0,0 +1,26 @@
GEM
remote: https://rubygems.org/
specs:
git_fame (2.5.2)
hirb (~> 0.7.3)
memoist (~> 0.14.0)
method_profiler (~> 2.0.1)
progressbar (~> 0.21.0)
scrub_rb (~> 1.0.1)
trollop (~> 2.1.2)
hirb (0.7.3)
memoist (0.14.0)
method_profiler (2.0.1)
hirb (>= 0.6.0)
progressbar (0.21.0)
scrub_rb (1.0.1)
trollop (2.1.2)
PLATFORMS
ruby
DEPENDENCIES
git_fame
BUNDLED WITH
2.1.4

View file

@ -0,0 +1,21 @@
{ lib, bundlerEnv, ruby, bundlerUpdateScript }:
bundlerEnv {
inherit ruby;
pname = "git_fame";
gemdir = ./.;
passthru.updateScript = bundlerUpdateScript "git-fame";
meta = with lib; {
description = ''
A command-line tool that helps you summarize and pretty-print collaborators based on contributions
'';
homepage = "http://oleander.io/git-fame-rb";
license = licenses.mit;
maintainers = with maintainers; [ expipiplus1 nicknovitski ];
platforms = platforms.unix;
};
}

View file

@ -0,0 +1,60 @@
{
git_fame = {
dependencies = ["hirb" "memoist" "method_profiler" "progressbar" "scrub_rb" "trollop"];
source = {
remotes = ["https://rubygems.org"];
sha256 = "02k5ls5zyif8skdbnym6zw9y76whlnksw2m94jsh2n1ygk98izdd";
type = "gem";
};
version = "2.5.2";
};
hirb = {
source = {
remotes = ["https://rubygems.org"];
sha256 = "0mzch3c2lvmf8gskgzlx6j53d10j42ir6ik2dkrl27sblhy76cji";
type = "gem";
};
version = "0.7.3";
};
memoist = {
source = {
remotes = ["https://rubygems.org"];
sha256 = "03d3h6kp16bf0crqg1cxdgp1d2iyzn53d3phbmjh4pjybqls0gcm";
type = "gem";
};
version = "0.14.0";
};
method_profiler = {
dependencies = ["hirb"];
source = {
remotes = ["https://rubygems.org"];
sha256 = "1ax04qrrv7fqp5ayxaxhn72660pybdkpkvmgiwbg7bs7x5ijjzd8";
type = "gem";
};
version = "2.0.1";
};
progressbar = {
source = {
remotes = ["https://rubygems.org"];
sha256 = "17haw9c6c9q6imsn83pii32jnihpg76jgd09x7y4hjqq45n3qcdh";
type = "gem";
};
version = "0.21.0";
};
scrub_rb = {
source = {
remotes = ["https://rubygems.org"];
sha256 = "0dwg33w83w17aiij9kcbi7irj7lh045nh9prjgkzjya3f1j60d3x";
type = "gem";
};
version = "1.0.1";
};
trollop = {
source = {
remotes = ["https://rubygems.org"];
sha256 = "0415y63df86sqj43c0l82and65ia5h64if7n0znkbrmi6y0jwhl8";
type = "gem";
};
version = "2.1.2";
};
}

View file

@ -0,0 +1,39 @@
{ lib
, stdenv
, fetchFromGitea
, rustPlatform
, libiconv
, Security
, installShellFiles
}:
rustPlatform.buildRustPackage rec {
pname = "git-gone";
version = "0.3.8";
src = fetchFromGitea {
domain = "codeberg.org";
owner = "flausch";
repo = pname;
rev = "v${version}";
sha256 = "sha256-hKbq2rJwEZI3391RsZXsQSjjp7rSqglUckRDYAu42KE=";
};
cargoSha256 = "sha256-gBQ4V8Bwx6Di8aVnOYwx0UZZIIOFxZAXT7Tl1Yli0Fk=";
nativeBuildInputs = [ installShellFiles ];
buildInputs = lib.optionals stdenv.isDarwin [ libiconv Security ];
postInstall = ''
installManPage git-gone.1
'';
meta = with lib; {
description = "Cleanup stale Git branches of merge requests";
homepage = "https://codeberg.org/flausch/git-gone";
changelog = "https://codeberg.org/flausch/git-gone/raw/tag/v${version}/CHANGELOG.md";
license = licenses.asl20;
maintainers = [ maintainers.marsam ];
};
}

View file

@ -0,0 +1,43 @@
{ lib, stdenv, fetchFromGitHub, gitMinimal, docutils }:
stdenv.mkDerivation rec {
pname = "git-hub";
version = "2.1.3";
src = fetchFromGitHub {
owner = "sociomantic-tsunami";
repo = "git-hub";
rev = "v${version}";
sha256 = "sha256-fb/WDmBx1Vayu4fLeG+D1nmHJJawgIAAXcQsABsenBo=";
};
nativeBuildInputs = [
gitMinimal # Used during build to generate Bash completion.
docutils
];
postPatch = ''
patchShebangs .
'';
enableParallelBuilding = true;
installFlags = [ "prefix=$(out)" "sysconfdir=$(out)/etc" ];
postInstall = ''
# Remove inert ftdetect vim plugin and a README that's a man page subset:
rm -r $out/share/{doc,vim}
'';
meta = with lib; {
inherit (src.meta) homepage;
description = "Git command line interface to GitHub";
longDescription = ''
A simple command line interface to GitHub, enabling most useful GitHub
tasks (like creating and listing pull request or issues) to be accessed
directly through the Git command line.
'';
license = licenses.gpl3Plus;
platforms = platforms.all;
};
}

View file

@ -0,0 +1,36 @@
{ lib, stdenv, fetchFromGitHub, installShellFiles, rustPlatform, pkg-config, openssl, darwin }:
with rustPlatform;
buildRustPackage rec {
pname = "git-ignore";
version = "1.2.0";
src = fetchFromGitHub {
owner = "sondr3";
repo = pname;
rev = "v${version}";
sha256 = "sha256-Bfr+4zDi6QqirlqccW1jU95eb4q82ZFG9LtT2mCPYLc=";
};
cargoSha256 = "sha256-ehEUI4M2IxqS6QhyqOncwP+w6IGbIlSFNIP/FEVH/JI=";
nativeBuildInputs = [ pkg-config installShellFiles ];
buildInputs = [ openssl ]
++ lib.optionals stdenv.isDarwin [
darwin.apple_sdk.frameworks.Security
];
postInstall = ''
installManPage assets/git-ignore.1
# There's also .elv and .ps1 completion files but I don't know where to install those
installShellCompletion assets/git-ignore.{bash,fish} --zsh assets/_git-ignore
'';
meta = with lib; {
description = "Quickly and easily fetch .gitignore templates from gitignore.io";
homepage = "https://github.com/sondr3/git-ignore";
license = licenses.gpl3Plus;
maintainers = [ maintainers.sondr3 ];
};
}

View file

@ -0,0 +1,24 @@
{ lib, buildPythonApplication, fetchPypi, installShellFiles }:
buildPythonApplication rec {
pname = "git-imerge";
version = "1.2.0";
src = fetchPypi {
inherit pname version;
sha256 = "df5818f40164b916eb089a004a47e5b8febae2b4471a827e3aaa4ebec3831a3f";
};
nativeBuildInputs = [ installShellFiles ];
postInstall = ''
installShellCompletion --bash completions/git-imerge
'';
meta = with lib; {
homepage = "https://github.com/mhagger/git-imerge";
description = "Perform a merge between two branches incrementally";
license = licenses.gpl2Plus;
maintainers = [ maintainers.spwhitt ];
};
}

View file

@ -0,0 +1,36 @@
{ lib, stdenv, fetchFromGitHub, rustPlatform, libiconv, Security }:
rustPlatform.buildRustPackage rec {
pname = "git-interactive-rebase-tool";
version = "2.2.0";
src = fetchFromGitHub {
owner = "MitMaro";
repo = pname;
rev = version;
sha256 = "sha256-++KTMzTt84dowoZP+Bc9E/jUS21YN5ybKrlpQUKCir0=";
};
cargoSha256 = "sha256-OUaP/nDs589FYaGYcleRMTQNu3/q/2wBjHSv2q8OyjA=";
buildInputs = lib.optionals stdenv.isDarwin [ libiconv Security ];
checkFlags = [
"--skip=external_editor::tests::edit_success"
"--skip=external_editor::tests::editor_non_zero_exit"
"--skip=external_editor::tests::empty_edit_abort_rebase"
"--skip=external_editor::tests::empty_edit_error"
"--skip=external_editor::tests::empty_edit_noop"
"--skip=external_editor::tests::empty_edit_re_edit_rebase_file"
"--skip=external_editor::tests::empty_edit_undo_and_edit"
];
meta = with lib; {
homepage = "https://github.com/MitMaro/git-interactive-rebase-tool";
description = "Native cross platform full feature terminal based sequence editor for git interactive rebase";
changelog = "https://github.com/MitMaro/git-interactive-rebase-tool/releases/tag/${version}";
license = licenses.mit;
maintainers = with maintainers; [ masaeedu SuperSandro2000 zowoq ];
mainProgram = "interactive-rebase-tool";
};
}

View file

@ -0,0 +1,50 @@
{ lib
, buildPythonApplication
, pytest-mock
, pytestCheckHook
, fetchFromGitHub
, installShellFiles
, git
, nix-update-script
, testers
, git-machete
}:
buildPythonApplication rec {
pname = "git-machete";
version = "3.10.0";
src = fetchFromGitHub {
owner = "virtuslab";
repo = pname;
rev = "v${version}";
sha256 = "sha256-jZkc9YA4kE/Gr4/FRzgd0VvEjSrw5rk7DB5qH8Z5o6c=";
};
nativeBuildInputs = [ installShellFiles ];
checkInputs = [ git pytest-mock pytestCheckHook ];
postInstall = ''
installShellCompletion --bash --name git-machete completion/git-machete.completion.bash
installShellCompletion --zsh --name _git-machete completion/git-machete.completion.zsh
installShellCompletion --fish completion/git-machete.fish
'';
postInstallCheck = ''
test "$($out/bin/git-machete version)" = "git-machete version ${version}"
'';
passthru = {
updateScript = nix-update-script {
attrPath = pname;
};
};
meta = with lib; {
homepage = "https://github.com/VirtusLab/git-machete";
description = "Git repository organizer and rebase/merge workflow automation tool";
license = licenses.mit;
maintainers = with maintainers; [ blitz ];
};
}

View file

@ -0,0 +1,29 @@
{ lib, stdenv, fetchFromGitHub }:
stdenv.mkDerivation rec {
pname = "git-my";
version = "1.1.2";
src = fetchFromGitHub {
owner = "davidosomething";
repo = "git-my";
rev = version;
sha256 = "0jji5zw25jygj7g4f6f3k0p0s9g37r8iad8pa0s67cxbq2v4sc0v";
};
dontBuild = true;
installPhase = ''
install -Dm755 -t "$out"/bin ./git-my
'';
meta = with lib; {
description =
"List remote branches if they're merged and/or available locally";
homepage = "https://github.com/davidosomething/git-my";
license = licenses.free;
maintainers = with maintainers; [ bb010g ];
platforms = platforms.all;
};
}

View file

@ -0,0 +1,34 @@
{ lib, stdenv, fetchFromGitHub, git, perl, makeWrapper }:
with lib;
stdenv.mkDerivation rec {
pname = "git-octopus";
version = "1.4";
installFlags = [ "prefix=$(out)" ];
nativeBuildInputs = [ makeWrapper ];
# perl provides shasum
postInstall = ''
for f in $out/bin/*; do
wrapProgram $f --prefix PATH : ${makeBinPath [ git perl ]}
done
'';
src = fetchFromGitHub {
owner = "lesfurets";
repo = "git-octopus";
rev = "v${version}";
sha256 = "14p61xk7jankp6gc26xciag9fnvm7r9vcbhclcy23f4ghf4q4sj1";
};
meta = {
homepage = "https://github.com/lesfurets/git-octopus";
description = "The continuous merge workflow";
license = licenses.lgpl3;
platforms = platforms.unix;
maintainers = [maintainers.mic92];
};
}

View file

@ -0,0 +1,39 @@
{ lib, stdenv, git, xdg-utils, gnugrep, fetchFromGitHub, installShellFiles, makeWrapper, pandoc }:
stdenv.mkDerivation rec {
pname = "git-open";
version = "2.1.0";
src = fetchFromGitHub {
owner = "paulirish";
repo = "git-open";
rev = "v${version}";
sha256 = "11n46bngvca5wbdbfcxzjhjbfdbad7sgf7h9gf956cb1q8swsdm0";
};
nativeBuildInputs = [ installShellFiles makeWrapper pandoc ];
buildPhase = ''
# marked-man is broken and severly outdated.
# pandoc with some extra metadata is good enough and produces a by man readable file.
cat <(echo echo '% git-open (1) Version ${version} | Git manual') git-open.1.md > tmp
mv tmp git-open.1.md
pandoc --standalone --to man git-open.1.md -o git-open.1
'';
installPhase = ''
mkdir -p $out/bin
cp git-open $out/bin
installManPage git-open.1
wrapProgram $out/bin/git-open \
--prefix PATH : "${lib.makeBinPath [ git xdg-utils gnugrep ]}"
'';
meta = with lib; {
homepage = "https://github.com/paulirish/git-open";
description = "Open the GitHub page or website for a repository in your browser";
license = licenses.mit;
platforms = platforms.all;
maintainers = with maintainers; [ jlesquembre SuperSandro2000 ];
};
}

View file

@ -0,0 +1,38 @@
{ lib, fetchFromGitHub
, libiconv
, openssl
, pkg-config
, rustPlatform
, stdenv
, Security
, SystemConfiguration
}:
rustPlatform.buildRustPackage rec {
pname = "git-quickfix";
version = "0.0.5";
src = fetchFromGitHub {
owner = "siedentop";
repo = pname;
rev = "v${version}";
sha256 = "sha256-LDA94pH5Oodf80mEENoURh+MJSg122SVWFVo9i1TEQg=";
};
nativeBuildInputs = [ pkg-config ];
buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [
Security
SystemConfiguration
libiconv
];
cargoSha256 = "sha256-QTPy0w45AawEU4fHf2FMGpL3YM+iTNnyiI4+mDJzWaE=";
meta = with lib; {
description = "Quickfix allows you to commit changes in your git repository to a new branch without leaving the current branch";
homepage = "https://github.com/siedentop/git-quickfix";
license = licenses.gpl3;
platforms = platforms.all;
maintainers = with maintainers; [ msfjarvis ];
};
}

View file

@ -0,0 +1,29 @@
{lib, stdenv, fetchFromGitHub}:
stdenv.mkDerivation rec {
pname = "git-radar";
version = "0.6";
src = fetchFromGitHub {
owner = "michaeldfallen";
repo = "git-radar";
rev = "v${version}";
sha256 = "0c3zp8s4w7m4s71qgwk1jyfc8yzw34f2hi43x1w437ypgabwg81j";
};
dontBuild = true;
installPhase = ''
mkdir -p $out/bin
cp git-radar fetch.sh prompt.bash prompt.zsh radar-base.sh $out
ln -s $out/git-radar $out/bin
'';
meta = with lib; {
homepage = "https://github.com/michaeldfallen/git-radar";
license = licenses.mit;
description = "A tool you can add to your prompt to provide at-a-glance information on your git repo";
platforms = with platforms; linux ++ darwin;
maintainers = with maintainers; [ kamilchm ];
};
}

View file

@ -0,0 +1,35 @@
{lib, stdenv, git, less, fetchFromGitHub, makeWrapper
# util-linuxMinimal is included because we need the column command
, util-linux
}:
stdenv.mkDerivation rec {
pname = "git-recent";
version = "1.1.1";
src = fetchFromGitHub {
owner = "paulirish";
repo = "git-recent";
rev = "v${version}";
sha256 = "1g8i6vpjnnfh7vc1269c91bap267w4bxdqqwnzb8x18vqgn2fx8i";
};
nativeBuildInputs = [ makeWrapper ];
buildPhase = null;
installPhase = ''
mkdir -p $out/bin
cp git-recent $out/bin
wrapProgram $out/bin/git-recent \
--prefix PATH : "${lib.makeBinPath [ git less util-linux ]}"
'';
meta = with lib; {
homepage = "https://github.com/paulirish/git-recent";
description = "See your latest local git branches, formatted real fancy";
license = licenses.mit;
platforms = platforms.all;
maintainers = [ maintainers.jlesquembre ];
};
}

View file

@ -0,0 +1,31 @@
{ lib, buildPythonApplication, fetchFromGitHub, isPy3k, botocore, pytest, mock
, flake8, tox, awscli }:
buildPythonApplication rec {
pname = "git-remote-codecommit";
version = "1.15.1";
disabled = !isPy3k;
src = fetchFromGitHub {
owner = "aws";
repo = pname;
rev = version;
sha256 = "1vvp7i8ghmq72v57f6smh441h35xnr5ar628q2mr40bzvcifwymw";
};
propagatedBuildInputs = [ botocore ];
checkInputs = [ pytest mock flake8 tox awscli ];
checkPhase = ''
pytest
'';
meta = {
description =
"Git remote prefix to simplify pushing to and pulling from CodeCommit";
maintainers = [ lib.maintainers.zaninime ];
homepage = "https://github.com/awslabs/git-remote-codecommit";
license = lib.licenses.asl20;
};
}

View file

@ -0,0 +1,36 @@
{ lib, stdenv, fetchFromGitHub, docutils, makeWrapper
, gnupg, curl, rsync, coreutils
, gawk, gnused, gnugrep
}:
stdenv.mkDerivation rec {
pname = "git-remote-gcrypt";
version = "1.4";
rev = version;
src = fetchFromGitHub {
inherit rev;
owner = "spwhitton";
repo = "git-remote-gcrypt";
sha256 = "sha256-uHgz8Aj5w8UOo/XbptCRKON1RAdDfFsLL9ZDEF1QrPQ=";
};
outputs = [ "out" "man" ];
nativeBuildInputs = [ docutils makeWrapper ];
installPhase = ''
prefix="$out" ./install.sh
wrapProgram "$out/bin/git-remote-gcrypt" \
--prefix PATH ":" "${lib.makeBinPath [ gnupg curl rsync coreutils
gawk gnused gnugrep ]}"
'';
meta = with lib; {
homepage = "https://spwhitton.name/tech/code/git-remote-gcrypt";
description = "A git remote helper for GPG-encrypted remotes";
license = licenses.gpl3;
maintainers = with maintainers; [ ellis montag451 ];
platforms = platforms.unix;
};
}

View file

@ -0,0 +1,32 @@
{ lib, fetchFromGitHub, python3Packages
, asciidoc, xmlto, docbook_xsl, docbook_xml_dtd_45, libxslt, libxml2
}:
python3Packages.buildPythonApplication rec {
pname = "git-remote-hg";
version = "1.0.3.2";
src = fetchFromGitHub {
owner = "mnauw";
repo = "git-remote-hg";
rev = "v${version}";
sha256 = "0b5lfbrcrvzpz380817md00lbgy5yl4y76vs3vm0bpm5wmr7c027";
};
nativeBuildInputs = [
asciidoc xmlto docbook_xsl docbook_xml_dtd_45 libxslt libxml2
];
propagatedBuildInputs = with python3Packages; [ mercurial ];
postInstall = ''
make install-doc prefix=$out
'';
meta = with lib; {
homepage = "https://github.com/mnauw/git-remote-hg";
description = "Semi-official Mercurial bridge from Git project";
license = licenses.gpl2;
maintainers = with maintainers; [ qyliss ];
platforms = platforms.unix;
};
}

View file

@ -0,0 +1,33 @@
{ lib, stdenv, fetchFromGitHub, makeWrapper, git, gnused }:
stdenv.mkDerivation rec {
pname = "git-reparent";
version = "unstable-2017-09-03";
src = fetchFromGitHub {
owner = "MarkLodato";
repo = "git-reparent";
rev = "a99554a32524a86421659d0f61af2a6c784b7715";
sha256 = "0v0yxydpw6r4awy0hb7sbnh520zsk86ibzh1xjf3983yhsvkfk5v";
};
nativeBuildInputs = [ makeWrapper ];
dontBuild = true;
installPhase = ''
install -m755 -Dt $out/bin git-reparent
'';
postFixup = ''
wrapProgram $out/bin/git-reparent --prefix PATH : "${lib.makeBinPath [ git gnused ]}"
'';
meta = with lib; {
inherit (src.meta) homepage;
description = "Git command to recommit HEAD with a new set of parents";
maintainers = [ maintainers.marsam ];
license = licenses.gpl2;
platforms = platforms.unix;
};
}

View file

@ -0,0 +1,33 @@
{ stdenv, lib, fetchFromGitHub, makeWrapper, git, gnupg, gawk }:
stdenv.mkDerivation rec {
pname = "git-secret";
version = "0.4.0";
src = fetchFromGitHub {
repo = "git-secret";
owner = "sobolevn";
rev = "v${version}";
sha256 = "sha256-Mtuj+e/yCDr4XkmYkWUFJB3cqOT5yOMOq9P/QJV1S80=";
};
nativeBuildInputs = [ makeWrapper ];
installPhase = ''
install -D git-secret $out/bin/git-secret
wrapProgram $out/bin/git-secret \
--prefix PATH : "${lib.makeBinPath [ git gnupg gawk ]}"
mkdir $out/share
cp -r man $out/share
'';
meta = {
description = "A bash-tool to store your private data inside a git repository";
homepage = "https://git-secret.io";
license = lib.licenses.mit;
maintainers = [ lib.maintainers.lo1tuma ];
platforms = lib.platforms.all;
};
}

View file

@ -0,0 +1,32 @@
{ lib, stdenv, fetchFromGitHub, makeWrapper, git, coreutils }:
stdenv.mkDerivation rec {
pname = "git-secrets";
version = "1.3.0";
src = fetchFromGitHub {
owner = "awslabs";
repo = "git-secrets";
rev = version;
sha256 = "10lnxg0q855zi3d6804ivlrn6dc817kilzdh05mmz8a0ccvm2qc7";
};
nativeBuildInputs = [ makeWrapper ];
dontBuild = true;
installPhase = ''
install -m755 -Dt $out/bin git-secrets
install -m444 -Dt $out/share/man/man1 git-secrets.1
wrapProgram $out/bin/git-secrets \
--prefix PATH : "${lib.makeBinPath [ git coreutils ]}"
'';
meta = with lib; {
description = "Prevents you from committing secrets and credentials into git repositories";
homepage = "https://github.com/awslabs/git-secrets";
license = licenses.asl20;
platforms = platforms.all;
};
}

View file

@ -0,0 +1,32 @@
{ lib, stdenv, fetchFromGitHub, makeWrapper, git }:
stdenv.mkDerivation rec {
pname = "git-standup";
version = "2.3.2";
src = fetchFromGitHub {
owner = "kamranahmedse";
repo = pname;
rev = version;
sha256 = "1xnn0jjha56v7l2vj45zzxncl6m5x2hq6nkffgc1bcikhp1pidn7";
};
nativeBuildInputs = [ makeWrapper ];
dontBuild = true;
installPhase = ''
install -Dm755 -t $out/bin git-standup
wrapProgram $out/bin/git-standup \
--prefix PATH : "${lib.makeBinPath [ git ]}"
'';
meta = with lib; {
description = "Recall what you did on the last working day";
homepage = "https://github.com/kamranahmedse/git-standup";
license = licenses.mit;
maintainers = [ maintainers.marsam ];
platforms = platforms.all;
};
}

View file

@ -0,0 +1,27 @@
{ stdenv, lib, fetchFromGitHub, ... }:
stdenv.mkDerivation {
pname = "git-stree";
version = "0.4.5";
src = fetchFromGitHub {
owner = "tdd";
repo = "git-stree";
rev = "0.4.5";
sha256 = "0y5h44n38w6rhy9m591dvibxpfggj3q950ll7y4h49bhpks4m0l9";
};
installPhase = ''
mkdir -p $out/bin $out/share/bash-completion/completions
install -m 0755 git-stree $out/bin/
install -m 0644 git-stree-completion.bash $out/share/bash-completion/completions/
'';
meta = with lib; {
description = "A better Git subtree helper command";
homepage = "http://deliciousinsights.github.io/git-stree";
license = licenses.mit;
maintainers = [ maintainers.benley ];
platforms = platforms.unix;
};
}

View file

@ -0,0 +1,58 @@
{ lib, stdenv, fetchFromGitHub, git, makeWrapper, which }:
stdenv.mkDerivation rec {
pname = "git-subrepo";
version = "0.4.1";
src = fetchFromGitHub {
owner = "ingydotnet";
repo = "git-subrepo";
rev = version;
sha256 = "0n10qnc8kyms6cv65k1n5xa9nnwpwbjn9h2cq47llxplawzqgrvp";
};
nativeBuildInputs = [
makeWrapper
which
];
buildInputs = [
git
];
makeFlags = [
"PREFIX=${placeholder "out"}"
"INSTALL_LIB=${placeholder "out"}/bin"
"INSTALL_MAN=${placeholder "out"}/share/man/man1"
];
patches = [
# Allow zsh completion to work even though we aren't installing from a git
# clone. Also submitted upstream as
# https://github.com/ingydotnet/git-subrepo/pull/420
./zsh-completion.patch
];
postInstall = ''
ZSH_COMP_DIR="$out/share/zsh/vendor-completions"
mkdir -p "$ZSH_COMP_DIR"
cp share/zsh-completion/_git-subrepo "$ZSH_COMP_DIR/"
BASH_COMP_DIR="$out/share/bash-completion/completions"
mkdir -p "$BASH_COMP_DIR"
cp share/completion.bash "$BASH_COMP_DIR/git-subrepo"
'';
postFixup = ''
wrapProgram $out/bin/git-subrepo \
--prefix PATH : "${git}/bin"
'';
meta = with lib; {
homepage = "https://github.com/ingydotnet/git-subrepo";
description = "Git submodule alternative";
license = licenses.mit;
platforms = platforms.unix ++ platforms.darwin;
maintainers = [ maintainers.ryantrinkle ];
};
}

View file

@ -0,0 +1,32 @@
diff --git a/pkg/bin/generate-completion.pl b/pkg/bin/generate-completion.pl
index 85ae3b8..d3e423c 100644
--- a/pkg/bin/generate-completion.pl
+++ b/pkg/bin/generate-completion.pl
@@ -82,11 +82,6 @@ sub generate_zsh {
# DO NOT EDIT. This file generated by pkg/bin/generate-completion.pl.
-if [[ -z $GIT_SUBREPO_ROOT ]]; then
- echo 'GIT_SUBREPO_ROOT is null; has `/path/to/git-subrepo/.rc` been sourced?'
- return 3
-fi
-
_git-subrepo() {
typeset -A opt_args
local curcontext="$curcontext" state line context
diff --git a/share/zsh-completion/_git-subrepo b/share/zsh-completion/_git-subrepo
index fc82be2..a8069d9 100644
--- a/share/zsh-completion/_git-subrepo
+++ b/share/zsh-completion/_git-subrepo
@@ -3,11 +3,6 @@
# DO NOT EDIT. This file generated by pkg/bin/generate-completion.pl.
-if [[ -z $GIT_SUBREPO_ROOT ]]; then
- echo 'GIT_SUBREPO_ROOT is null; has `/path/to/git-subrepo/.rc` been sourced?'
- return 3
-fi
-
_git-subrepo() {
typeset -A opt_args
local curcontext="$curcontext" state line context

View file

@ -0,0 +1,26 @@
{ lib, stdenv, rustPlatform, fetchFromGitHub, pkg-config, openssl, curl, libiconv, Security }:
rustPlatform.buildRustPackage rec {
pname = "git-subset";
version = "0.1.1";
src = fetchFromGitHub {
owner = "jasonwhite";
repo = pname;
rev = "v${version}";
sha256 = "02z2r0kcd0nnn1zjslp6xxam5ddbhrmzn67qzxhlamsw0p9vvkbb";
};
cargoSha256 = "0lc9m9prmhr4ipjh95cfczvlmpp9scryksvqd49h4acyr904n7ry";
nativeBuildInputs = [ pkg-config ];
buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [ curl libiconv Security ];
meta = with lib; {
description = "Super fast Git tree filtering";
homepage = "https://github.com/jasonwhite/git-subset";
license = licenses.mit;
maintainers = [ maintainers.marsam ];
};
}

View file

@ -0,0 +1,24 @@
{ lib, buildGoModule, fetchFromGitHub }:
buildGoModule rec {
pname = "git-subtrac";
version = "0.04";
src = fetchFromGitHub {
owner = "apenwarr";
repo = pname;
rev = "v${version}";
sha256 = "0p1n29k2a2rpznwxlwzkmx38ic6g041k9vx7msvick7cydn417fx";
};
vendorSha256 = "0m64grnmhjvfsw7a56474s894sgd24rvcp5kamhzzyc4q556hqny";
doCheck = false;
meta = with lib; {
description = "Keep the content for your git submodules all in one place: the parent repo";
homepage = "https://github.com/apenwarr/git-subtrac";
license = licenses.asl20;
maintainers = [ maintainers.marsam ];
};
}

View file

@ -0,0 +1,49 @@
{ lib, stdenv, fetchFromGitHub, coreutils, git, gnugrep, gnused, makeWrapper, inotify-tools }:
stdenv.mkDerivation rec {
pname = "git-sync";
version = "unstable-2022-03-20";
src = fetchFromGitHub {
owner = "simonthum";
repo = "git-sync";
rev = "8466b77a38b3d5e8b4ed9e3cb1b635e475eeb415";
sha256 = "sha256-8rCwpmHV6wgFCLzPJOKzwN5mG8uD5KIlGFwcgQD+SK4=";
};
nativeBuildInputs = [ makeWrapper ];
dontBuild = true;
installPhase = ''
mkdir -p $out/bin
cp -a git-* $out/bin/
cp -a contrib/git-* $out/bin/
'';
wrapperPath = with lib; makeBinPath [
inotify-tools
coreutils
git
gnugrep
gnused
];
postFixup = ''
wrap_path="${wrapperPath}":$out/bin
wrapProgram $out/bin/git-sync \
--prefix PATH : $wrap_path
wrapProgram $out/bin/git-sync-on-inotify \
--prefix PATH : $wrap_path
'';
meta = {
description = "A script to automatically synchronize a git repository";
homepage = "https://github.com/simonthum/git-sync";
maintainers = with lib.maintainers; [ imalison ];
license = lib.licenses.cc0;
platforms = with lib.platforms; unix;
};
}

Some files were not shown because too many files have changed in this diff Show more