1 { stdenv, lib, fetchurl }:
3 stdenv.mkDerivation rec {
8 url = "mirror://gnu/gdbm/${pname}-${version}.tar.gz";
9 sha256 = "sha256-dLEIHSH/8TrkvXwW5dblBKTCb3zeHcoNljpIQXS7ys0=";
12 doCheck = true; # not cross;
14 # Linking static stubs on cygwin requires correct ordering.
15 # Consider upstreaming this.
17 # Disable dbmfetch03.at test because it depends on unlink()
18 # failing on a link in a chmod -w directory, which cygwin
20 postPatch = lib.optionalString stdenv.buildPlatform.isCygwin ''
21 substituteInPlace tests/Makefile.in --replace \
22 '_LDADD = ../src/libgdbm.la ../compat/libgdbm_compat.la' \
23 '_LDADD = ../compat/libgdbm_compat.la ../src/libgdbm.la'
24 substituteInPlace tests/testsuite.at --replace \
25 'm4_include([dbmfetch03.at])' ""
28 enableParallelBuilding = true;
29 configureFlags = [ "--enable-libgdbm-compat" ];
31 # create symlinks for compatibility
33 install -dm755 $out/include/gdbm
36 ln -s ../gdbm.h gdbm.h
37 ln -s ../ndbm.h ndbm.h
43 description = "GNU dbm key/value database library";
45 GNU dbm (or GDBM, for short) is a library of database functions that
46 use extensible hashing and work similar to the standard UNIX dbm.
47 These routines are provided to a programmer needing to create and
48 manipulate a hashed database.
50 The basic use of GDBM is to store key/data pairs in a data file.
51 Each key must be unique and each key is paired with only one data
54 The library provides primitives for storing key/data pairs,
55 searching and retrieving the data by its key and deleting a key
56 along with its data. It also support sequential iteration over all
57 key/data pairs in a database.
59 For compatibility with programs using old UNIX dbm function, the
60 package also provides traditional dbm and ndbm interfaces.
62 homepage = "https://www.gnu.org/software/gdbm/";
63 license = licenses.gpl3Plus;
64 platforms = platforms.all;
65 maintainers = [ maintainers.vrthra ];