Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{
2 buildOctavePackage,
3 stdenv,
4 lib,
5 fetchurl,
6 pkg-config,
7 pcre2,
8}:
9
10buildOctavePackage rec {
11 pname = "strings";
12 version = "1.3.1";
13
14 src = fetchurl {
15 url = "mirror://sourceforge/octave/${pname}-${version}.tar.gz";
16 sha256 = "sha256-9l5eYgzw5K85trRAJW9eMYZxvf0RDNxDlD0MtwrSCLc=";
17 };
18
19 nativeBuildInputs = [
20 pkg-config
21 ];
22
23 buildInputs = [
24 pcre2
25 ];
26
27 # The gripes library no longer exists.
28 # https://build.opensuse.org/package/view_file/openSUSE:Backports:SLE-15-SP3/octave-forge-strings/octave-forge-strings.spec
29 # toascii is a deprecated function. Has been fixed in recent commits, but has
30 # not been released yet.
31 # https://sourceforge.net/p/octave/strings/ci/2db1dbb75557eef94605cb4ac682783ab78ac8d8/
32 patchPhase = ''
33 sed -i -s -e 's/gripes.h/errwarn.h/' -e 's/gripe_/err_/g' src/*.cc
34 sed -i s/toascii/double/g inst/*.m
35 '';
36
37 meta = {
38 homepage = "https://gnu-octave.github.io/packages/strings/";
39 license = lib.licenses.gpl3Plus;
40 # Claims to have a freebsd license, but I found none.
41 maintainers = with lib.maintainers; [ KarlJoad ];
42 description = "Additional functions for manipulation and analysis of strings";
43 # Some pcre symbols claimed to be missing
44 broken = stdenv.hostPlatform.isDarwin;
45 };
46}