mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-10 22:24:40 +00:00
![aleksana](/assets/img/avatar_default.png)
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
35 lines
961 B
Nix
35 lines
961 B
Nix
{ lib, stdenv, fetchurl, readline, libmysqlclient, postgresql, sqlite }:
|
|
|
|
let inherit (lib) getDev; in
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "opendbx";
|
|
version = "1.4.6";
|
|
|
|
src = fetchurl {
|
|
url = "https://linuxnetworks.de/opendbx/download/opendbx-${version}.tar.gz";
|
|
sha256 = "0z29h6zx5f3gghkh1a0060w6wr572ci1rl2a3480znf728wa0ii2";
|
|
};
|
|
|
|
preConfigure = ''
|
|
export CPPFLAGS="-I${getDev libmysqlclient}/include/mysql"
|
|
export LDFLAGS="-L${libmysqlclient}/lib/mysql"
|
|
configureFlagsArray=(--with-backends="mysql pgsql sqlite3")
|
|
'';
|
|
|
|
buildInputs = [ readline libmysqlclient postgresql sqlite ];
|
|
|
|
env.NIX_CFLAGS_COMPILE = toString [
|
|
# Needed with GCC 12
|
|
"-std=c++14"
|
|
];
|
|
|
|
meta = with lib; {
|
|
broken = stdenv.hostPlatform.isDarwin;
|
|
description = "Extremely lightweight but extensible database access library written in C";
|
|
mainProgram = "odbx-sql";
|
|
license = licenses.lgpl21;
|
|
platforms = platforms.all;
|
|
};
|
|
}
|