{ description = "GixSQL is an ESQL preprocessor and a series of runtime libraries to enable GnuCOBOL to access PostgreSQL, ODBC, MySQL, Oracle and SQLite databases."; inputs = { gixsql-src = { url = "https://github.com/mridoni/gixsql/releases/download/v1.0.20b/gixsql-1.0.20b.tar.gz"; flake = false; }; }; outputs = { self , nixpkgs , gixsql-src }: let supportedSystems = [ "x86_64-linux" ]; forAllSystems = nixpkgs.lib.genAttrs supportedSystems; nixpkgsFor = forAllSystems (system: import nixpkgs { inherit system; overlays = [ self.overlays.default ]; }); in { overlays.default = final: prev: { gixsql = final.stdenv.mkDerivation { pname = "gixsql"; version = "0.1.0"; src = gixsql-src; buildInputs = [ ]; nativeBuildInputs = [ final.bison final.flex final.pkg-config final.autoconf final.automake final.libtool final.spdlog final.binutils final.gcc ]; patches = [ ./remove-stdcxxfs.patch ./add-cstdint.patch ]; configurePhase = '' autoreconf -fi automake --add-missing ./configure --prefix=$out --disable-mysql --disable-odbc --disable-oracle ''; buildPhase = '' make CXXFLAGS="-Wno-error -Wno-format-security" ''; installPhase = '' make install ''; }; }; packages = forAllSystems (system: { inherit (nixpkgsFor."${system}") gixsql; }); defaultPackage = forAllSystems (system: self.packages."${system}".gixsql); }; }