2021-01-15 09:19:50 +00:00
|
|
|
{ lib, stdenv, fetchurl }:
|
2008-02-13 14:23:09 +00:00
|
|
|
|
2021-06-02 20:32:14 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "replace";
|
|
|
|
version = "2.24";
|
2007-07-15 11:59:33 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2021-06-02 20:32:14 +00:00
|
|
|
url = "http://hpux.connect.org.uk/ftp/hpux/Users/replace-${version}/replace-${version}-src-11.31.tar.gz";
|
|
|
|
sha256 = "18hkwhaz25s6209n5mpx9hmkyznlzygqj488p2l7nvp9zrlxb9sf";
|
2007-07-15 11:59:33 +00:00
|
|
|
};
|
|
|
|
|
2018-02-19 18:52:08 +00:00
|
|
|
outputs = [ "out" "man" ];
|
|
|
|
|
2021-12-19 11:07:33 +00:00
|
|
|
makeFlags = [
|
|
|
|
"TREE=\$(out)"
|
|
|
|
"MANTREE=\$(TREE)/share/man"
|
|
|
|
"CC=${stdenv.cc.targetPrefix}cc"
|
|
|
|
];
|
2007-09-27 14:48:09 +00:00
|
|
|
|
2014-09-18 12:07:03 +00:00
|
|
|
preBuild = ''
|
|
|
|
sed -e "s@/bin/mv@$(type -P mv)@" -i replace.h
|
|
|
|
'';
|
|
|
|
|
2012-01-18 20:16:00 +00:00
|
|
|
preInstall = "mkdir -p \$out/share/man";
|
2008-02-15 11:14:40 +00:00
|
|
|
postInstall = "mv \$out/bin/replace \$out/bin/replace-literal";
|
|
|
|
|
2008-02-22 18:19:04 +00:00
|
|
|
patches = [./malloc.patch];
|
|
|
|
|
2007-07-15 11:59:33 +00:00
|
|
|
meta = {
|
2008-02-13 14:23:09 +00:00
|
|
|
description = "Tool to replace verbatim strings";
|
2022-05-05 00:46:39 +00:00
|
|
|
homepage = "https://replace.richardlloyd.org.uk/";
|
|
|
|
mainProgram = "replace-literal";
|
2021-01-15 09:19:50 +00:00
|
|
|
platforms = lib.platforms.unix;
|
2007-07-15 11:59:33 +00:00
|
|
|
};
|
2008-02-22 18:19:04 +00:00
|
|
|
}
|