2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv, fetchurl }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-06-06 07:54:09 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "replace";
|
|
|
|
version = "2.24";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2021-06-06 07:54:09 +00:00
|
|
|
url = "http://hpux.connect.org.uk/ftp/hpux/Users/replace-${version}/replace-${version}-src-11.31.tar.gz";
|
|
|
|
sha256 = "18hkwhaz25s6209n5mpx9hmkyznlzygqj488p2l7nvp9zrlxb9sf";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
outputs = [ "out" "man" ];
|
|
|
|
|
2021-12-30 13:39:12 +00:00
|
|
|
makeFlags = [
|
|
|
|
"TREE=\$(out)"
|
|
|
|
"MANTREE=\$(TREE)/share/man"
|
|
|
|
"CC=${stdenv.cc.targetPrefix}cc"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
preBuild = ''
|
|
|
|
sed -e "s@/bin/mv@$(type -P mv)@" -i replace.h
|
|
|
|
'';
|
|
|
|
|
|
|
|
preInstall = "mkdir -p \$out/share/man";
|
|
|
|
postInstall = "mv \$out/bin/replace \$out/bin/replace-literal";
|
|
|
|
|
|
|
|
patches = [./malloc.patch];
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = "https://replace.richardlloyd.org.uk/";
|
|
|
|
description = "A tool to replace verbatim strings";
|
2021-01-15 22:18:51 +00:00
|
|
|
platforms = lib.platforms.unix;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|