nixpkgs/pkgs/applications/version-management/git-ftp/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

101 lines
2.4 KiB
Nix
Raw Normal View History

2022-01-30 01:09:19 +00:00
{ lib
, resholve
, fetchFromGitHub
, fetchpatch
, bash
, coreutils
, git
, gnugrep
, gawk
, curl
, hostname
, gnused
, findutils
, lftp
, pandoc
, man
}:
resholve.mkDerivation rec {
pname = "git-ftp";
2020-02-06 07:33:54 +00:00
version = "1.6.0";
2017-07-07 09:41:30 +00:00
src = fetchFromGitHub {
owner = "git-ftp";
repo = "git-ftp";
rev = version;
2020-02-06 07:33:54 +00:00
sha256 = "1hxkqf7jbrx24q18yxpnd3dxzh4xk6asymwkylp1x7zg6mcci87d";
2017-07-07 09:41:30 +00:00
};
dontBuild = true;
2022-01-30 01:09:19 +00:00
# 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=";
})
];
2017-07-07 09:41:30 +00:00
installPhase = ''
make install-all prefix=$out
'';
2022-01-30 01:09:19 +00:00
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"
];
};
};
2017-07-07 09:41:30 +00:00
meta = with lib; {
description = "Git powered FTP client written as shell script";
homepage = "https://git-ftp.github.io/";
2017-07-07 09:41:30 +00:00
license = licenses.gpl3;
maintainers = with maintainers; [ tweber ];
platforms = platforms.unix;
2023-11-27 01:17:53 +00:00
mainProgram = "git-ftp";
2017-07-07 09:41:30 +00:00
};
}