mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-28 15:54:32 +00:00
4f0dadbf38
After final improvements to the official formatter implementation, this commit now performs the first treewide reformat of Nix files using it. This is part of the implementation of RFC 166. Only "inactive" files are reformatted, meaning only files that aren't being touched by any PR with activity in the past 2 months. This is to avoid conflicts for PRs that might soon be merged. Later we can do a full treewide reformat to get the rest, which should not cause as many conflicts. A CI check has already been running for some time to ensure that new and already-formatted files are formatted, so the files being reformatted here should also stay formatted. This commit was automatically created and can be verified using nix-builda08b3a4d19
.tar.gz \ --argstr baseRevb32a094368
result/bin/apply-formatting $NIXPKGS_PATH
105 lines
2.4 KiB
Nix
105 lines
2.4 KiB
Nix
{
|
|
lib,
|
|
resholve,
|
|
fetchFromGitHub,
|
|
fetchpatch,
|
|
bash,
|
|
coreutils,
|
|
git,
|
|
gnugrep,
|
|
gawk,
|
|
curl,
|
|
hostname,
|
|
gnused,
|
|
findutils,
|
|
lftp,
|
|
pandoc,
|
|
man,
|
|
}:
|
|
|
|
resholve.mkDerivation rec {
|
|
pname = "git-ftp";
|
|
version = "1.6.0";
|
|
src = fetchFromGitHub {
|
|
owner = "git-ftp";
|
|
repo = "git-ftp";
|
|
rev = version;
|
|
sha256 = "1hxkqf7jbrx24q18yxpnd3dxzh4xk6asymwkylp1x7zg6mcci87d";
|
|
};
|
|
|
|
dontBuild = true;
|
|
|
|
# fix bug/typo; PRed upstream @
|
|
# https://github.com/git-ftp/git-ftp/pull/628
|
|
patches = [
|
|
(fetchpatch {
|
|
name = "fix-function-invocation-typo.patch";
|
|
url = "https://github.com/git-ftp/git-ftp/commit/cddf7cbba80e710758f6aac0ec0d77552ea8cd75.patch";
|
|
sha256 = "sha256-2B0QaMJi78Bg3bA1jp41aiyql1/LCryoaDs7+xmS1HY=";
|
|
})
|
|
];
|
|
|
|
installPhase = ''
|
|
make install-all prefix=$out
|
|
'';
|
|
|
|
nativeBuildInputs = [
|
|
pandoc
|
|
man
|
|
];
|
|
|
|
solutions = {
|
|
git-ftp = {
|
|
scripts = [ "bin/git-ftp" ];
|
|
interpreter = "${bash}/bin/bash";
|
|
inputs = [
|
|
coreutils
|
|
git
|
|
gnugrep
|
|
gawk
|
|
curl
|
|
hostname
|
|
gnused
|
|
findutils
|
|
lftp
|
|
];
|
|
fake = {
|
|
# don't resolve impure system macOS security
|
|
# caution: will still be fragile if PATH is bad
|
|
# TODO: fixable once we figure out how to handle
|
|
# this entire class of problem...
|
|
"external" = [ "security" ];
|
|
};
|
|
keep = {
|
|
# looks like run-time user/env/git-config controlled
|
|
"$GIT_PAGER" = true;
|
|
"$hook" = true; # presumably git hooks given context
|
|
};
|
|
execer = [
|
|
# TODO: rm when binlore/resholve handle git; manually
|
|
# checked and see no obvious subexec for now
|
|
"cannot:${git}/bin/git"
|
|
/*
|
|
Mild uncertainty here. There *are* commandlikes in
|
|
the arguments (especially wait & cd), but I think they are
|
|
fine as-is, because I'm reading them as:
|
|
1. ftp commands
|
|
2. running on the remote anyways
|
|
|
|
See https://github.com/git-ftp/git-ftp/blob/057f7d8e9f00ffc5a8c6ceaa4be30af2939df41a/git-ftp#L1214-L1221
|
|
*/
|
|
"cannot:${lftp}/bin/lftp"
|
|
];
|
|
};
|
|
};
|
|
|
|
meta = with lib; {
|
|
description = "Git powered FTP client written as shell script";
|
|
homepage = "https://git-ftp.github.io/";
|
|
license = licenses.gpl3;
|
|
maintainers = with maintainers; [ tweber ];
|
|
platforms = platforms.unix;
|
|
mainProgram = "git-ftp";
|
|
};
|
|
}
|