2014-08-17 21:17:13 +01:00
|
|
|
{ stdenv, fetchurl, gettext, coreutils }:
|
2010-02-22 09:07:15 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2017-04-01 10:29:55 +01:00
|
|
|
name = "sharutils-4.15.2";
|
2010-02-22 09:07:15 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2017-04-01 10:29:55 +01:00
|
|
|
url = "mirror://gnu/sharutils/${name}.tar.xz";
|
|
|
|
sha256 = "16isapn8f39lnffc3dp4dan05b7x6mnc76v6q5nn8ysxvvvwy19b";
|
2010-02-22 09:07:15 +00:00
|
|
|
};
|
|
|
|
|
2016-02-26 17:38:15 +00:00
|
|
|
hardeningDisable = [ "format" ];
|
2015-12-23 01:59:47 +00:00
|
|
|
|
2010-02-22 09:52:39 +00:00
|
|
|
# GNU Gettext is needed on non-GNU platforms.
|
2017-04-01 10:29:55 +01:00
|
|
|
buildInputs = [ coreutils gettext ];
|
2010-02-22 09:52:39 +00:00
|
|
|
|
2017-10-30 11:25:07 +00:00
|
|
|
# These tests try to hit /etc/passwd to find out your username if pass in a submitter
|
|
|
|
# name on the command line. Since we block access to /etc/passwd on the Darwin sandbox
|
|
|
|
# that cause shar to just segfault. It isn't a problem on Linux because their sandbox
|
|
|
|
# remaps /etc/passwd to a trivial file, but we can't do that on Darwin so I do this
|
|
|
|
# instead. In this case, I pass in the very imaginative "submitter" as the submitter name
|
2017-11-14 17:12:19 +00:00
|
|
|
|
|
|
|
patchPhase = let
|
|
|
|
# This evaluates to a string containing:
|
|
|
|
#
|
|
|
|
# substituteInPlace tests/shar-2 --replace '${SHAR}' '${SHAR} -s submitter'
|
|
|
|
# substituteInPlace tests/shar-2 --replace '${SHAR}' '${SHAR} -s submitter'
|
|
|
|
shar_sub = "\${SHAR}";
|
|
|
|
in ''
|
|
|
|
substituteInPlace tests/shar-1 --replace '${shar_sub}' '${shar_sub} -s submitter'
|
|
|
|
substituteInPlace tests/shar-2 --replace '${shar_sub}' '${shar_sub} -s submitter'
|
2018-01-03 23:26:59 +00:00
|
|
|
|
|
|
|
substituteInPlace intl/Makefile.in --replace "AR = ar" ""
|
2017-11-14 17:12:19 +00:00
|
|
|
'';
|
2017-10-30 11:25:07 +00:00
|
|
|
|
2010-02-22 09:52:39 +00:00
|
|
|
doCheck = true;
|
|
|
|
|
2012-10-27 13:46:36 +01:00
|
|
|
crossAttrs = {
|
|
|
|
patches = [ ./sharutils-4.11.1-cross-binary-mode-popen.patch ];
|
|
|
|
};
|
|
|
|
|
2017-04-01 10:29:55 +01:00
|
|
|
meta = with stdenv.lib; {
|
2014-08-24 15:21:08 +01:00
|
|
|
description = "Tools for remote synchronization and `shell archives'";
|
2010-02-22 09:07:15 +00:00
|
|
|
longDescription =
|
|
|
|
'' GNU shar makes so-called shell archives out of many files, preparing
|
|
|
|
them for transmission by electronic mail services. A shell archive
|
|
|
|
is a collection of files that can be unpacked by /bin/sh. A wide
|
|
|
|
range of features provide extensive flexibility in manufacturing
|
|
|
|
shars and in specifying shar smartness. For example, shar may
|
|
|
|
compress files, uuencode binary files, split long files and
|
|
|
|
construct multi-part mailings, ensure correct unsharing order, and
|
|
|
|
provide simplistic checksums.
|
|
|
|
|
|
|
|
GNU unshar scans a set of mail messages looking for the start of
|
|
|
|
shell archives. It will automatically strip off the mail headers
|
|
|
|
and other introductory text. The archive bodies are then unpacked
|
|
|
|
by a copy of the shell. unshar may also process files containing
|
|
|
|
concatenated shell archives.
|
|
|
|
'';
|
|
|
|
homepage = http://www.gnu.org/software/sharutils/;
|
2017-04-01 10:29:55 +01:00
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
maintainers = [ maintainers.ndowens ];
|
|
|
|
platforms = platforms.all;
|
2010-02-22 09:07:15 +00:00
|
|
|
};
|
|
|
|
}
|