Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / tools / sqsh / default.nix
blobba4a681a594d5a8c258d8da32419d698806f12f3
1 { lib, stdenv, fetchurl, autoreconfHook, freetds, readline, libiconv }:
3 let
4   mainVersion = "2.5";
6 in stdenv.mkDerivation rec {
7   pname = "sqsh";
8   version = "${mainVersion}.16.1";
10   src = fetchurl {
11     url    = "mirror://sourceforge/sqsh/sqsh/sqsh-${mainVersion}/${pname}-${version}.tgz";
12     sha256 = "1wi0hdmhk7l8nrz4j3kaa177mmxyklmzhj7sq1gj4q6fb8v1yr6n";
13   };
15   preConfigure = ''
16     export SYBASE=${freetds}
17   '' + lib.optionalString stdenv.isDarwin ''
18     substituteInPlace configure --replace "libct.so" "libct.dylib"
19   '';
21   enableParallelBuilding = true;
23   buildInputs = [ freetds readline libiconv ];
25   nativeBuildInputs = [ autoreconfHook ];
27   patches = [
28     (fetchurl {
29       # https://cvsweb.openbsd.org/cgi-bin/cvsweb/ports/databases/sqsh/patches/patch-src_cmd_connect_c
30       name = "patch-src_cmd_connect_c.patch";
31       url = "https://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/ports/databases/sqsh/patches/patch-src_cmd_connect_c?rev=1.2&content-type=text/plain";
32       sha256 = "1dz97knr2h0a0ca1vq2mx6h8s3ns9jb1a0qraa4wkfmcdi3aqw0j";
33     })
34   ];
36   patchFlags = [ "-p0" ];
38   meta = with lib; {
39     description = "Command line tool for querying Sybase/MSSQL databases";
40     longDescription = ''
41       Sqsh (pronounced skwish) is short for SQshelL (pronounced s-q-shell),
42       it is intended as a replacement for the venerable 'isql' program supplied
43       by Sybase.
44     '';
45     license = licenses.gpl2;
46     homepage = "https://sourceforge.net/projects/sqsh/";
47     platforms = platforms.all;
48   };