diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..4e6263b --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,27 @@ +name: hdbc-postgresql CI + +on: + push: + branches: main + pull_request: + +permissions: + contents: read + pages: write + id-token: write + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - uses: cachix/install-nix-action@v31 + with: + github_access_token: ${{ secrets.GITHUB_TOKEN }} + nix_path: nixpkgs=channel:nixpkgs-unstable + + - run: nix-channel --update + - name: Build using Nix + run: nix-build diff --git a/.gitignore b/.gitignore index 32d7a8f..c50bc53 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ -*.swp -/dist/ +dist +*~ +dist-newstyle +/result diff --git a/HDBC-postgresql.cabal b/HDBC-postgresql.cabal index 3b6d927..15cc182 100644 --- a/HDBC-postgresql.cabal +++ b/HDBC-postgresql.cabal @@ -1,7 +1,7 @@ Name: HDBC-postgresql -Version: 2.5.0.1 +Version: 2.5.0.2 License: BSD3 -Maintainer: Nicolas Wu +Maintainer: Nicolas Wu , David Johnson Author: John Goerzen Copyright: Copyright (c) 2005-2011 John Goerzen license-file: LICENSE @@ -45,7 +45,7 @@ Library Build-Depends: base >= 3 && < 5, mtl, HDBC>=2.2.0, parsec, utf8-string, bytestring, old-time, convertible if flag(minTime15) - Build-Depends: time >= 1.5 && < 1.16 + Build-Depends: time >= 1.5 && < 1.17 CPP-Options: -DMIN_TIME_15 else Build-Depends: time < 1.5, old-locale @@ -63,7 +63,7 @@ Executable runtests convertible, parsec, utf8-string, bytestring, old-time, base >= 4.6 && < 5.0, HDBC>=2.2.6 if flag(minTime15) - Build-Depends: time >= 1.5 && < 1.16 + Build-Depends: time >= 1.5 && < 1.17 CPP-Options: -DMIN_TIME_15 else Build-Depends: time < 1.5, old-locale diff --git a/default.nix b/default.nix new file mode 100644 index 0000000..c57989e --- /dev/null +++ b/default.nix @@ -0,0 +1,3 @@ +{ pkgs ? import {} }: + +pkgs.haskellPackages.callPackage ./hdbc-postgresql.nix { inherit (pkgs) postgresql; } diff --git a/hdbc-postgresql.nix b/hdbc-postgresql.nix new file mode 100644 index 0000000..2ff5dfc --- /dev/null +++ b/hdbc-postgresql.nix @@ -0,0 +1,19 @@ +{ mkDerivation, base, bytestring, Cabal, convertible, HDBC, lib +, mtl, old-time, parsec, postgresql, time, utf8-string +}: +mkDerivation { + pname = "HDBC-postgresql"; + version = "2.5.0.2"; + src = ./.; + isLibrary = true; + isExecutable = true; + setupHaskellDepends = [ base Cabal ]; + libraryHaskellDepends = [ + base bytestring convertible HDBC mtl old-time parsec time + utf8-string + ]; + librarySystemDepends = [ postgresql (postgresql.pg_config) ]; + homepage = "http://github.com/hdbc/hdbc-postgresql"; + description = "PostgreSQL driver for HDBC"; + license = lib.licenses.bsd3; +}