Commit fe6dd4bf authored by phaer's avatar phaer
Browse files

python3Packages.sqlcipher3: init at 0.5.4

This adds python bindings for sqlcipher from
https://github.com/coleifer/sqlcipher3.

It also adds two meta packages, sqlcipher3-binary
and sqlcipher3-wheels. The former is a binary-distribution
of sqlcipher3 from upstream. The latter is a fork that
builds its own wheels but ships no further source changes.

So we effectively make both wheel packages an alias for our
own source-built package. Similar to how e.g. psycopg2-binary
works in nixpkgs.
parent b2c036cd
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
{
  mkPythonMetaPackage,
  sqlcipher3,
}:
mkPythonMetaPackage {
  pname = "sqlcipher3-binary";
  inherit (sqlcipher3) version;
  dependencies = [ sqlcipher3 ];
  optional-dependencies = sqlcipher3.optional-dependencies or { };
  meta = {
    inherit (sqlcipher3.meta) description homepage license;
  };
}
+13 −0
Original line number Diff line number Diff line
{
  mkPythonMetaPackage,
  sqlcipher3,
}:
mkPythonMetaPackage {
  pname = "sqlcipher3-wheels";
  inherit (sqlcipher3) version;
  dependencies = [ sqlcipher3 ];
  optional-dependencies = sqlcipher3.optional-dependencies or { };
  meta = {
    inherit (sqlcipher3.meta) description homepage license;
  };
}
+42 −0
Original line number Diff line number Diff line
{
  lib,
  buildPythonPackage,
  fetchPypi,
  setuptools,
  sqlcipher,
  openssl,
}:
let
  pname = "sqlcipher3";
  version = "0.5.4";
in
buildPythonPackage {
  inherit pname version;
  pyproject = true;

  src = fetchPypi {
    inherit pname version;
    hash = "sha256-4w/1jWTdQ+Gezt3RARahonrR2YiMxCRcdfK9qbA4Tnc=";
  };

  nativeBuildInputs = [
    setuptools
  ];

  buildInputs = [
    sqlcipher
    openssl
  ];

  pythonImportChecks = [
    "sqlcipher3"
  ];

  meta = with lib; {
    mainProgram = "sqlcipher3";
    homepage = "https://github.com/coleifer/sqlcipher3";
    description = "Python 3 bindings for SQLCipher";
    license = licenses.zlib;
    maintainers = with maintainers; [ phaer ];
  };
}
+4 −0
Original line number Diff line number Diff line
@@ -15013,6 +15013,10 @@ self: super: with self; {
  sqlbag = callPackage ../development/python-modules/sqlbag { };
  sqlcipher3 = callPackage ../development/python-modules/sqlcipher3 {};
  sqlcipher3-binary = callPackage ../development/python-modules/sqlcipher3-binary {};
  sqlcipher3-wheels = callPackage ../development/python-modules/sqlcipher3-wheels {};
  sqlfmt = callPackage ../development/python-modules/sqlfmt { };
  sqlglot = callPackage ../development/python-modules/sqlglot { };