Unverified Commit 7d65cd21 authored by OTABI Tomoya's avatar OTABI Tomoya Committed by GitHub
Browse files

Merge pull request #336407 from hulr/gnome-secrets

gnome-secrets: 8.0 -> 9.6
parents 04b9a4e6 b77193b0
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -17,7 +17,7 @@

python3Packages.buildPythonApplication rec {
  pname = "gnome-secrets";
  version = "8.0";
  version = "9.6";
  format = "other";

  src = fetchFromGitLab {
@@ -25,7 +25,7 @@ python3Packages.buildPythonApplication rec {
    owner = "World";
    repo = "secrets";
    rev = version;
    hash = "sha256-SEPQjl6hd8IBs0c0LBEYaqn2n8CGQmYSEMJp5yoL/PA=";
    hash = "sha256-iF2AQYAwwIr/sCZUz1pdqEa74DH4y4Nts6aJj3mS2f4=";
  };

  nativeBuildInputs = [
@@ -49,9 +49,11 @@ python3Packages.buildPythonApplication rec {
  propagatedBuildInputs = with python3Packages; [
    pygobject3
    construct
    pykcs11
    pykeepass
    pyotp
    validators
    yubico
    zxcvbn
  ];

+52 −0
Original line number Diff line number Diff line
{
  lib,
  buildPythonPackage,
  callPackage,
  fetchPypi,
  setuptools,
  swig4,
}:

buildPythonPackage rec {
  pname = "pykcs11";
  version = "1.5.16";
  pyproject = true;

  src = fetchPypi {
    inherit pname version;
    hash = "sha256-Q9dGsGd/Q8xjS598Tastm6axqDuTHiWYJHBi+P9kHgc=";
  };

  build-system = [ setuptools ];

  nativeBuildInputs = [ swig4 ];

  pypaBuildFlags = [ "--skip-dependency-check" ];

  outputs = [
    "out"
    "testout"
  ];

  postInstall = ''
    mkdir $testout
    cp -R test $testout/test
  '';

  pythonImportsCheck = [ "PyKCS11" ];

  doCheck = false;

  # tests complain about circular import, do testing with passthru.tests instead
  passthru.tests = {
    pytest = callPackage ./tests.nix { };
  };

  meta = with lib; {
    description = "PKCS#11 wrapper for Python";
    homepage = "https://github.com/LudovicRousseau/PyKCS11";
    changelog = "https://github.com/LudovicRousseau/PyKCS11/releases/tag/${version}";
    license = licenses.gpl2Plus;
    maintainers = with maintainers; [ hulr ];
  };
}
+33 −0
Original line number Diff line number Diff line
{
  buildPythonPackage,
  asn1crypto,
  pykcs11,
  pytestCheckHook,
  softhsm,
}:

buildPythonPackage {
  pname = "pykcs11-tests";
  inherit (pykcs11) version;
  format = "other";

  src = pykcs11.testout;

  dontBuild = true;
  dontInstall = true;

  nativeCheckInputs = [
    asn1crypto
    pykcs11
    pytestCheckHook
  ];

  preCheck = ''
    export HOME=$(mktemp -d)
    export PYKCS11LIB=${softhsm}/lib/softhsm/libsofthsm2.so
    export SOFTHSM2_CONF=$HOME/softhsm2.conf
    echo "directories.tokendir = $HOME/tokens" > $HOME/softhsm2.conf
    mkdir $HOME/tokens
    ${softhsm}/bin/softhsm2-util --init-token --label "A token" --pin 1234 --so-pin 123456 --slot 0
  '';
}
+2 −0
Original line number Diff line number Diff line
@@ -10405,6 +10405,8 @@ self: super: with self; {
  pyixapi = callPackage ../development/python-modules/pyixapi { };
  pykcs11 = callPackage ../development/python-modules/pykcs11 { };
  pykrakenapi = callPackage ../development/python-modules/pykrakenapi { };
  pylance = callPackage ../development/python-modules/pylance { };