Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve sequoia package expression #65724

Merged
merged 1 commit into from Aug 13, 2019

Conversation

doronbehar
Copy link
Contributor

@doronbehar doronbehar commented Aug 1, 2019

Motivation for this change

As discussed at #65475, these are the changes I performed on the existing sequoia package:

  • Use make check and make install as checkPhase and installPhase, respectively.
  • Add the package to the pythonPackages' attribute set.
  • Make the python support an easily overrideable with the pythonSupport argument.
  • Rename sequoia-tool -> sequoia since we provide now the whole ecosystem which includes:
    • ffi bindings to Python and C
    • zsh and bash completion for sq and sqv executables.
  • Meta:
    • Use a string as the homepage URL (plain URLs are deprecated).
    • Change description of package to fit upstream and current installed files.
    • Use make check and make install as checkPhase and installPhase, respectively.
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.
Notify maintainers

cc @minijackson .

@doronbehar doronbehar requested a review from FRidh as a code owner August 1, 2019 13:28
@doronbehar doronbehar mentioned this pull request Aug 1, 2019
10 tasks
Copy link
Member

@FRidh FRidh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is it called differently? Why are the phases overridden?

pkgs/tools/security/sequoia/default.nix Outdated Show resolved Hide resolved
pkgs/tools/security/sequoia/default.nix Outdated Show resolved Hide resolved
pkgs/tools/security/sequoia/default.nix Outdated Show resolved Hide resolved
pkgs/top-level/all-packages.nix Outdated Show resolved Hide resolved
pkgs/top-level/python-packages.nix Outdated Show resolved Hide resolved
Copy link
Contributor

@jonringer jonringer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if your checkPhase will run correctly with all these dependencies being python dependencies.

pkgs/tools/security/sequoia/default.nix Outdated Show resolved Hide resolved
Copy link
Contributor

@jonringer jonringer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the python packages fail to build for me.

Fail log
   Compiling rustc_version v0.2.3
error: failed to run custom build command for `openssl-sys v0.9.47`

Caused by:
  process didn't exit successfully: `/build/source/target/debug/build/openssl-sys-a3307e1288dc484e/build-script-main` (exit code: 101)
--- stdout
cargo:rustc-cfg=const_fn
cargo:rerun-if-env-changed=X86_64_UNKNOWN_LINUX_GNU_OPENSSL_LIB_DIR
X86_64_UNKNOWN_LINUX_GNU_OPENSSL_LIB_DIR unset
cargo:rerun-if-env-changed=OPENSSL_LIB_DIR
OPENSSL_LIB_DIR unset
cargo:rerun-if-env-changed=X86_64_UNKNOWN_LINUX_GNU_OPENSSL_INCLUDE_DIR
X86_64_UNKNOWN_LINUX_GNU_OPENSSL_INCLUDE_DIR unset
cargo:rerun-if-env-changed=OPENSSL_INCLUDE_DIR
OPENSSL_INCLUDE_DIR unset
cargo:rerun-if-env-changed=X86_64_UNKNOWN_LINUX_GNU_OPENSSL_DIR
X86_64_UNKNOWN_LINUX_GNU_OPENSSL_DIR unset
cargo:rerun-if-env-changed=OPENSSL_DIR
OPENSSL_DIR unset
run pkg_config fail: "Failed to run `\"pkg-config\" \"--libs\" \"--cflags\" \"openssl\"`: No such file or directory (os error 2)"

--- stderr
thread 'main' panicked at '

Could not find directory of OpenSSL installation, and this `-sys` crate cannot
proceed without this knowledge. If OpenSSL is installed and this crate had
trouble finding it,  you can set the `OPENSSL_DIR` environment variable for the
compilation process.

Make sure you also have the development packages of openssl installed.
For example, `libssl-dev` on Ubuntu or `openssl-devel` on Fedora.

If you're in a situation where you think the directory *should* be found
automatically, please open a bug at https://github.com/sfackler/rust-openssl
and include information about your system as well as this message.

$HOST = x86_64-unknown-linux-gnu
$TARGET = x86_64-unknown-linux-gnu
openssl-sys = 0.9.47


It looks like you're compiling on Linux and also targeting Linux. Currently this
requires the `pkg-config` utility to find OpenSSL but unfortunately `pkg-config`
could not be found. If you have OpenSSL installed you can likely fix this by
installing `pkg-config`.

', /build/sequoia-0.9.0-vendor/openssl-sys/build/find_normal.rs:150:5
note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.

warning: build failed, waiting for other jobs to finish...
error: build failed
make: *** [Makefile:48: build] Error 101
builder for '/nix/store/yd4348iiqvxmfms8cc29c4k2w1nzmr5d-sequoia-0.9.0.drv' failed with exit code 2
error: build of '/nix/store/yd4348iiqvxmfms8cc29c4k2w1nzmr5d-sequoia-0.9.0.drv' failed

@worldofpeace
Copy link
Contributor

I think if you null the phases this could work as expected. see the fractal expression since it also does this and uses rustPlatform.buildRustPackage.

@doronbehar
Copy link
Contributor Author

@jonringer:

Not sure if your checkPhase will run correctly with all these dependencies being python dependencies.

I've tested the build with nix-build -A sequoia. Did you test the python module build with nix-build -A python3Packages.sequoia?

As @FRidh has mentioned in his comment here I read the examples and now I think python3Packages.sequoia builds fine. I've just tested that it starts up right and that openssl-sys is compiled fine but I haven't waited for it to finish all of the build because it takes around 3 hours on my computer. I'm pretty sure there shouldn't be any problems now with the right use of toPythonModule.

@worldofpeace:

I think if you null the phases this could work as expected. see the fractal expression since it also does this and uses rustPlatform.buildRustPackage.

Are you referring to @jonringer's comment on the checkPhase? I wrote these dependencies after reading upstream's setup.py. I think in make check it really needs those dependencies so I'm not sure exactly what do you mean.

BTW thanks for all the comments :)

@worldofpeace
Copy link
Contributor

worldofpeace commented Aug 2, 2019

@doronbehar I meant how you have to manually override buildPhase installPhase to run make manually. By doing what I suggested it will be the hooks in setup.sh which will do this already.

I believe that if you do that you'll just need to set PREFIX in makeFlags and PYTHONPATH or PYTHON in installFlags.

Edit: rephrased since I might have been incoherent at the time of writing 😄

@FRidh
Copy link
Member

FRidh commented Aug 5, 2019

All that's left is the comment that @worldofpeace made. I would also prefer if we would not have to explicitly invoke make. If it is not possible, so be it.

@doronbehar
Copy link
Contributor Author

So are you suggesting to just source the basic setup.sh hook it and then it will override the phases by it self? I'm not really sure how would I do that..

@worldofpeace
Copy link
Contributor

@doronbehar I believe this should do what we need

patch
diff --git a/pkgs/tools/security/sequoia/default.nix b/pkgs/tools/security/sequoia/default.nix
index 9f2a5ee4ddd..a71cd4aec2f 100644
--- a/pkgs/tools/security/sequoia/default.nix
+++ b/pkgs/tools/security/sequoia/default.nix
@@ -18,6 +18,8 @@ rustPlatform.buildRustPackage rec {
     sha256 = "13dzwdzz33dy2lgnznsv8wqnw2501f2ggrkfwpqy5x6d1kgms8rj";
   };
 
+  cargoSha256 = "1zcnkpzcar3a2fk2rn3i3nb70b59ds9fpfa44f15r3aaxajsdhdi";
+
   nativeBuildInputs = [
     pkgconfig
     cargo
@@ -26,11 +28,13 @@ rustPlatform.buildRustPackage rec {
     llvmPackages.libclang
     llvmPackages.clang
   ];
+
   checkInputs = lib.optionals pythonSupport [
     pythonPackages.pytest
     pythonPackages.pytestrunner
     pythonPackages.setuptools
   ];
+
   buildInputs = [
     openssl
     sqlite
@@ -38,10 +42,20 @@ rustPlatform.buildRustPackage rec {
     capnproto
     ensureNewerSourcesForZipFilesHook
   ]
-    ++ lib.optionals pythonSupport [pythonPackages.python pythonPackages.cffi]
+    ++ lib.optionals pythonSupport [ pythonPackages.python pythonPackages.cffi ]
     ++ lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.Security ]
   ;
 
+  makeFlags = [
+    "PREFIX=${placeholder ''out''}"
+  ];
+
+  installFlags = lib.optionals (!pythonSupport) [
+    "PYTHON=disable"
+  ] ++ lib.optionals pythonSupport [
+    "PYTHONPATH=${placeholder ''out''}/${pythonPackages.python.sitePackages}:$PYTHONPATH"
+  ];
+
   LIBCLANG_PATH = "${llvmPackages.libclang}/lib";
 
   preConfigure = ''
@@ -55,21 +69,11 @@ rustPlatform.buildRustPackage rec {
       --replace '-O0 -g -Wall -Werror' '-g'
   '';
 
-  buildPhase = ''
-    make PREFIX=$out build
-  '';
-  checkPhase = ''
-    make check
-  '';
-
-  # Python bindings are enabled by default in the source distribution
-  installPhase = if pythonSupport then ''
-    make PREFIX=$out PYTHONPATH=$out/${pythonPackages.python.sitePackages}:$PYTHONPATH install
-  '' else ''
-    make PREFIX=$out PYTHON=disable install
-  '';
-
-  cargoSha256 = "1zcnkpzcar3a2fk2rn3i3nb70b59ds9fpfa44f15r3aaxajsdhdi";
+  # Don't use buildRustPackage phases, only use it for rust deps setup
+  configurePhase = null;
+  buildPhase = null;
+  checkPhase = null;
+  installPhase = null;
 
   meta = with stdenv.lib; {
     description = "A cool new OpenPGP implementation";

Though it did fail to build

make -Copenpgp-ffi build-release
make[1]: Entering directory '/build/source/openpgp-ffi'
sed -e 's|VERSION|0.9.0|g' -e 's|PREFIX|/build/source/openpgp-ffi|g' -e 's|libdir=.*|libdir=/build/source/target/release|g' sequoia-openpgp.pc.in > /build/source/target/release/sequoia-openpgp.pc
make[1]: Leaving directory '/build/source/openpgp-ffi'
make -Cffi build-release
make[1]: Entering directory '/build/source/ffi'
make -Clang/python build-release
make[2]: Entering directory '/build/source/ffi/lang/python'
rm -f .stamp-build
python3 setup.py clean
Traceback (most recent call last):
  File "setup.py", line 1, in <module>
    from setuptools import setup, find_packages
ModuleNotFoundError: No module named 'setuptools'
make[2]: *** [Makefile:62: .stamp-build-release] Error 1
make[2]: Leaving directory '/build/source/ffi/lang/python'
make[1]: *** [Makefile:61: build-release] Error 2
make[1]: Leaving directory '/build/source/ffi'
make: *** [Makefile:81: build-release] Error 2
builder for '/nix/store/k3p824m22p9qbsf0513mc72yxyym2n52-sequoia-0.9.0.drv' failed with exit code 2
error: build of '/nix/store/k3p824m22p9qbsf0513mc72yxyym2n52-sequoia-0.9.0.drv' failed
ModuleNotFoundError: No module named 'setuptools'

so it looks python related.

pkgs/tools/security/sequoia/default.nix Outdated Show resolved Hide resolved
pkgs/tools/security/sequoia/default.nix Outdated Show resolved Hide resolved
@jonringer
Copy link
Contributor

not sure if i''m going crazy, but it seems to need to build the rust package several times...

@worldofpeace
Copy link
Contributor

not sure if i''m going crazy, but it seems to need to build the rust package several times...

Do you have the build output? I did notice when building that it looked repetitive.

@jonringer
Copy link
Contributor

Very long logs

looks like the rust package is being built twice, then the wheel is built.

Full nix-build -A sequoia logs
@nix { "action": "setPhase", "phase": "unpackPhase" }
unpacking sources
unpacking source archive /nix/store/v16ry13jwb7njyy5xiif1yazvn632hi0-source
source root is source
unpacking source archive /nix/store/p6710lbzc5pjsag0b08r49ynrbi3q93r-sequoia-0.9.0-vendor
@nix { "action": "setPhase", "phase": "patchPhase" }
patching sources
@nix { "action": "setPhase", "phase": "configurePhase" }
configuring
[target."x86_64-unknown-linux-gnu"]
"linker" = "/nix/store/hpzj855nkgjvg58nrhq4910sb9q3kss1-gcc-wrapper-7.4.0/bin/cc"

@nix { "action": "setPhase", "phase": "buildPhase" }
building
CARGO_TARGET_DIR=/build/source/target cargo build  --all
   Compiling autocfg v0.1.4
   Compiling proc-macro2 v0.4.30
   Compiling libc v0.2.59
   Compiling rand_core v0.4.0
   Compiling unicode-xid v0.1.0
   Compiling syn v0.15.39
   Compiling cc v1.0.37
   Compiling memchr v2.2.1
   Compiling semver-parser v0.7.0
   Compiling siphasher v0.2.3
   Compiling version_check v0.1.5
   Compiling typenum v1.10.0
   Compiling spin v0.5.0
   Compiling failure_derive v0.1.5
   Compiling rustc-demangle v0.1.15
   Compiling glob v0.2.11
   Compiling ucd-util v0.1.3
   Compiling arrayvec v0.4.10
   Compiling byteorder v1.3.2
   Compiling regex v1.1.9
   Compiling cfg-if v0.1.9
   Compiling string_cache_shared v0.3.0
   Compiling bitflags v1.1.0
   Compiling byte-tools v0.3.1
   Compiling serde v1.0.94
   Compiling utf8-ranges v1.0.3
   Compiling nodrop v0.1.13
   Compiling quick-error v1.2.2
   Compiling stable_deref_trait v1.1.1
   Compiling unicode-width v0.1.5
   Compiling bindgen v0.47.3
   Compiling either v1.5.2
   Compiling memoffset v0.2.1
   Compiling smallvec v0.6.10
   Compiling ansi_term v0.11.0
   Compiling termcolor v1.0.5
   Compiling strsim v0.8.0
   Compiling vec_map v0.8.1
   Compiling scopeguard v0.3.3
   Compiling strsim v0.9.2
   Compiling futures v0.1.28
   Compiling fnv v1.0.6
   Compiling bit-vec v0.5.1
   Compiling fake-simd v0.1.2
   Compiling fixedbitset v0.1.9
   Compiling peeking_take_while v0.1.2
   Compiling slab v0.4.2
   Compiling ordermap v0.3.5
   Compiling opaque-debug v0.2.2
   Compiling new_debug_unreachable v1.0.3
   Compiling precomputed-hash v0.1.1
   Compiling pkg-config v0.3.14
   Compiling crc32fast v1.2.0
   Compiling diff v0.1.11
   Compiling lalrpop-util v0.17.1
   Compiling httparse v1.3.4
   Compiling itoa v0.4.4
   Compiling foreign-types-shared v0.1.1
   Compiling openssl v0.10.23
   Compiling ppv-lite86 v0.2.5
   Compiling try-lock v0.2.2
   Compiling indexmap v1.0.2
   Compiling memsec v0.5.6
   Compiling native-tls v0.2.3
   Compiling matches v0.1.8
   Compiling openssl-probe v0.1.2
   Compiling safemem v0.3.0
   Compiling remove_dir_all v0.5.2
   Compiling scoped-tls v0.1.2
   Compiling ryu v1.0.0
   Compiling percent-encoding v1.0.1
   Compiling linked-hash-map v0.5.2
   Compiling zbase32 v0.1.2
   Compiling sequoia-guide v0.9.0 (/build/source/guide)
   Compiling encode_unicode v0.3.5
   Compiling rand_core v0.3.1
   Compiling rand_jitter v0.1.4
   Compiling phf_shared v0.7.24
   Compiling lazy_static v1.3.0
   Compiling rand_chacha v0.1.1
   Compiling rand_pcg v0.1.2
   Compiling rand v0.6.5
   Compiling rand_chacha v0.2.0
   Compiling semver v0.9.0
   Compiling regex-syntax v0.6.8
   Compiling nom v4.2.3
   Compiling log v0.4.6
   Compiling block-padding v0.1.4
   Compiling humantime v1.2.0
   Compiling owning_ref v0.4.0
   Compiling textwrap v0.11.0
   Compiling clang-sys v0.26.4
   Compiling itertools v0.8.0
   Compiling unicode-normalization v0.1.8
   Compiling bit-set v0.5.1
   Compiling backtrace-sys v0.1.30
   Compiling libloading v0.5.2
   Compiling miniz-sys v0.1.12
   Compiling bzip2-sys v0.1.7
   Compiling foreign-types v0.3.2
   Compiling petgraph v0.4.13
   Compiling unicode-bidi v0.3.4
   Compiling lru-cache v0.1.2
   Compiling rand_hc v0.1.0
   Compiling rand_isaac v0.1.1
   Compiling rand_xorshift v0.1.1
   Compiling openssl-sys v0.9.47
   Compiling libsqlite3-sys v0.9.3
   Compiling thread_local v0.3.6
   Compiling crossbeam-utils v0.6.5
   Compiling c2-chacha v0.2.2
   Compiling tokio-sync v0.1.6
   Compiling ena v0.13.0
   Compiling want v0.2.0
   Compiling lock_api v0.1.5
   Compiling rustc_version v0.2.3
   Compiling rand_os v0.1.3
   Compiling iovec v0.1.2
   Compiling atty v0.2.11
   Compiling dirs v1.0.5
   Compiling net2 v0.2.33
   Compiling num_cpus v1.10.1
   Compiling getrandom v0.1.6
   Compiling time v0.1.42
   Compiling rand v0.4.6
   Compiling dirs-sys v0.3.3
   Compiling fs2 v0.4.3
   Compiling rpassword v3.0.2
   Compiling quote v0.6.12
   Compiling crossbeam-epoch v0.7.1
   Compiling crossbeam-queue v0.1.2
   Compiling tokio-executor v0.1.8
   Compiling hashbrown v0.1.8
   Compiling capnp v0.10.0
   Compiling base64 v0.9.3
   Compiling regex-automata v0.1.7
   Compiling generic-array v0.12.3
   Compiling parking_lot_core v0.4.0
   Compiling hyper v0.12.31
   Compiling idna v0.1.5
   Compiling clap v2.33.0
   Compiling termsize v0.1.6
   Compiling bytes v0.4.12
   Compiling rand_core v0.5.0
   Compiling term v0.5.2
   Compiling aho-corasick v0.7.4
   Compiling csv-core v0.1.6
   Compiling mio v0.6.19
   Compiling futures-cpupool v0.1.8
   Compiling dirs v2.0.1
   Compiling tokio-current-thread v0.1.6
   Compiling tokio-timer v0.2.11
   Compiling crossbeam-deque v0.7.1
   Compiling tempdir v0.3.7
   Compiling backtrace v0.3.32
   Compiling flate2 v1.0.9
   Compiling block-buffer v0.7.3
   Compiling digest v0.8.1
   Compiling bzip2 v0.3.3
   Compiling tokio-io v0.1.12
   Compiling string v0.2.1
   Compiling http v0.1.17
   Compiling tokio-buf v0.1.1
   Compiling capnpc v0.10.1
   Compiling capnp-futures v0.10.0
   Compiling rusqlite v0.14.0
   Compiling url v1.7.2
   Compiling cexpr v0.3.5
   Compiling ascii-canvas v2.0.0
   Compiling mio-uds v0.6.7
   Compiling sha2 v0.8.0
   Compiling phf_generator v0.7.24
   Compiling tokio-threadpool v0.1.15
   Compiling rand v0.7.0
   Compiling buffered-reader v0.9.0 (/build/source/buffered-reader)
   Compiling tokio-codec v0.1.1
   Compiling capnp-rpc v0.10.0
   Compiling sequoia-store v0.9.0 (/build/source/store)
   Compiling string_cache_codegen v0.4.2
   Compiling parking_lot v0.7.1
   Compiling http-body v0.1.0
   Compiling h2 v0.1.25
   Compiling tokio-fs v0.1.6
   Compiling tempfile v3.1.0
   Compiling tokio-reactor v0.1.9
   Compiling env_logger v0.6.2
   Compiling sequoia-sqv v0.9.0 (/build/source/sqv)
   Compiling sequoia-tool v0.9.0 (/build/source/tool)
   Compiling string_cache v0.7.3
   Compiling tokio-uds v0.2.5
   Compiling tokio-udp v0.1.3
   Compiling tokio-tcp v0.1.3
   Compiling quickcheck v0.8.5
   Compiling tokio v0.1.22
   Compiling synstructure v0.10.2
   Compiling serde_derive v1.0.94
   Compiling sequoia-ffi-macros v0.9.0 (/build/source/ffi-macros)
   Compiling tokio-core v0.1.17
   Compiling failure v0.1.5
   Compiling which v2.0.1
   Compiling sequoia-core v0.9.0 (/build/source/core)
   Compiling hyper-tls v0.3.2
   Compiling nettle-sys v2.0.1
   Compiling docopt v1.1.0
   Compiling bstr v0.2.1
   Compiling csv v1.1.1
   Compiling lalrpop v0.17.1
   Compiling prettytable-rs v0.8.0
   Compiling nettle v5.0.2
   Compiling sequoia-rfc2822 v0.9.0 (/build/source/rfc2822)
   Compiling sequoia-openpgp v0.9.0 (/build/source/openpgp)
   Compiling sequoia-ipc v0.9.0 (/build/source/ipc)
warning: the item `memsec` is imported redundantly
  --> openpgp/src/crypto/asymmetric.rs:87:13
   |
87 |         use memsec;
   |             ^^^^^^
   | 
  ::: openpgp/src/lib.rs:50:1
   |
50 | extern crate memsec;
   | -------------------- the item `memsec` is already imported here
   |
   = note: #[warn(unused_imports)] on by default

warning: the item `rsa` is imported redundantly
   --> openpgp/src/crypto/asymmetric.rs:216:13
    |
3   | use nettle::{dsa, ecc, ecdsa, ed25519, rsa, Yarrow};
    |                                        --- the item `rsa` is already imported here
...
216 |         use nettle::rsa;
    |             ^^^^^^^^^^^

warning: the item `memsec` is imported redundantly
   --> openpgp/src/crypto/ecdh.rs:175:9
    |
175 |     use memsec;
    |         ^^^^^^
    | 
   ::: openpgp/src/lib.rs:50:1
    |
50  | extern crate memsec;
    | -------------------- the item `memsec` is already imported here

warning: the item `mpis` is imported redundantly
   --> openpgp/src/packet/key.rs:270:28
    |
9   | use crypto::{self, mem::Protected, mpis, hash::Hash, KeyPair};
    |                                    ---- the item `mpis` is already imported here
...
270 |         use crypto::mpis::{self, MPI, PublicKey};
    |                            ^^^^

warning: the item `mpis` is imported redundantly
   --> openpgp/src/packet/key.rs:310:28
    |
9   | use crypto::{self, mem::Protected, mpis, hash::Hash, KeyPair};
    |                                    ---- the item `mpis` is already imported here
...
310 |         use crypto::mpis::{self, MPI, PublicKey};
    |                            ^^^^

warning: the item `HashAlgorithm` is imported redundantly
   --> openpgp/src/packet/key.rs:311:25
    |
15  | use HashAlgorithm;
    |     ------------- the item `HashAlgorithm` is already imported here
...
311 |         use constants::{HashAlgorithm, SymmetricAlgorithm, Curve};
    |                         ^^^^^^^^^^^^^

warning: the item `SymmetricAlgorithm` is imported redundantly
   --> openpgp/src/packet/key.rs:311:40
    |
14  | use SymmetricAlgorithm;
    |     ------------------ the item `SymmetricAlgorithm` is already imported here
...
311 |         use constants::{HashAlgorithm, SymmetricAlgorithm, Curve};
    |                                        ^^^^^^^^^^^^^^^^^^

warning: the item `Curve` is imported redundantly
   --> openpgp/src/packet/key.rs:311:60
    |
16  | use constants::Curve;
    |     ---------------- the item `Curve` is already imported here
...
311 |         use constants::{HashAlgorithm, SymmetricAlgorithm, Curve};
    |                                                            ^^^^^

warning: the item `Error` is imported redundantly
   --> openpgp/src/packet/key.rs:313:13
    |
8   | use Error;
    |     ----- the item `Error` is already imported here
...
313 |         use Error;
    |             ^^^^^

warning: the item `SecretKey` is imported redundantly
   --> openpgp/src/packet/key.rs:544:13
    |
544 |           use packet::key::SecretKey;
    |               ^^^^^^^^^^^^^^^^^^^^^^
...
569 | / pub enum SecretKey {
570 | |     /// Unencrypted secret key. Can be used as-is.
571 | |     Unencrypted(Unencrypted),
572 | |     /// The secret key is encrypted with a password.
573 | |     Encrypted(Encrypted),
574 | | }
    | |_- the item `SecretKey` is already defined here

warning: the item `SignatureType` is imported redundantly
   --> openpgp/src/tpk/builder.rs:378:13
    |
17  |     SignatureType,
    |     ------------- the item `SignatureType` is already imported here
...
378 |         use SignatureType;
    |             ^^^^^^^^^^^^^

warning: the item `Tag` is imported redundantly
    --> openpgp/src/serialize/mod.rs:2045:13
     |
33   | use packet::prelude::*;
     |     ------------------ the item `Tag` is already imported here
...
2045 |         use packet::Tag;
     |             ^^^^^^^^^^^

warning: variable does not need to be mutable
  --> openpgp/src/crypto/ecdh.rs:36:21
   |
36 |                 let mut v: Protected =
   |                     ----^
   |                     |
   |                     help: remove this `mut`
   |
   = note: #[warn(unused_mut)] on by default

warning: variable does not need to be mutable
   --> openpgp/src/crypto/ecdh.rs:300:17
    |
300 |             let mut m = aes_key_unwrap(*sym, &Z, key)?;
    |                 ----^
    |                 |
    |                 help: remove this `mut`

warning: variable does not need to be mutable
   --> openpgp/src/packet/key.rs:320:21
    |
320 |                 let mut private: Protected =
    |                     ----^^^^^^^
    |                     |
    |                     help: remove this `mut`

warning: variable does not need to be mutable
   --> openpgp/src/serialize/stream.rs:415:21
    |
415 |                 let mut hash = self.hash.clone();
    |                     ----^^^^
    |                     |
    |                     help: remove this `mut`

warning: variable does not need to be mutable
    --> openpgp/src/serialize/stream.rs:1087:17
     |
1087 |             let mut w = w.into_inner()?.unwrap();
     |                 ----^
     |                 |
     |                 help: remove this `mut`

warning: variable does not need to be mutable
    --> openpgp/src/serialize/stream.rs:1089:17
     |
1089 |             let mut w = w.into_inner()?.unwrap();
     |                 ----^
     |                 |
     |                 help: remove this `mut`

warning: variable does not need to be mutable
   --> openpgp/src/parse/parse.rs:277:17
    |
277 |             let mut inner = Box::new(self.reader).into_inner().unwrap();
    |                 ----^^^^^
    |                 |
    |                 help: remove this `mut`

warning: variable does not need to be mutable
    --> openpgp/src/parse/parse.rs:1363:25
     |
1363 |                     let mut cipher = php_try!(php.parse_bytes_eof("encrypted_mpis"));
     |                         ----^^^^^^
     |                         |
     |                         help: remove this `mut`

warning: variable does not need to be mutable
    --> openpgp/src/parse/parse.rs:1879:33
     |
1879 |                             let mut h = state.sig_group_mut().hashes
     |                                 ----^
     |                                 |
     |                                 help: remove this `mut`

warning: variable does not need to be mutable
    --> openpgp/src/parse/parse.rs:2061:38
     |
2061 |             PacketParserResult::Some(mut pp) => {
     |                                      ----^^
     |                                      |
     |                                      help: remove this `mut`

warning: variable does not need to be mutable
    --> openpgp/src/parse/parse.rs:3456:25
     |
3456 |                     let mut dec = aead::Decryptor::new(
     |                         ----^^^
     |                         |
     |                         help: remove this `mut`

warning: variable does not need to be mutable
   --> openpgp/src/parse/mpis.rs:137:21
    |
137 |                 let mut rest = php.parse_bytes_eof("rest")?;
    |                     ----^^^^
    |                     |
    |                     help: remove this `mut`

warning: variable does not need to be mutable
   --> openpgp/src/parse/mpis.rs:270:21
    |
270 |                 let mut rest = php.parse_bytes_eof("rest")?;
    |                     ----^^^^
    |                     |
    |                     help: remove this `mut`

warning: variable does not need to be mutable
   --> openpgp/src/parse/mpis.rs:348:21
    |
348 |                 let mut rest = php.parse_bytes_eof("rest")?;
    |                     ----^^^^
    |                     |
    |                     help: remove this `mut`

warning: variable does not need to be mutable
   --> openpgp/src/parse/mpis.rs:455:21
    |
455 |                 let mut rest = php.parse_bytes_eof("rest")?;
    |                     ----^^^^
    |                     |
    |                     help: remove this `mut`

warning: variable does not need to be mutable
   --> openpgp/src/parse/stream.rs:587:52
    |
587 |                 while let PacketParserResult::Some(mut pp) = ppr {
    |                                                    ----^^
    |                                                    |
    |                                                    help: remove this `mut`

warning: variable does not need to be mutable
   --> openpgp/src/parse/stream.rs:769:21
    |
769 |                 let mut lit = Literal::new(DataFormat::Binary);
    |                     ----^^^
    |                     |
    |                     help: remove this `mut`

warning: variable does not need to be mutable
   --> openpgp/src/parse/stream.rs:783:21
    |
783 |                 let mut lit = Literal::new(DataFormat::Binary);
    |                     ----^^^
    |                     |
    |                     help: remove this `mut`

warning: variable does not need to be mutable
    --> openpgp/src/parse/stream.rs:1380:52
     |
1380 |                 while let PacketParserResult::Some(mut pp) = ppr {
     |                                                    ----^^
     |                                                    |
     |                                                    help: remove this `mut`

   Compiling sequoia-net v0.9.0 (/build/source/net)
   Compiling sequoia-openpgp-ffi v0.9.0 (/build/source/openpgp-ffi)
   Compiling sequoia-ffi v0.9.0 (/build/source/ffi)
warning: variable does not need to be mutable
   --> tool/src/sq.rs:221:25
    |
221 |                     let mut input = open_or_stdin(m.value_of("input"))?;
    |                         ----^^^^^
    |                         |
    |                         help: remove this `mut`
    |
    = note: #[warn(unused_mut)] on by default

warning: variable does not need to be mutable
   --> tool/src/sq.rs:233:25
    |
233 |                     let mut input = open_or_stdin(m.value_of("input"))?;
    |                         ----^^^^^
    |                         |
    |                         help: remove this `mut`

warning: variable does not need to be mutable
  --> tool/src/commands/mod.rs:52:25
   |
52 |             if let Some(mut secret) = key.secret() {
   |                         ----^^^^^^
   |                         |
   |                         help: remove this `mut`

warning: variable does not need to be mutable
  --> tool/src/commands/sign.rs:48:48
   |
48 |             while let PacketParserResult::Some(mut pp) = ppr {
   |                                                ----^^
   |                                                |
   |                                                help: remove this `mut`

   Compiling sequoia v0.9.0 (/build/source)
    Finished dev [unoptimized + debuginfo] target(s) in 2m 39s
make -Copenpgp-ffi build
make[1]: Entering directory '/build/source/openpgp-ffi'
sed -e 's|VERSION|0.9.0|g' -e 's|PREFIX|/build/source/openpgp-ffi|g' -e 's|libdir=.*|libdir=/build/source/target/debug|g' sequoia-openpgp.pc.in > /build/source/target/debug/sequoia-openpgp.pc
make[1]: Leaving directory '/build/source/openpgp-ffi'
make -Cffi build
make[1]: Entering directory '/build/source/ffi'
make -Clang/python build
make[2]: Entering directory '/build/source/ffi/lang/python'
LDFLAGS=-L/build/source/target/debug python3 setup.py build
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.7
creating build/lib.linux-x86_64-3.7/sequoia
copying sequoia/net.py -> build/lib.linux-x86_64-3.7/sequoia
copying sequoia/openpgp.py -> build/lib.linux-x86_64-3.7/sequoia
copying sequoia/__init__.py -> build/lib.linux-x86_64-3.7/sequoia
copying sequoia/glue.py -> build/lib.linux-x86_64-3.7/sequoia
copying sequoia/sequoia_build.py -> build/lib.linux-x86_64-3.7/sequoia
copying sequoia/error.py -> build/lib.linux-x86_64-3.7/sequoia
copying sequoia/prelude.py -> build/lib.linux-x86_64-3.7/sequoia
copying sequoia/core.py -> build/lib.linux-x86_64-3.7/sequoia
copying sequoia/store.py -> build/lib.linux-x86_64-3.7/sequoia
running build_ext
generating cffi module 'build/temp.linux-x86_64-3.7/_sequoia.c'
creating build/temp.linux-x86_64-3.7
building '_sequoia' extension
creating build/temp.linux-x86_64-3.7/build
creating build/temp.linux-x86_64-3.7/build/temp.linux-x86_64-3.7
gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -I../../include -I../../../openpgp-ffi/include -fPIC -I/nix/store/zjzq4qp81z8qnnnchnkycmsq0impw173-python3-3.7.4/include/python3.7m -c build/temp.linux-x86_64-3.7/_sequoia.c -o build/temp.linux-x86_64-3.7/build/temp.linux-x86_64-3.7/_sequoia.o
gcc -pthread -shared -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-zlib-1.2.11/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-bzip2-1.0.6.0.1/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-expat-2.2.7/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-xz-5.2.4/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-libffi-3.2.1/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-gdbm-1.18.1/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-sqlite-3.28.0/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-readline-6.3p08/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-ncurses-6.1-20190112/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-openssl-1.0.2s/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-zlib-1.2.11/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-bzip2-1.0.6.0.1/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-expat-2.2.7/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-xz-5.2.4/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-libffi-3.2.1/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-gdbm-1.18.1/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-sqlite-3.28.0/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-readline-6.3p08/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-ncurses-6.1-20190112/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-openssl-1.0.2s/lib -L/build/source/target/debug -I../../include -I../../../openpgp-ffi/include build/temp.linux-x86_64-3.7/build/temp.linux-x86_64-3.7/_sequoia.o -L/nix/store/zjzq4qp81z8qnnnchnkycmsq0impw173-python3-3.7.4/lib -lsequoia_ffi -lpython3.7m -o build/lib.linux-x86_64-3.7/_sequoia.abi3.so
/nix/store/f6nhx4jpndbqd76nqlr0bq2xq37kaz3r-python3.7-cffi-1.12.3/lib/python3.7/site-packages/cffi/cparser.py:150: UserWarning: String literal found in cdef() or type source. String literals are ignored here, but you should remove them anyway because some character sequences confuse pre-parsing.
  warnings.warn("String literal found in cdef() or type source. "
touch .stamp-build
make[2]: Leaving directory '/build/source/ffi/lang/python'
sed -e 's|VERSION|0.9.0|g' -e 's|PREFIX|/build/source/ffi|g' -e 's|libdir=.*|libdir=/build/source/target/debug|g' sequoia.pc.in >/build/source/target/debug/sequoia.pc
make[1]: Leaving directory '/build/source/ffi'
@nix { "action": "setPhase", "phase": "checkPhase" }
running tests
CARGO_TARGET_DIR=/build/source/target cargo test  --all
   Compiling cgmath v0.16.1
   Compiling winapi v0.3.7
   Compiling approx v0.1.1
   Compiling rgb v0.8.13
   Compiling difference v2.0.0
   Compiling environment v0.1.1
   Compiling num-traits v0.2.8
   Compiling filetime v0.2.6
   Compiling buffered-reader v0.9.0 (/build/source/buffered-reader)
   Compiling sequoia-ffi-macros v0.9.0 (/build/source/ffi-macros)
   Compiling serde_json v1.0.40
   Compiling sequoia-core v0.9.0 (/build/source/core)
   Compiling sequoia-rfc2822 v0.9.0 (/build/source/rfc2822)
   Compiling sequoia-openpgp v0.9.0 (/build/source/openpgp)
warning: variable does not need to be mutable
  --> openpgp/examples/web-of-trust.rs:33:13
   |
33 |         let mut parser = TPKParser::from_file(input)
   |             ----^^^^^^
   |             |
   |             help: remove this `mut`
   |
   = note: #[warn(unused_mut)] on by default

warning: the item `memsec` is imported redundantly
  --> openpgp/src/crypto/asymmetric.rs:87:13
   |
87 |         use memsec;
   |             ^^^^^^
   | 
  ::: openpgp/src/lib.rs:50:1
   |
50 | extern crate memsec;
   | -------------------- the item `memsec` is already imported here
   |
   = note: #[warn(unused_imports)] on by default

warning: the item `rsa` is imported redundantly
   --> openpgp/src/crypto/asymmetric.rs:216:13
    |
3   | use nettle::{dsa, ecc, ecdsa, ed25519, rsa, Yarrow};
    |                                        --- the item `rsa` is already imported here
...
216 |         use nettle::rsa;
    |             ^^^^^^^^^^^

warning: the item `memsec` is imported redundantly
   --> openpgp/src/crypto/ecdh.rs:175:9
    |
175 |     use memsec;
    |         ^^^^^^
    | 
   ::: openpgp/src/lib.rs:50:1
    |
50  | extern crate memsec;
    | -------------------- the item `memsec` is already imported here

warning: the item `mpis` is imported redundantly
   --> openpgp/src/packet/key.rs:270:28
    |
9   | use crypto::{self, mem::Protected, mpis, hash::Hash, KeyPair};
    |                                    ---- the item `mpis` is already imported here
...
270 |         use crypto::mpis::{self, MPI, PublicKey};
    |                            ^^^^

warning: the item `mpis` is imported redundantly
   --> openpgp/src/packet/key.rs:310:28
    |
9   | use crypto::{self, mem::Protected, mpis, hash::Hash, KeyPair};
    |                                    ---- the item `mpis` is already imported here
...
310 |         use crypto::mpis::{self, MPI, PublicKey};
    |                            ^^^^

warning: the item `HashAlgorithm` is imported redundantly
   --> openpgp/src/packet/key.rs:311:25
    |
15  | use HashAlgorithm;
    |     ------------- the item `HashAlgorithm` is already imported here
...
311 |         use constants::{HashAlgorithm, SymmetricAlgorithm, Curve};
    |                         ^^^^^^^^^^^^^

warning: the item `SymmetricAlgorithm` is imported redundantly
   --> openpgp/src/packet/key.rs:311:40
    |
14  | use SymmetricAlgorithm;
    |     ------------------ the item `SymmetricAlgorithm` is already imported here
...
311 |         use constants::{HashAlgorithm, SymmetricAlgorithm, Curve};
    |                                        ^^^^^^^^^^^^^^^^^^

warning: the item `Curve` is imported redundantly
   --> openpgp/src/packet/key.rs:311:60
    |
16  | use constants::Curve;
    |     ---------------- the item `Curve` is already imported here
...
311 |         use constants::{HashAlgorithm, SymmetricAlgorithm, Curve};
    |                                                            ^^^^^

warning: the item `Error` is imported redundantly
   --> openpgp/src/packet/key.rs:313:13
    |
8   | use Error;
    |     ----- the item `Error` is already imported here
...
313 |         use Error;
    |             ^^^^^

warning: the item `SecretKey` is imported redundantly
   --> openpgp/src/packet/key.rs:544:13
    |
544 |           use packet::key::SecretKey;
    |               ^^^^^^^^^^^^^^^^^^^^^^
...
569 | / pub enum SecretKey {
570 | |     /// Unencrypted secret key. Can be used as-is.
571 | |     Unencrypted(Unencrypted),
572 | |     /// The secret key is encrypted with a password.
573 | |     Encrypted(Encrypted),
574 | | }
    | |_- the item `SecretKey` is already defined here

warning: the item `SignatureType` is imported redundantly
   --> openpgp/src/tpk/builder.rs:378:13
    |
17  |     SignatureType,
    |     ------------- the item `SignatureType` is already imported here
...
378 |         use SignatureType;
    |             ^^^^^^^^^^^^^

warning: the item `Tag` is imported redundantly
    --> openpgp/src/serialize/mod.rs:2045:13
     |
33   | use packet::prelude::*;
     |     ------------------ the item `Tag` is already imported here
...
2045 |         use packet::Tag;
     |             ^^^^^^^^^^^

   Compiling sequoia-ipc v0.9.0 (/build/source/ipc)
   Compiling sequoia-guide v0.9.0 (/build/source/guide)
   Compiling sequoia-net v0.9.0 (/build/source/net)
   Compiling sequoia-openpgp-ffi v0.9.0 (/build/source/openpgp-ffi)
warning: variable does not need to be mutable
  --> openpgp/src/crypto/ecdh.rs:36:21
   |
36 |                 let mut v: Protected =
   |                     ----^
   |                     |
   |                     help: remove this `mut`
   |
   = note: #[warn(unused_mut)] on by default

warning: variable does not need to be mutable
   --> openpgp/src/crypto/ecdh.rs:300:17
    |
300 |             let mut m = aes_key_unwrap(*sym, &Z, key)?;
    |                 ----^
    |                 |
    |                 help: remove this `mut`

warning: variable does not need to be mutable
   --> openpgp/src/crypto/s2k.rs:400:17
    |
400 |             let mut pp = PacketParser::from_bytes(path).unwrap().unwrap();
    |                 ----^^
    |                 |
    |                 help: remove this `mut`

warning: variable does not need to be mutable
    --> openpgp/src/packet/signature/mod.rs:1091:48
     |
1091 |             while let PacketParserResult::Some(mut pp) = ppr {
     |                                                ----^^
     |                                                |
     |                                                help: remove this `mut`

warning: variable does not need to be mutable
    --> openpgp/src/packet/signature/mod.rs:1156:17
     |
1156 |             let mut sig = Builder::new(SignatureType::Binary);
     |                 ----^^^
     |                 |
     |                 help: remove this `mut`

warning: variable does not need to be mutable
    --> openpgp/src/packet/signature/mod.rs:1157:17
     |
1157 |             let mut hash = hash_algo.context().unwrap();
     |                 ----^^^^
     |                 |
     |                 help: remove this `mut`

warning: variable does not need to be mutable
   --> openpgp/src/packet/key.rs:320:21
    |
320 |                 let mut private: Protected =
    |                     ----^^^^^^^
    |                     |
    |                     help: remove this `mut`

warning: variable does not need to be mutable
   --> openpgp/src/serialize/stream.rs:415:21
    |
415 |                 let mut hash = self.hash.clone();
    |                     ----^^^^
    |                     |
    |                     help: remove this `mut`

warning: variable does not need to be mutable
    --> openpgp/src/serialize/stream.rs:1087:17
     |
1087 |             let mut w = w.into_inner()?.unwrap();
     |                 ----^
     |                 |
     |                 help: remove this `mut`

warning: variable does not need to be mutable
    --> openpgp/src/serialize/stream.rs:1089:17
     |
1089 |             let mut w = w.into_inner()?.unwrap();
     |                 ----^
     |                 |
     |                 help: remove this `mut`

warning: variable does not need to be mutable
   --> openpgp/src/parse/parse.rs:277:17
    |
277 |             let mut inner = Box::new(self.reader).into_inner().unwrap();
    |                 ----^^^^^
    |                 |
    |                 help: remove this `mut`

warning: variable does not need to be mutable
    --> openpgp/src/parse/parse.rs:1363:25
     |
1363 |                     let mut cipher = php_try!(php.parse_bytes_eof("encrypted_mpis"));
     |                         ----^^^^^^
     |                         |
     |                         help: remove this `mut`

warning: variable does not need to be mutable
    --> openpgp/src/parse/parse.rs:1694:13
     |
1694 |         let mut pp = PacketParser::from_bytes(::tests::message(
     |             ----^^
     |             |
     |             help: remove this `mut`

warning: variable does not need to be mutable
    --> openpgp/src/parse/parse.rs:1818:13
     |
1818 |         let mut pp = PacketParser::from_bytes(
     |             ----^^
     |             |
     |             help: remove this `mut`

warning: variable does not need to be mutable
    --> openpgp/src/parse/parse.rs:1879:33
     |
1879 |                             let mut h = state.sig_group_mut().hashes
     |                                 ----^
     |                                 |
     |                                 help: remove this `mut`

warning: variable does not need to be mutable
    --> openpgp/src/parse/parse.rs:2061:38
     |
2061 |             PacketParserResult::Some(mut pp) => {
     |                                      ----^^
     |                                      |
     |                                      help: remove this `mut`

warning: variable does not need to be mutable
    --> openpgp/src/parse/parse.rs:3456:25
     |
3456 |                     let mut dec = aead::Decryptor::new(
     |                         ----^^^
     |                         |
     |                         help: remove this `mut`

warning: variable does not need to be mutable
    --> openpgp/src/parse/parse.rs:3696:17
     |
3696 |             let mut ppr = PacketParserBuilder::from_bytes(
     |                 ----^^^
     |                 |
     |                 help: remove this `mut`

warning: variable does not need to be mutable
    --> openpgp/src/parse/parse.rs:3741:17
     |
3741 |             let mut ppr = consume_until(
     |                 ----^^^
     |                 |
     |                 help: remove this `mut`

warning: variable does not need to be mutable
    --> openpgp/src/parse/parse.rs:3811:48
     |
3811 |             while let PacketParserResult::Some(mut pp) = ppr {
     |                                                ----^^
     |                                                |
     |                                                help: remove this `mut`

warning: variable does not need to be mutable
    --> openpgp/src/parse/parse.rs:3836:48
     |
3836 |             while let PacketParserResult::Some(mut pp) = ppr {
     |                                                ----^^
     |                                                |
     |                                                help: remove this `mut`

warning: variable does not need to be mutable
    --> openpgp/src/parse/parse.rs:3861:48
     |
3861 |             while let PacketParserResult::Some(mut pp) = ppr {
     |                                                ----^^
     |                                                |
     |                                                help: remove this `mut`

warning: variable does not need to be mutable
    --> openpgp/src/parse/parse.rs:3927:44
     |
3927 |             if let PacketParserResult::EOF(mut eof) = ppr {
     |                                            ----^^^
     |                                            |
     |                                            help: remove this `mut`

warning: variable does not need to be mutable
   --> openpgp/src/parse/mpis.rs:137:21
    |
137 |                 let mut rest = php.parse_bytes_eof("rest")?;
    |                     ----^^^^
    |                     |
    |                     help: remove this `mut`

warning: variable does not need to be mutable
   --> openpgp/src/parse/mpis.rs:270:21
    |
270 |                 let mut rest = php.parse_bytes_eof("rest")?;
    |                     ----^^^^
    |                     |
    |                     help: remove this `mut`

warning: variable does not need to be mutable
   --> openpgp/src/parse/mpis.rs:348:21
    |
348 |                 let mut rest = php.parse_bytes_eof("rest")?;
    |                     ----^^^^
    |                     |
    |                     help: remove this `mut`

warning: variable does not need to be mutable
   --> openpgp/src/parse/mpis.rs:455:21
    |
455 |                 let mut rest = php.parse_bytes_eof("rest")?;
    |                     ----^^^^
    |                     |
    |                     help: remove this `mut`

warning: variable does not need to be mutable
   --> openpgp/src/parse/stream.rs:587:52
    |
587 |                 while let PacketParserResult::Some(mut pp) = ppr {
    |                                                    ----^^
    |                                                    |
    |                                                    help: remove this `mut`

warning: variable does not need to be mutable
   --> openpgp/src/parse/stream.rs:769:21
    |
769 |                 let mut lit = Literal::new(DataFormat::Binary);
    |                     ----^^^
    |                     |
    |                     help: remove this `mut`

warning: variable does not need to be mutable
   --> openpgp/src/parse/stream.rs:783:21
    |
783 |                 let mut lit = Literal::new(DataFormat::Binary);
    |                     ----^^^
    |                     |
    |                     help: remove this `mut`

warning: variable does not need to be mutable
    --> openpgp/src/parse/stream.rs:1380:52
     |
1380 |                 while let PacketParserResult::Some(mut pp) = ppr {
     |                                                    ----^^
     |                                                    |
     |                                                    help: remove this `mut`

warning: variable does not need to be mutable
    --> openpgp/src/parse/stream.rs:1637:17
     |
1637 |             let mut h = VHelper::new(0, 0, 0, 0, keys.clone());
     |                 ----^
     |                 |
     |                 help: remove this `mut`

warning: variable does not need to be mutable
    --> openpgp/src/parse/stream.rs:1665:17
     |
1665 |             let mut h = VHelper::new(0, 0, 0, 0, keys.clone());
     |                 ----^
     |                 |
     |                 help: remove this `mut`

   Compiling sequoia-store v0.9.0 (/build/source/store)
   Compiling num-traits v0.1.43
   Compiling sequoia-ffi v0.9.0 (/build/source/ffi)
   Compiling sequoia v0.9.0 (/build/source)
   Compiling winconsole v0.10.0
   Compiling colored v1.8.0
   Compiling assert_cli v0.6.3
   Compiling sequoia-sqv v0.9.0 (/build/source/sqv)
   Compiling sequoia-tool v0.9.0 (/build/source/tool)
warning: variable does not need to be mutable
   --> tool/src/sq.rs:221:25
    |
221 |                     let mut input = open_or_stdin(m.value_of("input"))?;
    |                         ----^^^^^
    |                         |
    |                         help: remove this `mut`
    |
    = note: #[warn(unused_mut)] on by default

warning: variable does not need to be mutable
   --> tool/src/sq.rs:233:25
    |
233 |                     let mut input = open_or_stdin(m.value_of("input"))?;
    |                         ----^^^^^
    |                         |
    |                         help: remove this `mut`

warning: variable does not need to be mutable
  --> tool/src/commands/mod.rs:52:25
   |
52 |             if let Some(mut secret) = key.secret() {
   |                         ----^^^^^^
   |                         |
   |                         help: remove this `mut`

warning: variable does not need to be mutable
  --> tool/src/commands/sign.rs:48:48
   |
48 |             while let PacketParserResult::Some(mut pp) = ppr {
   |                                                ----^^
   |                                                |
   |                                                help: remove this `mut`

warning: function `DotAtomParser` should have a snake case name
   --> rfc2822/src/roundtrip.rs:698:29
    |
698 | parser_quickcheck!(DotAtom, DotAtomParser);
    |                             ^^^^^^^^^^^^^ help: convert the identifier to snake case: `dot_atom_parser`
    |
    = note: #[warn(non_snake_case)] on by default

warning: function `QContentParser` should have a snake case name
   --> rfc2822/src/roundtrip.rs:791:30
    |
791 | parser_quickcheck!(QContent, QContentParser);
    |                              ^^^^^^^^^^^^^^ help: convert the identifier to snake case: `qcontent_parser`

warning: function `WordParser` should have a snake case name
   --> rfc2822/src/roundtrip.rs:891:26
    |
891 | parser_quickcheck!(Word, WordParser);
    |                          ^^^^^^^^^^ help: convert the identifier to snake case: `word_parser`

warning: function `PhraseParser` should have a snake case name
   --> rfc2822/src/roundtrip.rs:911:28
    |
911 | parser_quickcheck!(Phrase, PhraseParser);
    |                            ^^^^^^^^^^^^ help: convert the identifier to snake case: `phrase_parser`

warning: function `NameAddrParser` should have a snake case name
   --> rfc2822/src/roundtrip.rs:927:30
    |
927 | parser_quickcheck!(NameAddr, NameAddrParser);
    |                              ^^^^^^^^^^^^^^ help: convert the identifier to snake case: `name_addr_parser`

warning: function `AngleAddrParser` should have a snake case name
   --> rfc2822/src/roundtrip.rs:949:31
    |
949 | parser_quickcheck!(AngleAddr, AngleAddrParser);
    |                               ^^^^^^^^^^^^^^^ help: convert the identifier to snake case: `angle_addr_parser`

warning: function `DisplayNameParser` should have a snake case name
   --> rfc2822/src/roundtrip.rs:958:33
    |
958 | parser_quickcheck!(DisplayName, DisplayNameParser);
    |                                 ^^^^^^^^^^^^^^^^^ help: convert the identifier to snake case: `display_name_parser`

warning: function `AddrSpecParser` should have a snake case name
   --> rfc2822/src/roundtrip.rs:983:30
    |
983 | parser_quickcheck!(AddrSpec, AddrSpecParser);
    |                              ^^^^^^^^^^^^^^ help: convert the identifier to snake case: `addr_spec_parser`

warning: function `LocalPartParser` should have a snake case name
   --> rfc2822/src/roundtrip.rs:997:31
    |
997 | parser_quickcheck!(LocalPart, LocalPartParser);
    |                               ^^^^^^^^^^^^^^^ help: convert the identifier to snake case: `local_part_parser`

warning: function `DomainParser` should have a snake case name
    --> rfc2822/src/roundtrip.rs:1011:28
     |
1011 | parser_quickcheck!(Domain, DomainParser);
     |                            ^^^^^^^^^^^^ help: convert the identifier to snake case: `domain_parser`

warning: function `DomainLiteralParser` should have a snake case name
    --> rfc2822/src/roundtrip.rs:1055:35
     |
1055 | parser_quickcheck!(DomainLiteral, DomainLiteralParser);
     |                                   ^^^^^^^^^^^^^^^^^^^ help: convert the identifier to snake case: `domain_literal_parser`

warning: function `DContentParser` should have a snake case name
    --> rfc2822/src/roundtrip.rs:1073:30
     |
1073 | parser_quickcheck!(DContent, DContentParser);
     |                              ^^^^^^^^^^^^^^ help: convert the identifier to snake case: `dcontent_parser`

    Finished dev [unoptimized + debuginfo] target(s) in 58.54s
     Running target/debug/deps/buffered_reader-9875d027bc94814c

running 16 tests
test eof::test::basics ... ok
test limitor::test::buffered_reader_limitor_test ... ok
test limitor::test::consummated ... ok
test memory::test::buffered_reader_memory_test ... ok
test dup::test::buffer_test ... ok
test test::buffered_reader_eof_test ... ok
test memory::test::buffer_test ... ok
test test::drop_through ... ok
test test::drop_until ... ok
test test::buffered_reader_read_test ... ok
test dup::test::buffered_reader_memory_test ... ok
test generic::test::buffered_reader_generic_test ... ok
test limitor::test::buffer_test ... ok
test reserve::test::data ... ok
test decompress_deflate::test::buffer_test ... ok
test generic::test::buffer_test ... ok

test result: ok. 16 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out

     Running target/debug/deps/sequoia-5516cc13109cc8ed

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out

     Running target/debug/deps/sequoia_core-d20dc670a3b89935

running 4 tests
test test::insecure ... ok
test test::encrypted ... ok
test test::anonymized ... ok
test test::offline ... ok

test result: ok. 4 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out

     Running target/debug/deps/sequoia_ffi-b146f047a676c927

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out

     Running target/debug/deps/c_tests-7bb97fee952f9be4

running 1 test
In file included from /nix/store/bniand9afisrgrsfi7kr093334iv3ibv-glibc-2.27-dev/include/bits/libc-header-start.h:33:0,
                 from /nix/store/bniand9afisrgrsfi7kr093334iv3ibv-glibc-2.27-dev/include/stdio.h:27,
                 from /build/source/ffi/src/core.rs:14:
/nix/store/bniand9afisrgrsfi7kr093334iv3ibv-glibc-2.27-dev/include/features.h:381:4: warning: #warning _FORTIFY_SOURCE requires compiling with optimization (-O) [-Wcpp]
 #  warning _FORTIFY_SOURCE requires compiling with optimization (-O)
    ^~~~~~~
In file included from /nix/store/bniand9afisrgrsfi7kr093334iv3ibv-glibc-2.27-dev/include/bits/libc-header-start.h:33:0,
                 from /nix/store/bniand9afisrgrsfi7kr093334iv3ibv-glibc-2.27-dev/include/stdio.h:27,
                 from /build/source/ffi/src/core.rs:28:
/nix/store/bniand9afisrgrsfi7kr093334iv3ibv-glibc-2.27-dev/include/features.h:381:4: warning: #warning _FORTIFY_SOURCE requires compiling with optimization (-O) [-Wcpp]
 #  warning _FORTIFY_SOURCE requires compiling with optimization (-O)
    ^~~~~~~
In file included from /nix/store/bniand9afisrgrsfi7kr093334iv3ibv-glibc-2.27-dev/include/bits/libc-header-start.h:33:0,
                 from /nix/store/bniand9afisrgrsfi7kr093334iv3ibv-glibc-2.27-dev/include/stdio.h:27,
                 from /build/source/ffi/src/lib.rs:96:
/nix/store/bniand9afisrgrsfi7kr093334iv3ibv-glibc-2.27-dev/include/features.h:381:4: warning: #warning _FORTIFY_SOURCE requires compiling with optimization (-O) [-Wcpp]
 #  warning _FORTIFY_SOURCE requires compiling with optimization (-O)
    ^~~~~~~
In file included from /nix/store/bniand9afisrgrsfi7kr093334iv3ibv-glibc-2.27-dev/include/bits/libc-header-start.h:33:0,
                 from /nix/store/bniand9afisrgrsfi7kr093334iv3ibv-glibc-2.27-dev/include/stdio.h:27,
                 from /build/source/ffi/src/net.rs:18:
/nix/store/bniand9afisrgrsfi7kr093334iv3ibv-glibc-2.27-dev/include/features.h:381:4: warning: #warning _FORTIFY_SOURCE requires compiling with optimization (-O) [-Wcpp]
 #  warning _FORTIFY_SOURCE requires compiling with optimization (-O)
    ^~~~~~~
test c_doctests ... ok

test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out

     Running target/debug/deps/sequoia_ffi_macros-8d815a38141aa0f8

running 1 test
test ident2c_tests ... ok

test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out

     Running target/debug/deps/sequoia_guide-b559ebf39f884480

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out

     Running target/debug/deps/sequoia_ipc-b0ff8f055fba00e0

running 1 test
test assuan::tests::basics ... ok

test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out

     Running target/debug/deps/gpg_agent-0b250267bb06c121

running 4 tests
test decrypt ... ok
test help ... ok
test sign ... ok
test nop ... ok

test result: ok. 4 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out

     Running target/debug/deps/sequoia_net-7296e3456963c8db

running 5 tests
test wkd::tests::encode_local_part_succed ... ok
test wkd::tests::email_address_from ... ok
test wkd::tests::url_roundtrip ... ok
test wkd::tests::test_parse_body ... ok
test tests::uris ... ok

test result: ok. 5 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out

     Running target/debug/deps/hkp-f15c98a8957b536a

running 2 tests
test get ... ok
test send ... ok

test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out

     Running target/debug/deps/sequoia_openpgp-851092f5c905a6bf

running 245 tests
test armor::test::crc ... ok
test armor::test::dearmor_no_crc ... ok
test armor::test::dearmor_any ... ok
test armor::test::dearmor_with_garbage ... ok
test armor::test::dearmor_wrong_crc ... ok
test armor::test::dearmor_with_header ... ok
test armor::test::drop_writer ... ok
test armor::test::dearmor_wrong_footer ... ok
test armor::test::enarmor ... ok
test armor::test::dearmor_wrong_kind ... ok
test armor::test::enarmor_bytewise ... ok
test autocrypt::test::autocrypt_header_new ... ok
test autocrypt::test::decode_test ... ok
test armor::test::dearmor_bytewise ... ok
test armor::test::dearmor_binary ... ok
test constants::tests::aead_display ... ok
test armor::test::dearmor ... ok
test constants::tests::aead_parse ... ok
test constants::tests::aead_roundtrip ... ok
test constants::tests::comp_display ... ok
test constants::tests::comp_parse ... ok
test constants::tests::curve_roundtrip ... ok
test constants::tests::df_parse ... ok
test constants::tests::comp_roundtrip ... ok
test constants::tests::df_roundtrip ... ok
test constants::tests::hash_parse ... ok
test constants::tests::hash_display ... ok
test constants::tests::df_display ... ok
test constants::tests::hash_roundtrip_str ... ok
test constants::tests::hash_roundtrip ... ok
test constants::tests::pk_parse ... ok
test constants::tests::pk_roundtrip ... ok
test constants::tests::rfr_display ... ok
test constants::tests::rfr_roundtrip ... ok
test constants::tests::rfr_parse ... ok
test constants::tests::pk_display ... ok
test constants::tests::sigtype_roundtrip ... ok
test constants::tests::sigtype_display ... ok
test constants::tests::sym_display ... ok
test conversions::test::be_u64_roundtrip ... ok
test conversions::test::from_hex ... ok
test conversions::test::from_pretty_hex ... ok
test conversions::test::hex_dumper ... ok
test constants::tests::sym_parse ... ok
test constants::tests::sym_roundtrip ... ok
test conversions::test::hex_roundtrip ... ok
test crypto::ecdh::tests::aes_wrapping ... ok
test crypto::ecdh::tests::pkcs5_padding ... ok
test conversions::test::pretty_hex_roundtrip ... ok
test crypto::hash_file_test ... ok
test crypto::keygrip::tests::libgcrypt_basic ... ok
test crypto::aead::tests::roundtrip ... ok
test crypto::keygrip::tests::our_keys ... ok
test armor::test::dearmor_robust ... ok
test crypto::mpis::tests::pk_bits ... ok
test crypto::hash::test::hash_verification ... ok
test autocrypt::test::passcode_gen_test ... ok
test crypto::mpis::tests::ct_roundtrip ... ok
test crypto::s2k::tests::s2k_coded_count_approx ... ok
test crypto::s2k::tests::s2k_coded_count_roundtrip ... ok
test crypto::s2k::tests::s2k_display ... ok
test crypto::mpis::tests::mpi_roundtrip ... ok
test crypto::s2k::tests::s2k_parse ... ok
test armor::test::dearmor_yuge ... ok
test crypto::sexp::tests::roundtrip ... ok
test crypto::sexp::tests::to_signature ... ok
test crypto::mpis::tests::pk_roundtrip ... ok
test crypto::symmetric::tests::encryptor ... ok
test crypto::symmetric::tests::decryptor ... ok
test fingerprint::tests::icao ... ok
test keyid::test::from_hex ... ok
test keyid::test::u64_roundtrip ... ok
test message::tests::basic ... ok
test message::tests::compressed_part ... ok
test message::tests::encrypted_part ... ok
test message::tests::one_pass_sig_part ... ok
test crypto::symmetric::tests::roundtrip ... ok
test message::tests::tags ... ok
test message::tests::signature_part ... ok
test packet::aed::tests::deref ... ok
test packet::body_length_new_format ... ok
test packet::body_length_old_format ... ok
test packet::ctb::ctb ... ok
test message::tests::tokens ... ok
test crypto::mpis::tests::signature_roundtrip ... ok
test crypto::mpis::tests::sk_roundtrip ... ok
test packet::key::tests::fingerprint_test ... ok
test packet::key::tests::import_cv25519 ... ok
test packet::key::tests::import_cv25519_sec ... ok
test packet::key::tests::import_ed25519 ... ok
test packet::key::tests::import_rsa ... ok
test crypto::s2k::tests::s2k_roundtrip ... ok
test packet::key::tests::encrypted_rsa_key ... ok
test packet::key_flags::tests::ordering ... ok
test armor::test::roundtrip ... ok
test packet::literal::tests::roundtrip ... ok
test packet::marker::tests::roundtrip ... ok
test packet::packet_path_iter ... ok
test packet::pkesk::tests::decrypt_ecdh_cv25519 ... ok
test packet::pkesk::tests::decrypt_ecdh_nistp256 ... ok
test packet::pkesk::tests::decrypt_ecdh_nistp384 ... ok
test packet::pkesk::tests::decrypt_ecdh_nistp521 ... ok
test packet::pkesk::tests::decrypt_rsa ... ok
test packet::pkesk::tests::decrypt_with_short_cv25519_secret_key ... ok
test packet::one_pass_sig::tests::roundtrip ... ok
test packet::seip::tests::deref ... ok
test packet::pkesk::tests::roundtrip ... ok
test packet::signature::subpacket::length_roundtrip ... ok
test packet::signature::subpacket::subpacket_test_1 ... ok
test packet::signature::subpacket::subpacket_test_2 ... ok
test packet::signature::subpacket::tests::parse ... ok
test packet::signature::subpacket::tests::roundtrip ... ok
test packet::signature::test::normalize ... ok
test packet::signature::test::sign_message ... ok
test packet::signature::subpacket::accessors ... ok
test packet::signature::test::sign_with_short_ed25519_secret_key ... ok
test packet::signature::test::signature_level ... ok
test packet::signature::test::sign_verify ... ok
test packet::signature::test::verify_gpg_3rd_party_cert ... ok
test packet::signature::test::verify_message ... ok
test packet::signature::test::signature_verification_test ... ok
test packet::skesk::test::sample_skesk5_packet ... ok
test packet::tag::tests::display ... ok
test packet::tag::tests::parse ... ok
test packet::tag::tests::roundtrip ... ok
test packet::tag::tests::unknown_private ... ok
test autocrypt::test::autocrypt_setup_message ... ok
test packet::user_attribute::tests::image ... ok
test packet::skesk::test::roundtrip ... ok
test packet::userid::tests::address_normalized ... ok
test packet::userid::tests::from_address ... ok
test packet::userid::tests::name_addr ... ok
test packet::trust::tests::roundtrip ... ok
test crypto::s2k::tests::s2k_parser_test ... ok
test packet::user_attribute::tests::roundtrip ... ok
test packet_pile::test::consume_content_1 ... ok
test packet_pile::test::deserialize_test_1 ... ok
test packet_pile::test::deserialize_test_2 ... ok
test packet_pile::test::deserialize_test_3 ... ok
test packet_pile::test::path_ref ... ok
test packet_pile::test::replace ... ok
test packet::userid::tests::roundtrip ... ok
test parse::compressed_data_parser_test ... ok
test parse::hashed_reader::test::hash_test_1 ... ok
test parse::literal_parser_test ... ok
test parse::mpis::mpis_parse_test ... ok
test parse::one_pass_sig_parser_test ... ok
test packet_pile::test::torture ... ok
test parse::one_pass_sig_test ... ok
test parse::packet_parser_reader_interface ... ok
test parse::packet_parser_builder::tests::armor ... ok
test parse::packet_pile_parser::message_parser_test ... ok
test parse::sexp::tests::basics ... ok
test parse::packet_pile_parser::message_parser_reader_interface ... ok
test parse::signature_parser_test ... ok
test parse::sexp::tests::signatures ... ok
test packet_pile::test::compression_quine_test_1 ... ok
test parse::stream::test::verifier ... ok
test parse::stream::test::verifier_levels ... ok
test parse::skesk_parser_test ... ok
test packet::key::tests::eq ... ok
test parse::test::corrupted_tpk ... ok
test parse::test::junk_prefix ... ok
test parse::test::keyring_validator ... ok
test packet_pile::test::compression_quine_test_2 ... ok
test parse::test::message_validator_opaque_content ... ok
test packet::key::tests::encryption_roundtrip ... ok
test parse::test::tpk_validator ... ok
test parse::test::truncated_packet ... ok
test serialize::log2_test ... ok
test serialize::partial_body::test::basic ... ok
test serialize::partial_body::test::no_avoidable_chunking ... ok
test serialize::partial_body::test::write_exceeding_buffer_threshold ... ok
test serialize::sexp::tests::sexp ... ok
test serialize::sexp::tests::string ... ok
test serialize::stream::test::arbitrary ... ok
test packet::key::tests::roundtrip ... ok
test serialize::stream::test::signature ... ok
test serialize::stream::test::stream_0 ... ok
test serialize::stream::test::stream_1 ... ok
test serialize::stream::test::encryptor ... ok
test serialize::test::body_length_edge_cases ... ok
test serialize::test::serialize_test_1 ... ok
test serialize::test::serialize_test_1_unknown ... ok
test serialize::test::serialize_test_2 ... ok
test serialize::test::serialize_test_3 ... ok
test serialize::test_generic_serialize_into ... ok
test serialize::tpk::test::reduce_to_tpk_serialize ... ok
test serialize::tpk::test::roundtrip_tpk ... ok
test serialize::tpk::test::roundtrip_tsk ... ok
test serialize::writer::test::generic_writer ... ok
test serialize::writer::test::stack ... ok
test tpk::armor::tests::is_printable_fail ... ok
test tpk::armor::tests::is_printable_succeed ... ok
test tpk::armor::tests::serialize_length_succeed ... ok
test tpk::armor::tests::serialize_succeed ... ok
test tpk::builder::tests::all_ciphersuites ... ok
test tpk::builder::tests::all_opts ... ok
test tpk::builder::tests::always_certify ... ok
test serialize::stream::test::stream_big ... ok
test tpk::builder::tests::autocrypt_v1_1 ... ok
test tpk::builder::tests::builder_roundtrip ... ok
test tpk::builder::tests::defaults ... ok
test tpk::builder::tests::direct_key_sig ... ok
test tpk::builder::tests::encrypted_secrets ... ok
test tpk::builder::tests::gen_wired_subkeys ... ok
test tpk::builder::tests::generate_revocation_certificate ... ok
test parse::stream::test::detached_verifier ... ok
test tpk::test::basics ... ok
test tpk::test::broken ... ok
test tpk::test::direct_key_sig ... ok
test tpk::test::export_only_exports_public_key ... ok
test tpk::test::is_tsk ... ok
test tpk::test::issue_120 ... ok
test tpk::test::key_iter_test ... ok
test tpk::builder::tests::autocrypt_v1 ... ok
test tpk::test::merge ... ok
test tpk::test::merge_packets ... ok
test tpk::test::merge_with_incomplete_update ... ok
test tpk::test::missing_uids ... ok
test tpk::test::only_a_public_key ... ok
test tpk::test::out_of_order_self_sigs_test ... ok
test tpk::test::packet_pile_roundtrip ... ok
test tpk::test::public_private_merge ... ok
test tpk::test::revoke ... ok
test tpk::builder::tests::setter ... ok
test tpk::test::revoked ... ok
test tpk::test::revoked_time ... ok
test tpk::test::select_invalid_and_right_flags ... ok
test tpk::test::select_no_keys ... ok
test tpk::test::select_primary ... ok
test tpk::test::select_valid_and_right_flags ... ok
test tpk::test::select_valid_and_wrong_flags ... ok
test tpk::test::set_expiry ... ok
test tpk::test::signature_order ... ok
test tpk::test::tokens ... ok
test tpk::test::unrevoked ... ok
test tpk::test::v3_packets ... ok
test tpk::test::keyring_with_v3_public_keys ... ok
test packet::key::tests::secret_encryption_roundtrip ... ok
test tpk::test::revoke_uid ... ok
test parse::test::message_validator ... ok
test parse::test::path ... ok
test parse::stream::test::verify_long_message ... ok
test parse::test::decrypt_test ... ok

test result: ok. 245 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out

     Running target/debug/deps/for_each_artifact-c5568c2cfa8725dc

running 3 tests
test for_each_artifact::message_roundtrip ... ok
test for_each_artifact::tpk_roundtrip ... ok
test for_each_artifact::packet_roundtrip ... ok

test result: ok. 3 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out

     Running target/debug/deps/sequoia_openpgp_ffi-c83c40093118f598

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out

     Running target/debug/deps/c_tests-f7b98d98d9499f99

running 1 test
In file included from /nix/store/bniand9afisrgrsfi7kr093334iv3ibv-glibc-2.27-dev/include/bits/libc-header-start.h:33:0,
                 from /nix/store/bniand9afisrgrsfi7kr093334iv3ibv-glibc-2.27-dev/include/stdio.h:27,
                 from /build/source/openpgp-ffi/src/fingerprint.rs:55:
/nix/store/bniand9afisrgrsfi7kr093334iv3ibv-glibc-2.27-dev/include/features.h:381:4: warning: #warning _FORTIFY_SOURCE requires compiling with optimization (-O) [-Wcpp]
 #  warning _FORTIFY_SOURCE requires compiling with optimization (-O)
    ^~~~~~~
In file included from /nix/store/bniand9afisrgrsfi7kr093334iv3ibv-glibc-2.27-dev/include/bits/libc-header-start.h:33:0,
                 from /nix/store/bniand9afisrgrsfi7kr093334iv3ibv-glibc-2.27-dev/include/stdio.h:27,
                 from /build/source/openpgp-ffi/src/keyid.rs:43:
/nix/store/bniand9afisrgrsfi7kr093334iv3ibv-glibc-2.27-dev/include/features.h:381:4: warning: #warning _FORTIFY_SOURCE requires compiling with optimization (-O) [-Wcpp]
 #  warning _FORTIFY_SOURCE requires compiling with optimization (-O)
    ^~~~~~~
In file included from /nix/store/bniand9afisrgrsfi7kr093334iv3ibv-glibc-2.27-dev/include/bits/libc-header-start.h:33:0,
                 from /nix/store/bniand9afisrgrsfi7kr093334iv3ibv-glibc-2.27-dev/include/stdio.h:27,
                 from /build/source/openpgp-ffi/src/keyid.rs:68:
/nix/store/bniand9afisrgrsfi7kr093334iv3ibv-glibc-2.27-dev/include/features.h:381:4: warning: #warning _FORTIFY_SOURCE requires compiling with optimization (-O) [-Wcpp]
 #  warning _FORTIFY_SOURCE requires compiling with optimization (-O)
    ^~~~~~~
In file included from /nix/store/bniand9afisrgrsfi7kr093334iv3ibv-glibc-2.27-dev/include/bits/libc-header-start.h:33:0,
                 from /nix/store/bniand9afisrgrsfi7kr093334iv3ibv-glibc-2.27-dev/include/stdio.h:27,
                 from /build/source/openpgp-ffi/src/lib.rs:84:
/nix/store/bniand9afisrgrsfi7kr093334iv3ibv-glibc-2.27-dev/include/features.h:381:4: warning: #warning _FORTIFY_SOURCE requires compiling with optimization (-O) [-Wcpp]
 #  warning _FORTIFY_SOURCE requires compiling with optimization (-O)
    ^~~~~~~
In file included from /nix/store/bniand9afisrgrsfi7kr093334iv3ibv-glibc-2.27-dev/include/bits/libc-header-start.h:33:0,
                 from /nix/store/bniand9afisrgrsfi7kr093334iv3ibv-glibc-2.27-dev/include/stdio.h:27,
                 from /build/source/openpgp-ffi/src/lib.rs:181:
/nix/store/bniand9afisrgrsfi7kr093334iv3ibv-glibc-2.27-dev/include/features.h:381:4: warning: #warning _FORTIFY_SOURCE requires compiling with optimization (-O) [-Wcpp]
 #  warning _FORTIFY_SOURCE requires compiling with optimization (-O)
    ^~~~~~~
In file included from /nix/store/bniand9afisrgrsfi7kr093334iv3ibv-glibc-2.27-dev/include/bits/libc-header-start.h:33:0,
                 from /nix/store/bniand9afisrgrsfi7kr093334iv3ibv-glibc-2.27-dev/include/stdio.h:27,
                 from /build/source/openpgp-ffi/src/lib.rs:288:
/nix/store/bniand9afisrgrsfi7kr093334iv3ibv-glibc-2.27-dev/include/features.h:381:4: warning: #warning _FORTIFY_SOURCE requires compiling with optimization (-O) [-Wcpp]
 #  warning _FORTIFY_SOURCE requires compiling with optimization (-O)
    ^~~~~~~
In file included from /nix/store/bniand9afisrgrsfi7kr093334iv3ibv-glibc-2.27-dev/include/bits/libc-header-start.h:33:0,
                 from /nix/store/bniand9afisrgrsfi7kr093334iv3ibv-glibc-2.27-dev/include/stdio.h:27,
                 from /build/source/openpgp-ffi/src/tpk.rs:206:
/nix/store/bniand9afisrgrsfi7kr093334iv3ibv-glibc-2.27-dev/include/features.h:381:4: warning: #warning _FORTIFY_SOURCE requires compiling with optimization (-O) [-Wcpp]
 #  warning _FORTIFY_SOURCE requires compiling with optimization (-O)
    ^~~~~~~
In file included from /nix/store/bniand9afisrgrsfi7kr093334iv3ibv-glibc-2.27-dev/include/bits/libc-header-start.h:33:0,
                 from /nix/store/bniand9afisrgrsfi7kr093334iv3ibv-glibc-2.27-dev/include/stdio.h:27,
                 from /build/source/openpgp-ffi/src/tpk.rs:273:
/nix/store/bniand9afisrgrsfi7kr093334iv3ibv-glibc-2.27-dev/include/features.h:381:4: warning: #warning _FORTIFY_SOURCE requires compiling with optimization (-O) [-Wcpp]
 #  warning _FORTIFY_SOURCE requires compiling with optimization (-O)
    ^~~~~~~
In file included from /nix/store/bniand9afisrgrsfi7kr093334iv3ibv-glibc-2.27-dev/include/bits/libc-header-start.h:33:0,
                 from /nix/store/bniand9afisrgrsfi7kr093334iv3ibv-glibc-2.27-dev/include/stdio.h:27,
                 from /build/source/openpgp-ffi/src/tpk.rs:766:
/nix/store/bniand9afisrgrsfi7kr093334iv3ibv-glibc-2.27-dev/include/features.h:381:4: warning: #warning _FORTIFY_SOURCE requires compiling with optimization (-O) [-Wcpp]
 #  warning _FORTIFY_SOURCE requires compiling with optimization (-O)
    ^~~~~~~
In file included from /nix/store/bniand9afisrgrsfi7kr093334iv3ibv-glibc-2.27-dev/include/bits/libc-header-start.h:33:0,
                 from /nix/store/bniand9afisrgrsfi7kr093334iv3ibv-glibc-2.27-dev/include/stdio.h:27,
                 from /build/source/openpgp-ffi/src/armor.rs:75:
/nix/store/bniand9afisrgrsfi7kr093334iv3ibv-glibc-2.27-dev/include/features.h:381:4: warning: #warning _FORTIFY_SOURCE requires compiling with optimization (-O) [-Wcpp]
 #  warning _FORTIFY_SOURCE requires compiling with optimization (-O)
    ^~~~~~~
In file included from /nix/store/bniand9afisrgrsfi7kr093334iv3ibv-glibc-2.27-dev/include/bits/libc-header-start.h:33:0,
                 from /nix/store/bniand9afisrgrsfi7kr093334iv3ibv-glibc-2.27-dev/include/stdio.h:27,
                 from /build/source/openpgp-ffi/src/armor.rs:156:
/nix/store/bniand9afisrgrsfi7kr093334iv3ibv-glibc-2.27-dev/include/features.h:381:4: warning: #warning _FORTIFY_SOURCE requires compiling with optimization (-O) [-Wcpp]
 #  warning _FORTIFY_SOURCE requires compiling with optimization (-O)
    ^~~~~~~
In file included from /nix/store/bniand9afisrgrsfi7kr093334iv3ibv-glibc-2.27-dev/include/bits/libc-header-start.h:33:0,
                 from /nix/store/bniand9afisrgrsfi7kr093334iv3ibv-glibc-2.27-dev/include/stdio.h:27,
                 from /build/source/openpgp-ffi/src/armor.rs:310:
/nix/store/bniand9afisrgrsfi7kr093334iv3ibv-glibc-2.27-dev/include/features.h:381:4: warning: #warning _FORTIFY_SOURCE requires compiling with optimization (-O) [-Wcpp]
 #  warning _FORTIFY_SOURCE requires compiling with optimization (-O)
    ^~~~~~~
In file included from /nix/store/bniand9afisrgrsfi7kr093334iv3ibv-glibc-2.27-dev/include/bits/libc-header-start.h:33:0,
                 from /nix/store/bniand9afisrgrsfi7kr093334iv3ibv-glibc-2.27-dev/include/stdio.h:27,
                 from /build/source/openpgp-ffi/src/packet/mod.rs:82:
/nix/store/bniand9afisrgrsfi7kr093334iv3ibv-glibc-2.27-dev/include/features.h:381:4: warning: #warning _FORTIFY_SOURCE requires compiling with optimization (-O) [-Wcpp]
 #  warning _FORTIFY_SOURCE requires compiling with optimization (-O)
    ^~~~~~~
In file included from /nix/store/bniand9afisrgrsfi7kr093334iv3ibv-glibc-2.27-dev/include/bits/libc-header-start.h:33:0,
                 from /nix/store/bniand9afisrgrsfi7kr093334iv3ibv-glibc-2.27-dev/include/stdio.h:27,
                 from /build/source/openpgp-ffi/src/parse/stream.rs:409:
/nix/store/bniand9afisrgrsfi7kr093334iv3ibv-glibc-2.27-dev/include/features.h:381:4: warning: #warning _FORTIFY_SOURCE requires compiling with optimization (-O) [-Wcpp]
 #  warning _FORTIFY_SOURCE requires compiling with optimization (-O)
    ^~~~~~~
In file included from /nix/store/bniand9afisrgrsfi7kr093334iv3ibv-glibc-2.27-dev/include/bits/libc-header-start.h:33:0,
                 from /nix/store/bniand9afisrgrsfi7kr093334iv3ibv-glibc-2.27-dev/include/stdio.h:27,
                 from /build/source/openpgp-ffi/src/parse/stream.rs:531:
/nix/store/bniand9afisrgrsfi7kr093334iv3ibv-glibc-2.27-dev/include/features.h:381:4: warning: #warning _FORTIFY_SOURCE requires compiling with optimization (-O) [-Wcpp]
 #  warning _FORTIFY_SOURCE requires compiling with optimization (-O)
    ^~~~~~~
In file included from /nix/store/bniand9afisrgrsfi7kr093334iv3ibv-glibc-2.27-dev/include/bits/libc-header-start.h:33:0,
                 from /nix/store/bniand9afisrgrsfi7kr093334iv3ibv-glibc-2.27-dev/include/stdio.h:27,
                 from /build/source/openpgp-ffi/src/parse/stream.rs:766:
/nix/store/bniand9afisrgrsfi7kr093334iv3ibv-glibc-2.27-dev/include/features.h:381:4: warning: #warning _FORTIFY_SOURCE requires compiling with optimization (-O) [-Wcpp]
 #  warning _FORTIFY_SOURCE requires compiling with optimization (-O)
    ^~~~~~~
test c_doctests ... ok

test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out

     Running target/debug/deps/sequoia_rfc2822-c939022562187b51

running 35 tests
test roundtrip::DContentParser ... ok
test roundtrip::DotAtomParser ... ok
test roundtrip::LocalPartParser ... ok
test roundtrip::DomainParser ... ok
test roundtrip::QContentParser ... ok
test roundtrip::atom_roundtrip ... ok
test roundtrip::DomainLiteralParser ... ok
test roundtrip::WordParser ... ok
test roundtrip::comment_roundtrip ... ok
test roundtrip::ctext_roundtrip ... ok
test roundtrip::text_roundtrip ... ok
test tests::addr_spec_api ... ok
test tests::addr_spec_or_other_api ... ok
test tests::angle_addr_parser ... ok
test tests::atom_parser ... ok
test tests::cfws_parser ... ok
test roundtrip::fws_roundtrip ... ok
test tests::comment_parser ... ok
test tests::domain_literal_parser ... ok
test tests::dot_atom_parser ... ok
test tests::display_name_parser ... ok
test tests::name_addr_api ... ok
test tests::name_addr_parser ... ok
test tests::name_escape_test ... ok
test tests::or_other_parsers ... ok
test tests::name_addr_or_other_api ... ok
test tests::quoted_string_parser ... ok
test tests::word_parser ... ok
test tests::phrase_parser ... ok
test roundtrip::cfws_roundtrip ... ok
test roundtrip::AddrSpecParser ... ok
test roundtrip::DisplayNameParser ... ok
test roundtrip::PhraseParser ... ok
test roundtrip::AngleAddrParser ... ok
test roundtrip::NameAddrParser ... ok

test result: ok. 35 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out

     Running target/debug/deps/sqv-2acc9bcdfb01ef40

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out

     Running target/debug/deps/bad_subkey-381395e77cdc1d01

running 1 test
test integration::bad_subkey ... test integration::bad_subkey has been running for over 60 seconds
test integration::bad_subkey ... ok

test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out

     Running target/debug/deps/duplicate_signatures-523a6d3ce9f3eee9

running 1 test
test ignore_duplicates ... ok

test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out

     Running target/debug/deps/multiple_signatures-0cfbd5c3cb3f31dc

running 1 test
test ignore_multiple_signatures ... ok

test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out

     Running target/debug/deps/not_before_after-03dace65ed37cf59

running 4 tests
test integration::before ... ok
test integration::unconstrained ... ok
test integration::after ... ok
test integration::in_interval ... ok

test result: ok. 4 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out

     Running target/debug/deps/revoked_key-f27a727b50d0ee05

running 3 tests
test integration::valid_at_signature_ctime ... ok
test integration::revoked_at_signature_ctime ... ok
test integration::valid_now ... ok

test result: ok. 3 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out

     Running target/debug/deps/wrong_key_flags-15c99074e5aab8b2

running 1 test
test integration::not_signing_capable_subkey ... ok

test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out

     Running target/debug/deps/sequoia_store-b973c7b295d4c774

running 13 tests
test test::add_then_import_wrong_key ... ok
test test::delete_store_twice ... ok
test test::delete_store_then_use ... ok
test test::add_then_add_different_key ... ok
test test::delete_binding_twice ... ok
test test::delete_binding_then_use ... ok
test test::import_key ... ok
test test::binding_iterator ... ok
test test::key_not_found ... ok
test test::store_network_policy_mismatch ... ok
test test::key_iterator ... ok
test test::store_iterator ... ok
test test::stats ... ok

test result: ok. 13 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out

     Running target/debug/deps/sequoia_public_key_store-3712369b98ab12d5

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out

     Running target/debug/deps/ipc_policy-d01d1e9e1925ef34

running 3 tests
test ipc_policy_external ... ok
test ipc_policy_internal ... ok
test ipc_policy_robust ... ok

test result: ok. 3 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out

     Running target/debug/deps/sq-f3b3601080c57c93

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out

     Running target/debug/deps/sq_sign-633030abd2ff57e3

running 8 tests
test sq_sign ... test sq_sign has been running for over 60 seconds
test sq_sign_append ... test sq_sign_append has been running for over 60 seconds
test sq_sign_append_a_notarization ... test sq_sign_append_a_notarization has been running for over 60 seconds
test sq_sign_append_on_compress_then_sign ... test sq_sign_append_on_compress_then_sign has been running for over 60 seconds
test sq_sign_detached ... test sq_sign_detached has been running for over 60 seconds
test sq_sign_detached_append ... test sq_sign_detached_append has been running for over 60 seconds
test sq_sign_notarize ... test sq_sign_notarize has been running for over 60 seconds
test sq_sign_notarize_a_notarization ... test sq_sign_notarize_a_notarization has been running for over 60 seconds
test sq_sign_append_on_compress_then_sign ... ok
test sq_sign ... ok
test sq_sign_notarize_a_notarization ... ok
test sq_sign_append_a_notarization ... ok
test sq_sign_notarize ... ok
test sq_sign_append ... ok
test sq_sign_detached ... ok
test sq_sign_detached_append ... ok

test result: ok. 8 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out

   Doc-tests sequoia-rfc2822

running 2 tests
test src/lib.rs -  (line 27) ... ok
test src/lib.rs -  (line 48) ... ok

test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out

   Doc-tests sequoia-core

running 5 tests
test src/lib.rs - dirs (line 12) ... ok
test src/lib.rs - Context (line 38) ... ok
test src/lib.rs - Config (line 167) ... ok
test src/lib.rs - Context (line 50) ... ok
test src/lib.rs - Config (line 152) ... ok

test result: ok. 5 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out

   Doc-tests sequoia-openpgp-ffi

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out

   Doc-tests sequoia_store

running 15 tests
test src/lib.rs - Binding::stats (line 609) ... ok
test src/lib.rs - Binding::delete (line 772) ... ok
test src/lib.rs - Pool::lookup (line 163) ... ok
test src/lib.rs - Pool::import (line 127) ... ok
test src/lib.rs -  (line 21) ... ok
test src/lib.rs - Key::import (line 878) ... ok
test src/lib.rs - Binding::import (line 672) ... ok
test src/lib.rs - Binding::rotate (line 727) ... ok
test src/lib.rs - Store::add (line 370) ... ok
test src/lib.rs - Pool::lookup_by_keyid (line 198) ... ok
test src/lib.rs - Pool::lookup_by_subkeyid (line 234) ... ok
test src/lib.rs - Store::lookup (line 436) ... ok
test src/lib.rs - Store::import (line 401) ... ok
test src/lib.rs - Store::delete (line 517) ... ok
test src/lib.rs - Store::lookup_by_subkeyid (line 472) ... ok

test result: ok. 15 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out

   Doc-tests sequoia-openpgp

running 41 tests
test src/armor.rs - armor (line 19) ... ok
test src/conversions.rs - conversions::hex::Dumper (line 98) ... ok
test src/fingerprint.rs - fingerprint::Fingerprint::from_hex (line 39) ... ok
test src/armor.rs - armor::Writer<W>::new (line 167) ... ok
test src/packet/signature/subpacket.rs - packet::signature::subpacket (line 33) ... ok
test src/lib.rs - TPK (line 408) ... ok
test src/armor.rs - armor::Reader::new (line 462) ... ok
test src/armor.rs - armor::Reader::new (line 436) ... ok
test src/packet/userid.rs - packet::userid::UserID::from_address (line 154) ... ok
test src/parse/mod.rs - parse (line 46) ... ok
test src/packet_pile.rs - packet_pile::PacketParserBuilder::into_packet_pile (line 390) ... ok
test src/packet_pile.rs - packet_pile::PacketPile::replace (line 173) ... ok
test src/packet/userid.rs - packet::userid::UserID::from_unchecked_address (line 227) ... ok
test src/parse/map.rs - parse::map::Map::iter (line 58) ... ok
test src/parse/packet_parser_builder.rs - parse::packet_parser_builder::PacketParserBuilder::finalize (line 132) ... ok
test src/parse/packet_pile_parser.rs - parse::packet_pile_parser::PacketPileParser (line 52) ... ok
test src/parse/parse.rs - parse::PacketParser (line 2138) ... ok
test src/parse/parse.rs - parse::PacketParser::buffer_unread_content (line 3064) ... ok
test src/parse/stream.rs - parse::stream::Decryptor (line 1032) ... ok
test src/parse/stream.rs - parse::stream::Verifier (line 74) ... ok
test src/serialize/stream.rs - serialize::stream::ArbitraryWriter (line 102) ... ok
test src/parse/stream.rs - parse::stream::DetachedVerifier (line 896) ... ok
test src/serialize/stream.rs - serialize::stream::Compressor (line 696) ... ok
test src/serialize/stream.rs - serialize::stream::LiteralWriter (line 531) ... ok
test src/serialize/stream.rs - serialize::stream::Signer::detached (line 298) ... ok
test src/serialize/stream.rs - serialize::stream::Encryptor::new (line 853) ... ok
test src/serialize/tpk.rs - serialize::tpk::TSK (line 197) ... ok
test src/serialize/tpk.rs - serialize::tpk::TSK::set_filter (line 230) ... ok
test src/serialize/stream.rs - serialize::stream::Signer::new (line 212) ... ok
test src/tpk/bindings.rs - tpk::bindings::Key::bind (line 26) ... ok
test src/tpk/bindings.rs - tpk::bindings::Key::revoke (line 82) ... ok
test src/tpk/bindings.rs - tpk::bindings::UserAttribute::bind (line 342) ... ok
test src/tpk/bindings.rs - tpk::bindings::UserAttribute::certify (line 407) ... ok
test src/tpk/bindings.rs - tpk::bindings::UserAttribute::revoke (line 480) ... ok
test src/tpk/bindings.rs - tpk::bindings::UserID::bind (line 148) ... ok
test src/tpk/bindings.rs - tpk::bindings::UserID::revoke (line 276) ... ok
test src/tpk/bindings.rs - tpk::bindings::UserID::certify (line 208) ... ok
test src/tpk/mod.rs - tpk::TPK::revoke (line 1741) ... ok
test src/tpk/mod.rs - tpk::TPKParser (line 1129) ... ok
test src/tpk/mod.rs - tpk::TPK::revoke_in_place (line 1795) ... ok
test src/tpk/mod.rs - tpk::TPKParser::unvalidated_tpk_filter (line 1246) ... ok

test result: ok. 41 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out

   Doc-tests sequoia-ipc

running 1 test
test src/lib.rs - Server::serve (line 344) ... ok

test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out

   Doc-tests sequoia-net

running 2 tests
test src/lib.rs -  (line 16) ... ok
test src/wkd.rs - wkd::get (line 202) ... ok

test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out

   Doc-tests sequoia-guide

running 13 tests
test /build/source/target/debug/build/sequoia-guide-516a6876d32a4f89/out/src/chapter_00.rs - chapter_00 (line 49) ... ok
test /build/source/target/debug/build/sequoia-guide-516a6876d32a4f89/out/src/chapter_01.rs - chapter_01 (line 11) ... ok
test /build/source/target/debug/build/sequoia-guide-516a6876d32a4f89/out/src/chapter_01.rs - chapter_01 (line 445) ... ok
test /build/source/target/debug/build/sequoia-guide-516a6876d32a4f89/out/src/chapter_01.rs - chapter_01 (line 293) ... ok
test /build/source/target/debug/build/sequoia-guide-516a6876d32a4f89/out/src/chapter_01.rs - chapter_01 (line 152) ... ok
test /build/source/target/debug/build/sequoia-guide-516a6876d32a4f89/out/src/chapter_02.rs - chapter_02 (line 279) ... ok
test /build/source/target/debug/build/sequoia-guide-516a6876d32a4f89/out/src/chapter_02.rs - chapter_02 (line 145) ... ok
test /build/source/target/debug/build/sequoia-guide-516a6876d32a4f89/out/src/chapter_02.rs - chapter_02 (line 11) ... ok
test /build/source/target/debug/build/sequoia-guide-516a6876d32a4f89/out/src/chapter_02.rs - chapter_02 (line 427) ... ok
test /build/source/target/debug/build/sequoia-guide-516a6876d32a4f89/out/src/chapter_03.rs - chapter_03 (line 108) ... ok
test /build/source/target/debug/build/sequoia-guide-516a6876d32a4f89/out/src/chapter_03.rs - chapter_03 (line 18) ... ok
test /build/source/target/debug/build/sequoia-guide-516a6876d32a4f89/out/src/chapter_03.rs - chapter_03 (line 73) ... ok
test /build/source/target/debug/build/sequoia-guide-516a6876d32a4f89/out/src/chapter_03.rs - chapter_03 (line 184) ... ok

test result: ok. 13 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out

   Doc-tests sequoia-ffi-macros

running 2 tests
test src/lib.rs - ffi_catch_abort (line 113) ... ignored
test src/lib.rs - ffi_wrapper_type (line 182) ... ignored

test result: ok. 0 passed; 0 failed; 2 ignored; 0 measured; 0 filtered out

   Doc-tests sequoia

running 1 test
test src/lib.rs -  (line 8) ... ok

test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out

   Doc-tests buffered-reader

running 9 tests
test src/lib.rs - BufferedReader::buffer (line 285) ... ok
test src/lib.rs - BufferedReader::data (line 331) ... ok
test src/lib.rs - BufferedReader::data_hard (line 358) ... ok
test src/lib.rs - BufferedReader::data_consume (line 504) ... ok
test src/lib.rs - BufferedReader::consume (line 469) ... ok
test src/lib.rs -  (line 107) ... ok
test src/lib.rs -  (line 176) ... ok
test src/lib.rs - BufferedReader::read_to (line 609) ... ok
test src/lib.rs - BufferedReader::data_eof (line 391) ... ok

test result: ok. 9 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out

make -Copenpgp-ffi test
make[1]: Entering directory '/build/source/openpgp-ffi'
cd .. ; cargo build -p sequoia-openpgp-ffi
    Finished dev [unoptimized + debuginfo] target(s) in 0.08s
nm -g --defined-only \
	/build/source/target/debug/libsequoia_openpgp_ffi.so \
	| cut -d' ' -f3 | sed s/^_// | sort -u | grep pgp_ \
	| while read SYM ; \
		do grep -R -q "$SYM" include || echo $SYM ; \
	done | tee /build/source/target/debug/.check-headers ; \
! test -s /build/source/target/debug/.check-headers
make[1]: Leaving directory '/build/source/openpgp-ffi'
make -Cffi test
make[1]: Entering directory '/build/source/ffi'
make -Clang/python test
make[2]: Entering directory '/build/source/ffi/lang/python'
LDFLAGS=-L/build/source/target/debug LD_LIBRARY_PATH=/build/source/target/debug \
	python3 setup.py test
running pytest
running egg_info
creating sequoia.egg-info
writing sequoia.egg-info/PKG-INFO
writing dependency_links to sequoia.egg-info/dependency_links.txt
writing requirements to sequoia.egg-info/requires.txt
writing top-level names to sequoia.egg-info/top_level.txt
writing manifest file 'sequoia.egg-info/SOURCES.txt'
reading manifest file 'sequoia.egg-info/SOURCES.txt'
writing manifest file 'sequoia.egg-info/SOURCES.txt'
running build_ext
generating cffi module 'build/temp.linux-x86_64-3.7/_sequoia.c'
already up-to-date
copying build/lib.linux-x86_64-3.7/_sequoia.abi3.so -> 
============================= test session starts ==============================
platform linux -- Python 3.7.4, pytest-4.6.3, py-1.7.0, pluggy-0.12.0
rootdir: /build/source/ffi/lang/python
collected 33 items

tests/test_armor.py ......                                               [ 18%]
tests/test_fingerprint.py .......                                        [ 39%]
tests/test_keyid.py .......                                              [ 60%]
tests/test_packet_parser.py .                                            [ 63%]
tests/test_store.py ....                                                 [ 75%]
tests/test_tpk.py ........                                               [100%]

========================== 33 passed in 1.36 seconds ===========================
/nix/store/f6nhx4jpndbqd76nqlr0bq2xq37kaz3r-python3.7-cffi-1.12.3/lib/python3.7/site-packages/cffi/cparser.py:150: UserWarning: String literal found in cdef() or type source. String literals are ignored here, but you should remove them anyway because some character sequences confuse pre-parsing.
  warnings.warn("String literal found in cdef() or type source. "
make[2]: Leaving directory '/build/source/ffi/lang/python'
make[1]: Leaving directory '/build/source/ffi'
make examples
make[1]: Entering directory '/build/source'
CARGO_TARGET_DIR=/build/source/target \
    cargo build  --examples
    Finished dev [unoptimized + debuginfo] target(s) in 0.08s
make -Copenpgp-ffi examples
make[2]: Entering directory '/build/source/openpgp-ffi'
make -Cexamples
make[3]: Entering directory '/build/source/openpgp-ffi/examples'
mkdir -p /build/source/target/debug/c-examples/openpgp-ffi
gcc -I../include -g -L/build/source/target/debug -lsequoia_openpgp_ffi -o "/build/source/target/debug/c-examples/openpgp-ffi/example" "example.c"
mkdir -p /build/source/target/debug/c-examples/openpgp-ffi
gcc -I../include -g -L/build/source/target/debug -lsequoia_openpgp_ffi -o "/build/source/target/debug/c-examples/openpgp-ffi/reader" "reader.c"
mkdir -p /build/source/target/debug/c-examples/openpgp-ffi
gcc -I../include -g -L/build/source/target/debug -lsequoia_openpgp_ffi -o "/build/source/target/debug/c-examples/openpgp-ffi/parser" "parser.c"
mkdir -p /build/source/target/debug/c-examples/openpgp-ffi
gcc -I../include -g -L/build/source/target/debug -lsequoia_openpgp_ffi -o "/build/source/target/debug/c-examples/openpgp-ffi/encrypt-for" "encrypt-for.c"
mkdir -p /build/source/target/debug/c-examples/openpgp-ffi
gcc -I../include -g -L/build/source/target/debug -lsequoia_openpgp_ffi -o "/build/source/target/debug/c-examples/openpgp-ffi/armor" "armor.c"
mkdir -p /build/source/target/debug/c-examples/openpgp-ffi
gcc -I../include -g -L/build/source/target/debug -lsequoia_openpgp_ffi -o "/build/source/target/debug/c-examples/openpgp-ffi/decrypt-with" "decrypt-with.c"
decrypt-with.c: In function 'main':
decrypt-with.c:218:5: warning: ignoring return value of 'write', declared with attribute warn_unused_result [-Wunused-result]
     write (STDOUT_FILENO, buf, nread);
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
mkdir -p /build/source/target/debug/c-examples/openpgp-ffi
gcc -I../include -g -L/build/source/target/debug -lsequoia_openpgp_ffi -o "/build/source/target/debug/c-examples/openpgp-ffi/generate-key" "generate-key.c"
mkdir -p /build/source/target/debug/c-examples/openpgp-ffi
gcc -I../include -g -L/build/source/target/debug -lsequoia_openpgp_ffi -o "/build/source/target/debug/c-examples/openpgp-ffi/type-safety-demo" "type-safety-demo.c"
mkdir -p /build/source/target/debug/c-examples/openpgp-ffi
gcc -I../include -g -L/build/source/target/debug -lsequoia_openpgp_ffi -o "/build/source/target/debug/c-examples/openpgp-ffi/use-after-free-demo" "use-after-free-demo.c"
mkdir -p /build/source/target/debug/c-examples/openpgp-ffi
gcc -I../include -g -L/build/source/target/debug -lsequoia_openpgp_ffi -o "/build/source/target/debug/c-examples/openpgp-ffi/immutable-reference-demo" "immutable-reference-demo.c"
make[3]: Leaving directory '/build/source/openpgp-ffi/examples'
make[2]: Leaving directory '/build/source/openpgp-ffi'
make -Cffi examples
make[2]: Entering directory '/build/source/ffi'
make -Cexamples
make[3]: Entering directory '/build/source/ffi/examples'
mkdir -p /build/source/target/debug/c-examples/ffi
gcc -I../include -I../../openpgp-ffi/include -g -L/build/source/target/debug -lsequoia_ffi -o "/build/source/target/debug/c-examples/ffi/keyserver" "keyserver.c"
mkdir -p /build/source/target/debug/c-examples/ffi
gcc -I../include -I../../openpgp-ffi/include -g -L/build/source/target/debug -lsequoia_ffi -o "/build/source/target/debug/c-examples/ffi/configure" "configure.c"
make[3]: Leaving directory '/build/source/ffi/examples'
make[2]: Leaving directory '/build/source/ffi'
make[1]: Leaving directory '/build/source'
@nix { "action": "setPhase", "phase": "installPhase" }
installing
CARGO_TARGET_DIR=/build/source/target \
    cargo build  --release --all
   Compiling proc-macro2 v0.4.30
   Compiling libc v0.2.59
   Compiling autocfg v0.1.4
   Compiling unicode-xid v0.1.0
   Compiling rand_core v0.4.0
   Compiling cc v1.0.37
   Compiling syn v0.15.39
   Compiling memchr v2.2.1
   Compiling siphasher v0.2.3
   Compiling semver-parser v0.7.0
   Compiling typenum v1.10.0
   Compiling failure_derive v0.1.5
   Compiling spin v0.5.0
   Compiling version_check v0.1.5
   Compiling glob v0.2.11
   Compiling byteorder v1.3.2
   Compiling string_cache_shared v0.3.0
   Compiling cfg-if v0.1.9
   Compiling bitflags v1.1.0
   Compiling rustc-demangle v0.1.15
   Compiling regex v1.1.9
   Compiling ucd-util v0.1.3
   Compiling arrayvec v0.4.10
   Compiling serde v1.0.94
   Compiling utf8-ranges v1.0.3
   Compiling nodrop v0.1.13
   Compiling unicode-width v0.1.5
   Compiling byte-tools v0.3.1
   Compiling stable_deref_trait v1.1.1
   Compiling quick-error v1.2.2
   Compiling either v1.5.2
   Compiling termcolor v1.0.5
   Compiling smallvec v0.6.10
   Compiling memoffset v0.2.1
   Compiling vec_map v0.8.1
   Compiling bindgen v0.47.3
   Compiling scopeguard v0.3.3
   Compiling strsim v0.8.0
   Compiling ansi_term v0.11.0
   Compiling precomputed-hash v0.1.1
   Compiling opaque-debug v0.2.2
   Compiling futures v0.1.28
   Compiling fixedbitset v0.1.9
   Compiling new_debug_unreachable v1.0.3
   Compiling fnv v1.0.6
   Compiling slab v0.4.2
   Compiling strsim v0.9.2
   Compiling peeking_take_while v0.1.2
   Compiling ordermap v0.3.5
   Compiling fake-simd v0.1.2
   Compiling bit-vec v0.5.1
   Compiling pkg-config v0.3.14
   Compiling lalrpop-util v0.17.1
   Compiling diff v0.1.11
   Compiling crc32fast v1.2.0
   Compiling openssl v0.10.23
   Compiling ppv-lite86 v0.2.5
   Compiling httparse v1.3.4
   Compiling itoa v0.4.4
   Compiling foreign-types-shared v0.1.1
   Compiling try-lock v0.2.2
   Compiling memsec v0.5.6
   Compiling native-tls v0.2.3
   Compiling indexmap v1.0.2
   Compiling matches v0.1.8
   Compiling openssl-probe v0.1.2
   Compiling remove_dir_all v0.5.2
   Compiling safemem v0.3.0
   Compiling scoped-tls v0.1.2
   Compiling ryu v1.0.0
   Compiling linked-hash-map v0.5.2
   Compiling percent-encoding v1.0.1
   Compiling zbase32 v0.1.2
   Compiling sequoia-guide v0.9.0 (/build/source/guide)
   Compiling encode_unicode v0.3.5
   Compiling phf_shared v0.7.24
   Compiling rand_core v0.3.1
   Compiling rand_jitter v0.1.4
   Compiling lazy_static v1.3.0
   Compiling rand_chacha v0.1.1
   Compiling rand_pcg v0.1.2
   Compiling rand v0.6.5
   Compiling rand_chacha v0.2.0
   Compiling log v0.4.6
   Compiling semver v0.9.0
   Compiling regex-syntax v0.6.8
   Compiling nom v4.2.3
   Compiling textwrap v0.11.0
   Compiling block-padding v0.1.4
   Compiling owning_ref v0.4.0
   Compiling humantime v1.2.0
   Compiling itertools v0.8.0
   Compiling clang-sys v0.26.4
   Compiling unicode-normalization v0.1.8
   Compiling bit-set v0.5.1
   Compiling petgraph v0.4.13
   Compiling foreign-types v0.3.2
   Compiling unicode-bidi v0.3.4
   Compiling lru-cache v0.1.2
   Compiling tokio-sync v0.1.6
   Compiling rand_hc v0.1.0
   Compiling rand_isaac v0.1.1
   Compiling rand_xorshift v0.1.1
   Compiling thread_local v0.3.6
   Compiling crossbeam-utils v0.6.5
   Compiling c2-chacha v0.2.2
   Compiling ena v0.13.0
   Compiling want v0.2.0
   Compiling lock_api v0.1.5
   Compiling libsqlite3-sys v0.9.3
   Compiling rustc_version v0.2.3
   Compiling backtrace-sys v0.1.30
   Compiling libloading v0.5.2
   Compiling openssl-sys v0.9.47
   Compiling miniz-sys v0.1.12
   Compiling bzip2-sys v0.1.7
   Compiling rand_os v0.1.3
   Compiling iovec v0.1.2
   Compiling atty v0.2.11
   Compiling dirs v1.0.5
   Compiling net2 v0.2.33
   Compiling num_cpus v1.10.1
   Compiling getrandom v0.1.6
   Compiling dirs-sys v0.3.3
   Compiling rand v0.4.6
   Compiling time v0.1.42
   Compiling fs2 v0.4.3
   Compiling rpassword v3.0.2
   Compiling hashbrown v0.1.8
   Compiling capnp v0.10.0
   Compiling base64 v0.9.3
   Compiling regex-automata v0.1.7
   Compiling generic-array v0.12.3
   Compiling tokio-executor v0.1.8
   Compiling crossbeam-queue v0.1.2
   Compiling crossbeam-epoch v0.7.1
   Compiling idna v0.1.5
   Compiling parking_lot_core v0.4.0
   Compiling hyper v0.12.31
   Compiling clap v2.33.0
   Compiling termsize v0.1.6
   Compiling bytes v0.4.12
   Compiling aho-corasick v0.7.4
   Compiling csv-core v0.1.6
   Compiling rand_core v0.5.0
   Compiling term v0.5.2
   Compiling quote v0.6.12
   Compiling mio v0.6.19
   Compiling futures-cpupool v0.1.8
   Compiling dirs v2.0.1
   Compiling digest v0.8.1
   Compiling block-buffer v0.7.3
   Compiling tempdir v0.3.7
   Compiling tokio-timer v0.2.11
   Compiling tokio-current-thread v0.1.6
   Compiling crossbeam-deque v0.7.1
   Compiling tokio-io v0.1.12
   Compiling tokio-buf v0.1.1
   Compiling string v0.2.1
   Compiling http v0.1.17
   Compiling capnpc v0.10.1
   Compiling capnp-futures v0.10.0
   Compiling cexpr v0.3.5
   Compiling sha2 v0.8.0
   Compiling rusqlite v0.14.0
   Compiling mio-uds v0.6.7
   Compiling phf_generator v0.7.24
   Compiling backtrace v0.3.32
   Compiling flate2 v1.0.9
   Compiling tokio-threadpool v0.1.15
   Compiling tokio-codec v0.1.1
   Compiling rand v0.7.0
   Compiling bzip2 v0.3.3
   Compiling ascii-canvas v2.0.0
   Compiling http-body v0.1.0
   Compiling h2 v0.1.25
   Compiling string_cache_codegen v0.4.2
   Compiling parking_lot v0.7.1
   Compiling url v1.7.2
   Compiling buffered-reader v0.9.0 (/build/source/buffered-reader)
   Compiling tempfile v3.1.0
   Compiling tokio-fs v0.1.6
   Compiling string_cache v0.7.3
   Compiling tokio-reactor v0.1.9
   Compiling capnp-rpc v0.10.0
   Compiling sequoia-store v0.9.0 (/build/source/store)
   Compiling tokio-udp v0.1.3
   Compiling tokio-tcp v0.1.3
   Compiling tokio-uds v0.2.5
   Compiling sequoia-sqv v0.9.0 (/build/source/sqv)
   Compiling sequoia-tool v0.9.0 (/build/source/tool)
   Compiling tokio v0.1.22
   Compiling tokio-core v0.1.17
   Compiling env_logger v0.6.2
   Compiling synstructure v0.10.2
   Compiling serde_derive v1.0.94
   Compiling sequoia-ffi-macros v0.9.0 (/build/source/ffi-macros)
   Compiling quickcheck v0.8.5
   Compiling hyper-tls v0.3.2
   Compiling failure v0.1.5
   Compiling which v2.0.1
   Compiling sequoia-core v0.9.0 (/build/source/core)
   Compiling docopt v1.1.0
   Compiling bstr v0.2.1
   Compiling csv v1.1.1
   Compiling prettytable-rs v0.8.0
   Compiling lalrpop v0.17.1
   Compiling nettle-sys v2.0.1
   Compiling nettle v5.0.2
   Compiling sequoia-rfc2822 v0.9.0 (/build/source/rfc2822)
   Compiling sequoia-openpgp v0.9.0 (/build/source/openpgp)
   Compiling sequoia-ipc v0.9.0 (/build/source/ipc)
warning: the item `memsec` is imported redundantly
  --> openpgp/src/crypto/asymmetric.rs:87:13
   |
87 |         use memsec;
   |             ^^^^^^
   | 
  ::: openpgp/src/lib.rs:50:1
   |
50 | extern crate memsec;
   | -------------------- the item `memsec` is already imported here
   |
   = note: #[warn(unused_imports)] on by default

warning: the item `rsa` is imported redundantly
   --> openpgp/src/crypto/asymmetric.rs:216:13
    |
3   | use nettle::{dsa, ecc, ecdsa, ed25519, rsa, Yarrow};
    |                                        --- the item `rsa` is already imported here
...
216 |         use nettle::rsa;
    |             ^^^^^^^^^^^

warning: the item `memsec` is imported redundantly
   --> openpgp/src/crypto/ecdh.rs:175:9
    |
175 |     use memsec;
    |         ^^^^^^
    | 
   ::: openpgp/src/lib.rs:50:1
    |
50  | extern crate memsec;
    | -------------------- the item `memsec` is already imported here

warning: the item `mpis` is imported redundantly
   --> openpgp/src/packet/key.rs:270:28
    |
9   | use crypto::{self, mem::Protected, mpis, hash::Hash, KeyPair};
    |                                    ---- the item `mpis` is already imported here
...
270 |         use crypto::mpis::{self, MPI, PublicKey};
    |                            ^^^^

warning: the item `mpis` is imported redundantly
   --> openpgp/src/packet/key.rs:310:28
    |
9   | use crypto::{self, mem::Protected, mpis, hash::Hash, KeyPair};
    |                                    ---- the item `mpis` is already imported here
...
310 |         use crypto::mpis::{self, MPI, PublicKey};
    |                            ^^^^

warning: the item `HashAlgorithm` is imported redundantly
   --> openpgp/src/packet/key.rs:311:25
    |
15  | use HashAlgorithm;
    |     ------------- the item `HashAlgorithm` is already imported here
...
311 |         use constants::{HashAlgorithm, SymmetricAlgorithm, Curve};
    |                         ^^^^^^^^^^^^^

warning: the item `SymmetricAlgorithm` is imported redundantly
   --> openpgp/src/packet/key.rs:311:40
    |
14  | use SymmetricAlgorithm;
    |     ------------------ the item `SymmetricAlgorithm` is already imported here
...
311 |         use constants::{HashAlgorithm, SymmetricAlgorithm, Curve};
    |                                        ^^^^^^^^^^^^^^^^^^

warning: the item `Curve` is imported redundantly
   --> openpgp/src/packet/key.rs:311:60
    |
16  | use constants::Curve;
    |     ---------------- the item `Curve` is already imported here
...
311 |         use constants::{HashAlgorithm, SymmetricAlgorithm, Curve};
    |                                                            ^^^^^

warning: the item `Error` is imported redundantly
   --> openpgp/src/packet/key.rs:313:13
    |
8   | use Error;
    |     ----- the item `Error` is already imported here
...
313 |         use Error;
    |             ^^^^^

warning: the item `SecretKey` is imported redundantly
   --> openpgp/src/packet/key.rs:544:13
    |
544 |           use packet::key::SecretKey;
    |               ^^^^^^^^^^^^^^^^^^^^^^
...
569 | / pub enum SecretKey {
570 | |     /// Unencrypted secret key. Can be used as-is.
571 | |     Unencrypted(Unencrypted),
572 | |     /// The secret key is encrypted with a password.
573 | |     Encrypted(Encrypted),
574 | | }
    | |_- the item `SecretKey` is already defined here

warning: the item `SignatureType` is imported redundantly
   --> openpgp/src/tpk/builder.rs:378:13
    |
17  |     SignatureType,
    |     ------------- the item `SignatureType` is already imported here
...
378 |         use SignatureType;
    |             ^^^^^^^^^^^^^

warning: the item `Tag` is imported redundantly
    --> openpgp/src/serialize/mod.rs:2045:13
     |
33   | use packet::prelude::*;
     |     ------------------ the item `Tag` is already imported here
...
2045 |         use packet::Tag;
     |             ^^^^^^^^^^^

warning: variable does not need to be mutable
  --> openpgp/src/crypto/ecdh.rs:36:21
   |
36 |                 let mut v: Protected =
   |                     ----^
   |                     |
   |                     help: remove this `mut`
   |
   = note: #[warn(unused_mut)] on by default

warning: variable does not need to be mutable
   --> openpgp/src/crypto/ecdh.rs:300:17
    |
300 |             let mut m = aes_key_unwrap(*sym, &Z, key)?;
    |                 ----^
    |                 |
    |                 help: remove this `mut`

warning: variable does not need to be mutable
   --> openpgp/src/packet/key.rs:320:21
    |
320 |                 let mut private: Protected =
    |                     ----^^^^^^^
    |                     |
    |                     help: remove this `mut`

warning: variable does not need to be mutable
   --> openpgp/src/serialize/stream.rs:415:21
    |
415 |                 let mut hash = self.hash.clone();
    |                     ----^^^^
    |                     |
    |                     help: remove this `mut`

warning: variable does not need to be mutable
    --> openpgp/src/serialize/stream.rs:1087:17
     |
1087 |             let mut w = w.into_inner()?.unwrap();
     |                 ----^
     |                 |
     |                 help: remove this `mut`

warning: variable does not need to be mutable
    --> openpgp/src/serialize/stream.rs:1089:17
     |
1089 |             let mut w = w.into_inner()?.unwrap();
     |                 ----^
     |                 |
     |                 help: remove this `mut`

warning: variable does not need to be mutable
   --> openpgp/src/parse/parse.rs:277:17
    |
277 |             let mut inner = Box::new(self.reader).into_inner().unwrap();
    |                 ----^^^^^
    |                 |
    |                 help: remove this `mut`

warning: variable does not need to be mutable
    --> openpgp/src/parse/parse.rs:1363:25
     |
1363 |                     let mut cipher = php_try!(php.parse_bytes_eof("encrypted_mpis"));
     |                         ----^^^^^^
     |                         |
     |                         help: remove this `mut`

warning: variable does not need to be mutable
    --> openpgp/src/parse/parse.rs:1879:33
     |
1879 |                             let mut h = state.sig_group_mut().hashes
     |                                 ----^
     |                                 |
     |                                 help: remove this `mut`

warning: variable does not need to be mutable
    --> openpgp/src/parse/parse.rs:2061:38
     |
2061 |             PacketParserResult::Some(mut pp) => {
     |                                      ----^^
     |                                      |
     |                                      help: remove this `mut`

warning: variable does not need to be mutable
    --> openpgp/src/parse/parse.rs:3456:25
     |
3456 |                     let mut dec = aead::Decryptor::new(
     |                         ----^^^
     |                         |
     |                         help: remove this `mut`

warning: variable does not need to be mutable
   --> openpgp/src/parse/mpis.rs:137:21
    |
137 |                 let mut rest = php.parse_bytes_eof("rest")?;
    |                     ----^^^^
    |                     |
    |                     help: remove this `mut`

warning: variable does not need to be mutable
   --> openpgp/src/parse/mpis.rs:270:21
    |
270 |                 let mut rest = php.parse_bytes_eof("rest")?;
    |                     ----^^^^
    |                     |
    |                     help: remove this `mut`

warning: variable does not need to be mutable
   --> openpgp/src/parse/mpis.rs:348:21
    |
348 |                 let mut rest = php.parse_bytes_eof("rest")?;
    |                     ----^^^^
    |                     |
    |                     help: remove this `mut`

warning: variable does not need to be mutable
   --> openpgp/src/parse/mpis.rs:455:21
    |
455 |                 let mut rest = php.parse_bytes_eof("rest")?;
    |                     ----^^^^
    |                     |
    |                     help: remove this `mut`

warning: variable does not need to be mutable
   --> openpgp/src/parse/stream.rs:587:52
    |
587 |                 while let PacketParserResult::Some(mut pp) = ppr {
    |                                                    ----^^
    |                                                    |
    |                                                    help: remove this `mut`

warning: variable does not need to be mutable
   --> openpgp/src/parse/stream.rs:769:21
    |
769 |                 let mut lit = Literal::new(DataFormat::Binary);
    |                     ----^^^
    |                     |
    |                     help: remove this `mut`

warning: variable does not need to be mutable
   --> openpgp/src/parse/stream.rs:783:21
    |
783 |                 let mut lit = Literal::new(DataFormat::Binary);
    |                     ----^^^
    |                     |
    |                     help: remove this `mut`

warning: variable does not need to be mutable
    --> openpgp/src/parse/stream.rs:1380:52
     |
1380 |                 while let PacketParserResult::Some(mut pp) = ppr {
     |                                                    ----^^
     |                                                    |
     |                                                    help: remove this `mut`

   Compiling sequoia-net v0.9.0 (/build/source/net)
   Compiling sequoia-openpgp-ffi v0.9.0 (/build/source/openpgp-ffi)
   Compiling sequoia-ffi v0.9.0 (/build/source/ffi)
warning: variable does not need to be mutable
   --> tool/src/sq.rs:221:25
    |
221 |                     let mut input = open_or_stdin(m.value_of("input"))?;
    |                         ----^^^^^
    |                         |
    |                         help: remove this `mut`
    |
    = note: #[warn(unused_mut)] on by default

warning: variable does not need to be mutable
   --> tool/src/sq.rs:233:25
    |
233 |                     let mut input = open_or_stdin(m.value_of("input"))?;
    |                         ----^^^^^
    |                         |
    |                         help: remove this `mut`

warning: variable does not need to be mutable
  --> tool/src/commands/mod.rs:52:25
   |
52 |             if let Some(mut secret) = key.secret() {
   |                         ----^^^^^^
   |                         |
   |                         help: remove this `mut`

warning: variable does not need to be mutable
  --> tool/src/commands/sign.rs:48:48
   |
48 |             while let PacketParserResult::Some(mut pp) = ppr {
   |                                                ----^^
   |                                                |
   |                                                help: remove this `mut`

   Compiling sequoia v0.9.0 (/build/source)
    Finished release [optimized + debuginfo] target(s) in 9m 51s
make -Copenpgp-ffi build-release
make[1]: Entering directory '/build/source/openpgp-ffi'
sed -e 's|VERSION|0.9.0|g' -e 's|PREFIX|/build/source/openpgp-ffi|g' -e 's|libdir=.*|libdir=/build/source/target/release|g' sequoia-openpgp.pc.in > /build/source/target/release/sequoia-openpgp.pc
make[1]: Leaving directory '/build/source/openpgp-ffi'
make -Cffi build-release
make[1]: Entering directory '/build/source/ffi'
make -Clang/python build-release
make[2]: Entering directory '/build/source/ffi/lang/python'
rm -f .stamp-build
python3 setup.py clean
running clean
removing 'build/temp.linux-x86_64-3.7' (and everything under it)
/nix/store/f6nhx4jpndbqd76nqlr0bq2xq37kaz3r-python3.7-cffi-1.12.3/lib/python3.7/site-packages/cffi/cparser.py:150: UserWarning: String literal found in cdef() or type source. String literals are ignored here, but you should remove them anyway because some character sequences confuse pre-parsing.
  warnings.warn("String literal found in cdef() or type source. "
LDFLAGS=-L/build/source/target/release \
	python3 setup.py build
running build
running build_py
running build_ext
generating cffi module 'build/temp.linux-x86_64-3.7/_sequoia.c'
creating build/temp.linux-x86_64-3.7
building '_sequoia' extension
creating build/temp.linux-x86_64-3.7/build
creating build/temp.linux-x86_64-3.7/build/temp.linux-x86_64-3.7
gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -I../../include -I../../../openpgp-ffi/include -fPIC -I/nix/store/zjzq4qp81z8qnnnchnkycmsq0impw173-python3-3.7.4/include/python3.7m -c build/temp.linux-x86_64-3.7/_sequoia.c -o build/temp.linux-x86_64-3.7/build/temp.linux-x86_64-3.7/_sequoia.o
gcc -pthread -shared -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-zlib-1.2.11/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-bzip2-1.0.6.0.1/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-expat-2.2.7/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-xz-5.2.4/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-libffi-3.2.1/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-gdbm-1.18.1/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-sqlite-3.28.0/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-readline-6.3p08/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-ncurses-6.1-20190112/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-openssl-1.0.2s/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-zlib-1.2.11/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-bzip2-1.0.6.0.1/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-expat-2.2.7/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-xz-5.2.4/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-libffi-3.2.1/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-gdbm-1.18.1/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-sqlite-3.28.0/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-readline-6.3p08/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-ncurses-6.1-20190112/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-openssl-1.0.2s/lib -L/build/source/target/release -I../../include -I../../../openpgp-ffi/include build/temp.linux-x86_64-3.7/build/temp.linux-x86_64-3.7/_sequoia.o -L/nix/store/zjzq4qp81z8qnnnchnkycmsq0impw173-python3-3.7.4/lib -lsequoia_ffi -lpython3.7m -o build/lib.linux-x86_64-3.7/_sequoia.abi3.so
/nix/store/f6nhx4jpndbqd76nqlr0bq2xq37kaz3r-python3.7-cffi-1.12.3/lib/python3.7/site-packages/cffi/cparser.py:150: UserWarning: String literal found in cdef() or type source. String literals are ignored here, but you should remove them anyway because some character sequences confuse pre-parsing.
  warnings.warn("String literal found in cdef() or type source. "
touch .stamp-build-release
make[2]: Leaving directory '/build/source/ffi/lang/python'
sed -e 's|VERSION|0.9.0|g' -e 's|PREFIX|/build/source/ffi|g' -e 's|libdir=.*|libdir=/build/source/target/release|g' sequoia.pc.in >/build/source/target/release/sequoia.pc
make[1]: Leaving directory '/build/source/ffi'
install -d /nix/store/zf907v9g6ralcxsgzc4jkl24fsydlkf8-sequoia-0.9.0/lib/sequoia
install -t /nix/store/zf907v9g6ralcxsgzc4jkl24fsydlkf8-sequoia-0.9.0/lib/sequoia \
    /build/source/target/release/sequoia-public-key-store
install -d /nix/store/zf907v9g6ralcxsgzc4jkl24fsydlkf8-sequoia-0.9.0/bin
install -t /nix/store/zf907v9g6ralcxsgzc4jkl24fsydlkf8-sequoia-0.9.0/bin \
    /build/source/target/release/sq
make -Copenpgp-ffi install
make[1]: Entering directory '/build/source/openpgp-ffi'
install -d /nix/store/zf907v9g6ralcxsgzc4jkl24fsydlkf8-sequoia-0.9.0/share/pkgconfig
sed -e 's|VERSION|0.9.0|g' -e 's|PREFIX|/build/source/openpgp-ffi|g'  sequoia-openpgp.pc.in > /nix/store/zf907v9g6ralcxsgzc4jkl24fsydlkf8-sequoia-0.9.0/share/pkgconfig/sequoia-openpgp.pc
install -d /nix/store/zf907v9g6ralcxsgzc4jkl24fsydlkf8-sequoia-0.9.0/include
install -d /nix/store/zf907v9g6ralcxsgzc4jkl24fsydlkf8-sequoia-0.9.0/include/sequoia
install -t /nix/store/zf907v9g6ralcxsgzc4jkl24fsydlkf8-sequoia-0.9.0/include/sequoia \
	include/sequoia/*.h
install -d /nix/store/zf907v9g6ralcxsgzc4jkl24fsydlkf8-sequoia-0.9.0/include/sequoia/openpgp
install -t /nix/store/zf907v9g6ralcxsgzc4jkl24fsydlkf8-sequoia-0.9.0/include/sequoia/openpgp \
	include/sequoia/openpgp/*.h
install -d /nix/store/zf907v9g6ralcxsgzc4jkl24fsydlkf8-sequoia-0.9.0/lib
install /build/source/target/release/libsequoia_openpgp_ffi.so \
	/nix/store/zf907v9g6ralcxsgzc4jkl24fsydlkf8-sequoia-0.9.0/lib/libsequoia_openpgp_ffi.so.0.9.0
ln -fs libsequoia_openpgp_ffi.so.0.9.0 \
	/nix/store/zf907v9g6ralcxsgzc4jkl24fsydlkf8-sequoia-0.9.0/lib/libsequoia_openpgp_ffi.so.0
ln -fs libsequoia_openpgp_ffi.so.0.9.0 \
	/nix/store/zf907v9g6ralcxsgzc4jkl24fsydlkf8-sequoia-0.9.0/lib/libsequoia_openpgp_ffi.so
install /build/source/target/release/libsequoia_openpgp_ffi.a \
	/nix/store/zf907v9g6ralcxsgzc4jkl24fsydlkf8-sequoia-0.9.0/lib/libsequoia_openpgp_ffi.a
make[1]: Leaving directory '/build/source/openpgp-ffi'
make -Cffi install
make[1]: Entering directory '/build/source/ffi'
install -d /nix/store/zf907v9g6ralcxsgzc4jkl24fsydlkf8-sequoia-0.9.0/share/pkgconfig
sed -e 's|VERSION|0.9.0|g' -e 's|PREFIX|/build/source/ffi|g'  sequoia.pc.in >/nix/store/zf907v9g6ralcxsgzc4jkl24fsydlkf8-sequoia-0.9.0/share/pkgconfig/sequoia.pc
install -d /nix/store/zf907v9g6ralcxsgzc4jkl24fsydlkf8-sequoia-0.9.0/include
install -t /nix/store/zf907v9g6ralcxsgzc4jkl24fsydlkf8-sequoia-0.9.0/include include/sequoia.h
install -d /nix/store/zf907v9g6ralcxsgzc4jkl24fsydlkf8-sequoia-0.9.0/include/sequoia
install -t /nix/store/zf907v9g6ralcxsgzc4jkl24fsydlkf8-sequoia-0.9.0/include/sequoia \
	include/sequoia/*.h
install -d /nix/store/zf907v9g6ralcxsgzc4jkl24fsydlkf8-sequoia-0.9.0/lib
install /build/source/target/release/libsequoia_ffi.so \
	/nix/store/zf907v9g6ralcxsgzc4jkl24fsydlkf8-sequoia-0.9.0/lib/libsequoia_ffi.so.0.9.0
ln -fs libsequoia_ffi.so.0.9.0 \
	/nix/store/zf907v9g6ralcxsgzc4jkl24fsydlkf8-sequoia-0.9.0/lib/libsequoia_ffi.so.0
ln -fs libsequoia_ffi.so.0.9.0 \
	/nix/store/zf907v9g6ralcxsgzc4jkl24fsydlkf8-sequoia-0.9.0/lib/libsequoia_ffi.so
install /build/source/target/release/libsequoia_ffi.a \
	/nix/store/zf907v9g6ralcxsgzc4jkl24fsydlkf8-sequoia-0.9.0/lib/libsequoia_ffi.a
# Now the bindings.
make -Clang/python install
make[2]: Entering directory '/build/source/ffi/lang/python'
install -d /nix/store/zf907v9g6ralcxsgzc4jkl24fsydlkf8-sequoia-0.9.0/lib/python3.7/site-packages
LDFLAGS=-L/build/source/target/release \
	python3 setup.py install  --prefix=/nix/store/zf907v9g6ralcxsgzc4jkl24fsydlkf8-sequoia-0.9.0
running install
running bdist_egg
running egg_info
writing sequoia.egg-info/PKG-INFO
writing dependency_links to sequoia.egg-info/dependency_links.txt
writing requirements to sequoia.egg-info/requires.txt
writing top-level names to sequoia.egg-info/top_level.txt
reading manifest file 'sequoia.egg-info/SOURCES.txt'
writing manifest file 'sequoia.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
running build_ext
generating cffi module 'build/temp.linux-x86_64-3.7/_sequoia.c'
already up-to-date
creating build/bdist.linux-x86_64
creating build/bdist.linux-x86_64/egg
creating build/bdist.linux-x86_64/egg/sequoia
copying build/lib.linux-x86_64-3.7/sequoia/net.py -> build/bdist.linux-x86_64/egg/sequoia
copying build/lib.linux-x86_64-3.7/sequoia/openpgp.py -> build/bdist.linux-x86_64/egg/sequoia
copying build/lib.linux-x86_64-3.7/sequoia/__init__.py -> build/bdist.linux-x86_64/egg/sequoia
copying build/lib.linux-x86_64-3.7/sequoia/glue.py -> build/bdist.linux-x86_64/egg/sequoia
copying build/lib.linux-x86_64-3.7/sequoia/sequoia_build.py -> build/bdist.linux-x86_64/egg/sequoia
copying build/lib.linux-x86_64-3.7/sequoia/error.py -> build/bdist.linux-x86_64/egg/sequoia
copying build/lib.linux-x86_64-3.7/sequoia/prelude.py -> build/bdist.linux-x86_64/egg/sequoia
copying build/lib.linux-x86_64-3.7/sequoia/core.py -> build/bdist.linux-x86_64/egg/sequoia
copying build/lib.linux-x86_64-3.7/sequoia/store.py -> build/bdist.linux-x86_64/egg/sequoia
copying build/lib.linux-x86_64-3.7/_sequoia.abi3.so -> build/bdist.linux-x86_64/egg
byte-compiling build/bdist.linux-x86_64/egg/sequoia/net.py to net.cpython-37.pyc
byte-compiling build/bdist.linux-x86_64/egg/sequoia/openpgp.py to openpgp.cpython-37.pyc
byte-compiling build/bdist.linux-x86_64/egg/sequoia/__init__.py to __init__.cpython-37.pyc
byte-compiling build/bdist.linux-x86_64/egg/sequoia/glue.py to glue.cpython-37.pyc
byte-compiling build/bdist.linux-x86_64/egg/sequoia/sequoia_build.py to sequoia_build.cpython-37.pyc
byte-compiling build/bdist.linux-x86_64/egg/sequoia/error.py to error.cpython-37.pyc
byte-compiling build/bdist.linux-x86_64/egg/sequoia/prelude.py to prelude.cpython-37.pyc
byte-compiling build/bdist.linux-x86_64/egg/sequoia/core.py to core.cpython-37.pyc
byte-compiling build/bdist.linux-x86_64/egg/sequoia/store.py to store.cpython-37.pyc
creating stub loader for _sequoia.abi3.so
byte-compiling build/bdist.linux-x86_64/egg/_sequoia.py to _sequoia.cpython-37.pyc
creating build/bdist.linux-x86_64/egg/EGG-INFO
copying sequoia.egg-info/PKG-INFO -> build/bdist.linux-x86_64/egg/EGG-INFO
copying sequoia.egg-info/SOURCES.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying sequoia.egg-info/dependency_links.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying sequoia.egg-info/requires.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying sequoia.egg-info/top_level.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
writing build/bdist.linux-x86_64/egg/EGG-INFO/native_libs.txt
/nix/store/f6nhx4jpndbqd76nqlr0bq2xq37kaz3r-python3.7-cffi-1.12.3/lib/python3.7/site-packages/cffi/cparser.py:150: UserWarning: String literal found in cdef() or type source. String literals are ignored here, but you should remove them anyway because some character sequences confuse pre-parsing.
  warnings.warn("String literal found in cdef() or type source. "
zip_safe flag not set; analyzing archive contents...
__pycache__._sequoia.cpython-37: module references __file__
sequoia.__pycache__.sequoia_build.cpython-37: module references __file__
creating dist
creating 'dist/sequoia-0.1.0-py3.7-linux-x86_64.egg' and adding 'build/bdist.linux-x86_64/egg' to it
removing 'build/bdist.linux-x86_64/egg' (and everything under it)
Creating /nix/store/zf907v9g6ralcxsgzc4jkl24fsydlkf8-sequoia-0.9.0/lib/python3.7/site-packages/site.py
Processing sequoia-0.1.0-py3.7-linux-x86_64.egg
creating /nix/store/zf907v9g6ralcxsgzc4jkl24fsydlkf8-sequoia-0.9.0/lib/python3.7/site-packages/sequoia-0.1.0-py3.7-linux-x86_64.egg
Extracting sequoia-0.1.0-py3.7-linux-x86_64.egg to /nix/store/zf907v9g6ralcxsgzc4jkl24fsydlkf8-sequoia-0.9.0/lib/python3.7/site-packages
Adding sequoia 0.1.0 to easy-install.pth file

Installed /nix/store/zf907v9g6ralcxsgzc4jkl24fsydlkf8-sequoia-0.9.0/lib/python3.7/site-packages/sequoia-0.1.0-py3.7-linux-x86_64.egg
Processing dependencies for sequoia==0.1.0
Searching for cffi==1.12.3
Best match: cffi 1.12.3
Adding cffi 1.12.3 to easy-install.pth file

Using /nix/store/f6nhx4jpndbqd76nqlr0bq2xq37kaz3r-python3.7-cffi-1.12.3/lib/python3.7/site-packages
Searching for pycparser==2.19
Best match: pycparser 2.19
Adding pycparser 2.19 to easy-install.pth file

Using /nix/store/9inbpkcbj0cllsiaslmbqywz2d4h59dp-python3.7-pycparser-2.19/lib/python3.7/site-packages
Finished processing dependencies for sequoia==0.1.0
make[2]: Leaving directory '/build/source/ffi/lang/python'
make[1]: Leaving directory '/build/source/ffi'
make -Csqv install
make[1]: Entering directory '/build/source/sqv'
CARGO_TARGET_DIR=/build/source/target \
    cargo build  --release --package sequoia-sqv
   Compiling syn v0.15.39
   Compiling memchr v2.2.1
   Compiling either v1.5.2
   Compiling getrandom v0.1.6
   Compiling buffered-reader v0.9.0 (/build/source/buffered-reader)
   Compiling itertools v0.8.0
   Compiling memsec v0.5.6
   Compiling aho-corasick v0.7.4
   Compiling nom v4.2.3
   Compiling regex v1.1.9
   Compiling cexpr v0.3.5
   Compiling env_logger v0.6.2
   Compiling quickcheck v0.8.5
   Compiling synstructure v0.10.2
   Compiling serde_derive v1.0.94
   Compiling failure_derive v0.1.5
   Compiling failure v0.1.5
   Compiling which v2.0.1
   Compiling bindgen v0.47.3
   Compiling serde v1.0.94
   Compiling string_cache v0.7.3
   Compiling docopt v1.1.0
   Compiling nettle-sys v2.0.1
   Compiling nettle v5.0.2
   Compiling lalrpop v0.17.1
   Compiling sequoia-rfc2822 v0.9.0 (/build/source/rfc2822)
   Compiling sequoia-openpgp v0.9.0 (/build/source/openpgp)
warning: the item `memsec` is imported redundantly
  --> openpgp/src/crypto/asymmetric.rs:87:13
   |
87 |         use memsec;
   |             ^^^^^^
   | 
  ::: openpgp/src/lib.rs:50:1
   |
50 | extern crate memsec;
   | -------------------- the item `memsec` is already imported here
   |
   = note: #[warn(unused_imports)] on by default

warning: the item `rsa` is imported redundantly
   --> openpgp/src/crypto/asymmetric.rs:216:13
    |
3   | use nettle::{dsa, ecc, ecdsa, ed25519, rsa, Yarrow};
    |                                        --- the item `rsa` is already imported here
...
216 |         use nettle::rsa;
    |             ^^^^^^^^^^^

warning: the item `memsec` is imported redundantly
   --> openpgp/src/crypto/ecdh.rs:175:9
    |
175 |     use memsec;
    |         ^^^^^^
    | 
   ::: openpgp/src/lib.rs:50:1
    |
50  | extern crate memsec;
    | -------------------- the item `memsec` is already imported here

warning: the item `mpis` is imported redundantly
   --> openpgp/src/packet/key.rs:270:28
    |
9   | use crypto::{self, mem::Protected, mpis, hash::Hash, KeyPair};
    |                                    ---- the item `mpis` is already imported here
...
270 |         use crypto::mpis::{self, MPI, PublicKey};
    |                            ^^^^

warning: the item `mpis` is imported redundantly
   --> openpgp/src/packet/key.rs:310:28
    |
9   | use crypto::{self, mem::Protected, mpis, hash::Hash, KeyPair};
    |                                    ---- the item `mpis` is already imported here
...
310 |         use crypto::mpis::{self, MPI, PublicKey};
    |                            ^^^^

warning: the item `HashAlgorithm` is imported redundantly
   --> openpgp/src/packet/key.rs:311:25
    |
15  | use HashAlgorithm;
    |     ------------- the item `HashAlgorithm` is already imported here
...
311 |         use constants::{HashAlgorithm, SymmetricAlgorithm, Curve};
    |                         ^^^^^^^^^^^^^

warning: the item `SymmetricAlgorithm` is imported redundantly
   --> openpgp/src/packet/key.rs:311:40
    |
14  | use SymmetricAlgorithm;
    |     ------------------ the item `SymmetricAlgorithm` is already imported here
...
311 |         use constants::{HashAlgorithm, SymmetricAlgorithm, Curve};
    |                                        ^^^^^^^^^^^^^^^^^^

warning: the item `Curve` is imported redundantly
   --> openpgp/src/packet/key.rs:311:60
    |
16  | use constants::Curve;
    |     ---------------- the item `Curve` is already imported here
...
311 |         use constants::{HashAlgorithm, SymmetricAlgorithm, Curve};
    |                                                            ^^^^^

warning: the item `Error` is imported redundantly
   --> openpgp/src/packet/key.rs:313:13
    |
8   | use Error;
    |     ----- the item `Error` is already imported here
...
313 |         use Error;
    |             ^^^^^

warning: the item `SecretKey` is imported redundantly
   --> openpgp/src/packet/key.rs:544:13
    |
544 |           use packet::key::SecretKey;
    |               ^^^^^^^^^^^^^^^^^^^^^^
...
569 | / pub enum SecretKey {
570 | |     /// Unencrypted secret key. Can be used as-is.
571 | |     Unencrypted(Unencrypted),
572 | |     /// The secret key is encrypted with a password.
573 | |     Encrypted(Encrypted),
574 | | }
    | |_- the item `SecretKey` is already defined here

warning: the item `SignatureType` is imported redundantly
   --> openpgp/src/tpk/builder.rs:378:13
    |
17  |     SignatureType,
    |     ------------- the item `SignatureType` is already imported here
...
378 |         use SignatureType;
    |             ^^^^^^^^^^^^^

warning: the item `Tag` is imported redundantly
    --> openpgp/src/serialize/mod.rs:2045:13
     |
33   | use packet::prelude::*;
     |     ------------------ the item `Tag` is already imported here
...
2045 |         use packet::Tag;
     |             ^^^^^^^^^^^

warning: variable does not need to be mutable
  --> openpgp/src/crypto/ecdh.rs:36:21
   |
36 |                 let mut v: Protected =
   |                     ----^
   |                     |
   |                     help: remove this `mut`
   |
   = note: #[warn(unused_mut)] on by default

warning: variable does not need to be mutable
   --> openpgp/src/crypto/ecdh.rs:300:17
    |
300 |             let mut m = aes_key_unwrap(*sym, &Z, key)?;
    |                 ----^
    |                 |
    |                 help: remove this `mut`

warning: variable does not need to be mutable
   --> openpgp/src/packet/key.rs:320:21
    |
320 |                 let mut private: Protected =
    |                     ----^^^^^^^
    |                     |
    |                     help: remove this `mut`

warning: variable does not need to be mutable
   --> openpgp/src/serialize/stream.rs:415:21
    |
415 |                 let mut hash = self.hash.clone();
    |                     ----^^^^
    |                     |
    |                     help: remove this `mut`

warning: variable does not need to be mutable
    --> openpgp/src/serialize/stream.rs:1087:17
     |
1087 |             let mut w = w.into_inner()?.unwrap();
     |                 ----^
     |                 |
     |                 help: remove this `mut`

warning: variable does not need to be mutable
    --> openpgp/src/serialize/stream.rs:1089:17
     |
1089 |             let mut w = w.into_inner()?.unwrap();
     |                 ----^
     |                 |
     |                 help: remove this `mut`

warning: variable does not need to be mutable
   --> openpgp/src/parse/parse.rs:277:17
    |
277 |             let mut inner = Box::new(self.reader).into_inner().unwrap();
    |                 ----^^^^^
    |                 |
    |                 help: remove this `mut`

warning: variable does not need to be mutable
    --> openpgp/src/parse/parse.rs:1363:25
     |
1363 |                     let mut cipher = php_try!(php.parse_bytes_eof("encrypted_mpis"));
     |                         ----^^^^^^
     |                         |
     |                         help: remove this `mut`

warning: variable does not need to be mutable
    --> openpgp/src/parse/parse.rs:1879:33
     |
1879 |                             let mut h = state.sig_group_mut().hashes
     |                                 ----^
     |                                 |
     |                                 help: remove this `mut`

warning: variable does not need to be mutable
    --> openpgp/src/parse/parse.rs:2061:38
     |
2061 |             PacketParserResult::Some(mut pp) => {
     |                                      ----^^
     |                                      |
     |                                      help: remove this `mut`

warning: variable does not need to be mutable
    --> openpgp/src/parse/parse.rs:3456:25
     |
3456 |                     let mut dec = aead::Decryptor::new(
     |                         ----^^^
     |                         |
     |                         help: remove this `mut`

warning: variable does not need to be mutable
   --> openpgp/src/parse/mpis.rs:137:21
    |
137 |                 let mut rest = php.parse_bytes_eof("rest")?;
    |                     ----^^^^
    |                     |
    |                     help: remove this `mut`

warning: variable does not need to be mutable
   --> openpgp/src/parse/mpis.rs:270:21
    |
270 |                 let mut rest = php.parse_bytes_eof("rest")?;
    |                     ----^^^^
    |                     |
    |                     help: remove this `mut`

warning: variable does not need to be mutable
   --> openpgp/src/parse/mpis.rs:348:21
    |
348 |                 let mut rest = php.parse_bytes_eof("rest")?;
    |                     ----^^^^
    |                     |
    |                     help: remove this `mut`

warning: variable does not need to be mutable
   --> openpgp/src/parse/mpis.rs:455:21
    |
455 |                 let mut rest = php.parse_bytes_eof("rest")?;
    |                     ----^^^^
    |                     |
    |                     help: remove this `mut`

warning: variable does not need to be mutable
   --> openpgp/src/parse/stream.rs:587:52
    |
587 |                 while let PacketParserResult::Some(mut pp) = ppr {
    |                                                    ----^^
    |                                                    |
    |                                                    help: remove this `mut`

warning: variable does not need to be mutable
   --> openpgp/src/parse/stream.rs:769:21
    |
769 |                 let mut lit = Literal::new(DataFormat::Binary);
    |                     ----^^^
    |                     |
    |                     help: remove this `mut`

warning: variable does not need to be mutable
   --> openpgp/src/parse/stream.rs:783:21
    |
783 |                 let mut lit = Literal::new(DataFormat::Binary);
    |                     ----^^^
    |                     |
    |                     help: remove this `mut`

warning: variable does not need to be mutable
    --> openpgp/src/parse/stream.rs:1380:52
     |
1380 |                 while let PacketParserResult::Some(mut pp) = ppr {
     |                                                    ----^^
     |                                                    |
     |                                                    help: remove this `mut`

   Compiling sequoia-sqv v0.9.0 (/build/source/sqv)
    Finished release [optimized + debuginfo] target(s) in 7m 20s
install -d /nix/store/zf907v9g6ralcxsgzc4jkl24fsydlkf8-sequoia-0.9.0/bin
install -t /nix/store/zf907v9g6ralcxsgzc4jkl24fsydlkf8-sequoia-0.9.0/bin /build/source/target/release/sqv
make[1]: Leaving directory '/build/source/sqv'
install -d /nix/store/zf907v9g6ralcxsgzc4jkl24fsydlkf8-sequoia-0.9.0/share/zsh/site-functions
install -t /nix/store/zf907v9g6ralcxsgzc4jkl24fsydlkf8-sequoia-0.9.0/share/zsh/site-functions \
    /build/source/target/_sq
install -t /nix/store/zf907v9g6ralcxsgzc4jkl24fsydlkf8-sequoia-0.9.0/share/zsh/site-functions \
    /build/source/target/_sqv
install -d /nix/store/zf907v9g6ralcxsgzc4jkl24fsydlkf8-sequoia-0.9.0/share/bash-completion/completions
install /build/source/target/sq.bash \
    /nix/store/zf907v9g6ralcxsgzc4jkl24fsydlkf8-sequoia-0.9.0/share/bash-completion/completions/sq
install /build/source/target/sqv.bash \
    /nix/store/zf907v9g6ralcxsgzc4jkl24fsydlkf8-sequoia-0.9.0/share/bash-completion/completions/sqv
install -d /nix/store/zf907v9g6ralcxsgzc4jkl24fsydlkf8-sequoia-0.9.0/share/fish/completions
install -t /nix/store/zf907v9g6ralcxsgzc4jkl24fsydlkf8-sequoia-0.9.0/share/fish/completions \
    /build/source/target/sq.fish
install -t /nix/store/zf907v9g6ralcxsgzc4jkl24fsydlkf8-sequoia-0.9.0/share/fish/completions \
    /build/source/target/sqv.fish
@nix { "action": "setPhase", "phase": "fixupPhase" }
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/zf907v9g6ralcxsgzc4jkl24fsydlkf8-sequoia-0.9.0
shrinking /nix/store/zf907v9g6ralcxsgzc4jkl24fsydlkf8-sequoia-0.9.0/bin/sqv
shrinking /nix/store/zf907v9g6ralcxsgzc4jkl24fsydlkf8-sequoia-0.9.0/bin/sq
shrinking /nix/store/zf907v9g6ralcxsgzc4jkl24fsydlkf8-sequoia-0.9.0/lib/sequoia/sequoia-public-key-store
shrinking /nix/store/zf907v9g6ralcxsgzc4jkl24fsydlkf8-sequoia-0.9.0/lib/libsequoia_openpgp_ffi.so.0.9.0
shrinking /nix/store/zf907v9g6ralcxsgzc4jkl24fsydlkf8-sequoia-0.9.0/lib/libsequoia_ffi.so.0.9.0
shrinking /nix/store/zf907v9g6ralcxsgzc4jkl24fsydlkf8-sequoia-0.9.0/lib/python3.7/site-packages/sequoia-0.1.0-py3.7-linux-x86_64.egg/_sequoia.abi3.so
strip is /nix/store/mgdjnsrkqgmxqjaqaxgqyqm7fwyi96fk-binutils-2.31.1/bin/strip
stripping (with command strip and flags -S) in /nix/store/zf907v9g6ralcxsgzc4jkl24fsydlkf8-sequoia-0.9.0/lib  /nix/store/zf907v9g6ralcxsgzc4jkl24fsydlkf8-sequoia-0.9.0/bin 
patching script interpreter paths in /nix/store/zf907v9g6ralcxsgzc4jkl24fsydlkf8-sequoia-0.9.0
checking for references to /build/ in /nix/store/zf907v9g6ralcxsgzc4jkl24fsydlkf8-sequoia-0.9.0...
@nix { "action": "setPhase", "phase": "pytestcachePhase" }
pytestcachePhase

@worldofpeace
Copy link
Contributor

With my patch @doronbehar?

@jonringer
Copy link
Contributor

it might be worth while to have a sequoia-unwrapped package for the base rust package, and then just have a wrapper around different language bindings. They only have python now, but it's a C-api, so it opens the doors to many.

@jonringer
Copy link
Contributor

I think the double build is because of the override in python-modules.nix

@doronbehar
Copy link
Contributor Author

I think the double build is because of the override in python-modules.nix

@johringer I've also noticed it seems to be building the package twice. According to upstream's Makefile, I think the first make build is a debug build and it is needed for the checkPhase. The build we see afterwards (from installPhase) is a release type build. I think maybe make build shouldn't be necessary, and that we can skip it and start with make test right away.

Another option could be starting never the less with buildPhase running make build-release which is a bit more pragmatic and consistent with the usual phases.

it might be worth while to have a sequoia-unwrapped package for the base rust package, and then just have a wrapper around different language bindings. They only have python now, but it's a C-api, so it opens the doors to many.

In your mind, what files do you think should appear in the -unwrapped and the wrapped packages? If you are thinking about putting only the executables (sq and sqv) in the -unwrapped package, then perhaps a better approach would be using a split output? There really is, nothing to wrap - there are no special environment variables that need to be set in order for the executables to work. I'm just speaking from my experience when encountering wrapped and unwrapped packages in the repo so feel free to object me.

We can (I've had a discussion about it with @FRidh here) split the output to "bin" and "dev". This might be useful though we already support disabling Python bindings all together via the pythonSupport argument.

What do you think about the matter @worldofpeace?

With my patch @doronbehar?

I've pushed a new version which includes your suggestions. However, due to the concern stated above regarding "What make target to use in each phase?", perhaps we should never the less override the phases?

@jonringer
Copy link
Contributor

the unwrapped package would have the build outputs the rust compilation. seeing as that takes a significant amount of time to recompile if we do an override.

@doronbehar
Copy link
Contributor Author

So the unwrapped package will essentially include everything that comes out of make install and the wrapper(s) will include only libraries, headers and binaries according to our / the user's choice?

@worldofpeace
Copy link
Contributor

What do you think about the matter @worldofpeace?

I think wrapped and unwrapped packages are confusing to users because they the paradigm isn't documented. However I'm not sure I can follow here what the issue was?

"What make target to use in each phase?", perhaps we should never the less override the phases?

The buildPhase does the all goal first, and checkPhase here, and then lastly installPhase.
I think all should switch build with build-release, it'd be an interesting MR.
In any case, if that's the issue, you'd only need to override the buildPhase to do what we expect the first goal to do anyway.

@doronbehar
Copy link
Contributor Author

@worldofpeace I gave a full test drive to the new version of the expression with the phases nullified and it doesn't seem to be working now, similarly to what you've experienced. I'll explain:

First of all, it doesn't seem to be performing the tests anymore with the checkPhase nullified - it jumps from the buildPhase to the installPhase right away.

Secondly, not surprisingly, installFlags contains (can be tested even in a nix-shell) $PYTHONPATH literally, meaning again a placeholder should be used. However, even with that, it fails to find the setuptools module during the installPhase. Note that I've added pythonPackages.setuptools to the checkInputs as @jonringer has suggested and $PYTHONPATH contains it (according to a nix-shell test). I've checked the value of $installFlags inside a nix-shell and it's:

PYTHONPATH=/1rz4g4znpzjwh1xymhjpm42vipw92pr73vdgl6xs1hycac8kf2n9/lib/python3.7/site-packages:/0a1l6pnmbpppch4cxsrnvz3vigh26xkarvd7khbqa1g4sb582nn9

Where's the /nix/store/ part of these paths? Why are there only two components?

I'm really tempted towards reverting back your patch.

@worldofpeace
Copy link
Contributor

worldofpeace commented Aug 6, 2019

First of all, it doesn't seem to be performing the tests anymore with the checkPhase nullified - it jumps from the buildPhase to the installPhase right away.

Have you tried doCheck = true;?
Because the phase is nulled it's going to behave how it does by default, which is that checkPhase is disabled. In buildRustPackage it's default enabled.

Secondly, not surprisingly, installFlags contains (can be tested even in a nix-shell) $PYTHONPATH literally, meaning again a placeholder should be used. However, even with that, it fails to find the setuptools module during the installPhase. Note that I've added pythonPackages.setuptools to the checkInputs as @jonringer has suggested and $PYTHONPATH contains it (according to a nix-shell test). I've checked the value of $installFlags inside a nix-shell and it's:

Then don't use installFlags? It's still unneeded to manually override phases, how about exporting the correct variables in preInstall?

Note all of this information available in the stdenv section of the nixpkgs manual should be helpful to you

@doronbehar
Copy link
Contributor Author

@worldofpeace it seems to be a good idea to export the correct variables in preInstall. I gave it a full test drive now and it builds succesfully. However, I still don't see it doing any tests, even with doCheck = true;.

@worldofpeace
Copy link
Contributor

@doronbehar When I build this and inspect nix log ./result I can see cargo test in the output.

It appears that you didn't use preInstall and you should use postPatch for patching.

diff
diff --git a/pkgs/tools/security/sequoia/default.nix b/pkgs/tools/security/sequoia/default.nix
index c1ee16f996c..4673ca18c24 100644
--- a/pkgs/tools/security/sequoia/default.nix
+++ b/pkgs/tools/security/sequoia/default.nix
@@ -53,7 +53,7 @@ rustPlatform.buildRustPackage rec {
 
   LIBCLANG_PATH = "${llvmPackages.libclang}/lib";
 
-  preConfigure = ''
+  postPatch = ''
     # otherwise, the check fails because we delete the `.git` in the unpack phase
     substituteInPlace openpgp-ffi/Makefile \
       --replace 'git grep' 'grep -R'
@@ -62,10 +62,12 @@ rustPlatform.buildRustPackage rec {
       --replace '-O0 -g -Wall -Werror' '-g'
     substituteInPlace ffi/examples/Makefile \
       --replace '-O0 -g -Wall -Werror' '-g'
-  '' + lib.optionalString pythonSupport ''
-    installFlags="PYTHONPATH=$PYTHONPATH:$out/${pythonPackages.python.sitePackages}"
+  '';
+
+  preInstall = lib.optionalString pythonSupport ''
+    export installFlags="PYTHONPATH=$PYTHONPATH:$out/${pythonPackages.python.sitePackages}"
   '' + lib.optionalString (!pythonSupport) ''
-    installFlags="PYTHON=disable"
+    export installFlags="PYTHON=disable"
   '';
 
   # Don't use buildRustPackage phases, only use it for rust deps setup

@doronbehar
Copy link
Contributor Author

With that patch applied and without it, I don't see any cargo test in the log:

@nix { "action": "setPhase", "phase": "checkPhase" }
running tests
no Makefile or custom buildPhase, doing nothing

Currently, buildPhase is not null because I've set it to make $makeFlags build-release I guess this is the reason I don't see any tests going on. Do you agree @worldofpeace that buildPhase should be overridden like this? I guess if it does, we should override checkPhase as well.

@worldofpeace
Copy link
Contributor

Currently, buildPhase is not null because I've set it to make $makeFlags build-release I guess this is the reason I don't see any tests going on. Do you agree @worldofpeace that buildPhase should be overridden like this?

I've already responded to that in #65724 (comment)
But I just realized that what we need to set is buildFlags = [ "build-release" ];, though maybe there should be a buildTarget because the name isn't semantically correct for this purpose.

The reason the checks weren't run is because the default checkPhase needs foundMakefile=1 else it prints that message you've seen. And the default buildPhase would have set this.

Updated patch that I tested
diff --git a/pkgs/tools/security/sequoia/default.nix b/pkgs/tools/security/sequoia/default.nix
index c1ee16f996c..5d9ffca6937 100644
--- a/pkgs/tools/security/sequoia/default.nix
+++ b/pkgs/tools/security/sequoia/default.nix
@@ -51,9 +51,13 @@ rustPlatform.buildRustPackage rec {
     "PREFIX=${placeholder ''out''}"
   ];
 
+  buildFlags = [
+    "build-release"
+  ];
+
   LIBCLANG_PATH = "${llvmPackages.libclang}/lib";
 
-  preConfigure = ''
+  postPatch = ''
     # otherwise, the check fails because we delete the `.git` in the unpack phase
     substituteInPlace openpgp-ffi/Makefile \
       --replace 'git grep' 'grep -R'
@@ -62,17 +66,17 @@ rustPlatform.buildRustPackage rec {
       --replace '-O0 -g -Wall -Werror' '-g'
     substituteInPlace ffi/examples/Makefile \
       --replace '-O0 -g -Wall -Werror' '-g'
-  '' + lib.optionalString pythonSupport ''
-    installFlags="PYTHONPATH=$PYTHONPATH:$out/${pythonPackages.python.sitePackages}"
+  '';
+
+  preInstall = lib.optionalString pythonSupport ''
+    export installFlags="PYTHONPATH=$PYTHONPATH:$out/${pythonPackages.python.sitePackages}"
   '' + lib.optionalString (!pythonSupport) ''
-    installFlags="PYTHON=disable"
+    export installFlags="PYTHON=disable"
   '';
 
   # Don't use buildRustPackage phases, only use it for rust deps setup
   configurePhase = null;
-  buildPhase = ''
-    make $makeFlags build-release
-  '';
+  buildPhase = null;
   doCheck = true;
   checkPhase = null;
   installPhase = null;

@doronbehar
Copy link
Contributor Author

doronbehar commented Aug 7, 2019

Thanks for the thorough clarification and for the patch. I've almost figured it out after reading the docs and the source code of setup.sh but I wasn't sure.

With that patch applied, and now pushed, and since you've tested that yourself (BTW thanks for investing once more computing power into this) can we please merge now?

EDIT: What say you @worldofpeace?

@worldofpeace
Copy link
Contributor

With that patch applied, and now pushed, and since you've tested that yourself (BTW thanks for investing once more computing power into this) can we please merge now?
EDIT: What say you @worldofpeace?

I think you might have seen my comment mid composition.
You'll have to be patient with me as I've had many submissions to review, so I had to circle back to complete it.

I'm thinking there's only one more issue, this needs to be a split package/multiple output derivation.
Mostly because @minijackson made it clear there's a commodity for just the sequoia-pgp package.

Please see the nixpkgs manual on this subject

and I'd recommend trying to figure out the appropriate outputs by examining the already built output of the current expression.

@FRidh
Copy link
Member

FRidh commented Aug 12, 2019

Multiple outputs may be a nice extra, but should not be immediately required.

@worldofpeace
Copy link
Contributor

Multiple outputs may be a nice extra, but should not be immediately required.

Indeed, feel free to merge this as you see fit.
(don't think the commit title is correct btw)

@doronbehar
Copy link
Contributor Author

I tried to use the following outputs:

  outputs = [ "out" "bin" "dev" "lib" ];

And it failed with the following log at the fixup phase:

post-installation fixup
Moving /nix/store/kwwn2m1bwfjzh4afj9jagk2ddb7i4pnz-sequoia-0.9.0/include to /nix/store/dkkxphl0dim1hjim2la972v97nka3fmy-sequoia-0.9.0-dev/include
rmdir: failed to remove '/nix/store/kwwn2m1bwfjzh4afj9jagk2ddb7i4pnz-sequoia-0.9.0': Directory not empty
Moving /nix/store/kwwn2m1bwfjzh4afj9jagk2ddb7i4pnz-sequoia-0.9.0/share/pkgconfig to /nix/store/dkkxphl0dim1hjim2la972v97nka3fmy-sequoia-0.9.0-dev/share/pkgconfig
rmdir: failed to remove '/nix/store/kwwn2m1bwfjzh4afj9jagk2ddb7i4pnz-sequoia-0.9.0/share': Directory not empty
Patching '/nix/store/dkkxphl0dim1hjim2la972v97nka3fmy-sequoia-0.9.0-dev/share/pkgconfig/sequoia-openpgp.pc' includedir to output /nix/store/dkkxphl0dim1hjim2la972v97nka3fmy-sequoia-0.9.0-dev
Patching '/nix/store/dkkxphl0dim1hjim2la972v97nka3fmy-sequoia-0.9.0-dev/share/pkgconfig/sequoia.pc' includedir to output /nix/store/dkkxphl0dim1hjim2la972v97nka3fmy-sequoia-0.9.0-dev
shrinking RPATHs of ELF executables and libraries in /nix/store/kwwn2m1bwfjzh4afj9jagk2ddb7i4pnz-sequoia-0.9.0
shrinking /nix/store/kwwn2m1bwfjzh4afj9jagk2ddb7i4pnz-sequoia-0.9.0/lib/sequoia/sequoia-public-key-store
shrinking /nix/store/kwwn2m1bwfjzh4afj9jagk2ddb7i4pnz-sequoia-0.9.0/lib/libsequoia_openpgp_ffi.so.0.9.0
shrinking /nix/store/kwwn2m1bwfjzh4afj9jagk2ddb7i4pnz-sequoia-0.9.0/lib/libsequoia_ffi.so.0.9.0
shrinking /nix/store/kwwn2m1bwfjzh4afj9jagk2ddb7i4pnz-sequoia-0.9.0/lib/python3.7/site-packages/sequoia-0.1.0-py3.7-linux-x86_64.egg/_sequoia.abi3.so
shrinking /nix/store/kwwn2m1bwfjzh4afj9jagk2ddb7i4pnz-sequoia-0.9.0/bin/sq
shrinking /nix/store/kwwn2m1bwfjzh4afj9jagk2ddb7i4pnz-sequoia-0.9.0/bin/sqv
strip is /nix/store/mgdjnsrkqgmxqjaqaxgqyqm7fwyi96fk-binutils-2.31.1/bin/strip
stripping (with command strip and flags -S) in /nix/store/kwwn2m1bwfjzh4afj9jagk2ddb7i4pnz-sequoia-0.9.0/lib  /nix/store/kwwn2m1bwfjzh4afj9jagk2ddb7i4pnz-sequoia-0.9.0/bin
patching script interpreter paths in /nix/store/kwwn2m1bwfjzh4afj9jagk2ddb7i4pnz-sequoia-0.9.0
checking for references to /build/ in /nix/store/kwwn2m1bwfjzh4afj9jagk2ddb7i4pnz-sequoia-0.9.0...
strip is /nix/store/mgdjnsrkqgmxqjaqaxgqyqm7fwyi96fk-binutils-2.31.1/bin/strip
shrinking RPATHs of ELF executables and libraries in /nix/store/dkkxphl0dim1hjim2la972v97nka3fmy-sequoia-0.9.0-dev
strip is /nix/store/mgdjnsrkqgmxqjaqaxgqyqm7fwyi96fk-binutils-2.31.1/bin/strip
patching script interpreter paths in /nix/store/dkkxphl0dim1hjim2la972v97nka3fmy-sequoia-0.9.0-dev
checking for references to /build/ in /nix/store/dkkxphl0dim1hjim2la972v97nka3fmy-sequoia-0.9.0-dev...
strip is /nix/store/mgdjnsrkqgmxqjaqaxgqyqm7fwyi96fk-binutils-2.31.1/bin/strip
pytestcachePhase
builder for '/nix/store/168kvccw60h84g8d96lri2nvqnxjr8zx-sequoia-0.9.0.drv' failed to produce output path '/nix/store/aq7d4cz1vz6b7as24rnjlnahgqnxhh89-sequoia-0.9.0-bin'
error: build of '/nix/store/168kvccw60h84g8d96lri2nvqnxjr8zx-sequoia-0.9.0.drv' failed

I agree we should try to split the outputs. But even using only the outputs "out" "bin" "dev" is failing similarly:

post-installation fixup
Moving /nix/store/y60gs9d4zqpqk2rblg47ggd006sbzan5-sequoia-0.9.0/include to /nix/store/1hvm49pdcnq38fa4kxhrbls3bzm5hxhg-sequoia-0.9.0-dev/include
rmdir: failed to remove '/nix/store/y60gs9d4zqpqk2rblg47ggd006sbzan5-sequoia-0.9.0': Directory not empty
Moving /nix/store/y60gs9d4zqpqk2rblg47ggd006sbzan5-sequoia-0.9.0/share/pkgconfig to /nix/store/1hvm49pdcnq38fa4kxhrbls3bzm5hxhg-sequoia-0.9.0-dev/share/pkgconfig
rmdir: failed to remove '/nix/store/y60gs9d4zqpqk2rblg47ggd006sbzan5-sequoia-0.9.0/share': Directory not empty
Patching '/nix/store/1hvm49pdcnq38fa4kxhrbls3bzm5hxhg-sequoia-0.9.0-dev/share/pkgconfig/sequoia-openpgp.pc' includedir to output /nix/store/1hvm49pdcnq38fa4kxhrbls3bzm5hxhg-sequoia-0.9.0-dev
Patching '/nix/store/1hvm49pdcnq38fa4kxhrbls3bzm5hxhg-sequoia-0.9.0-dev/share/pkgconfig/sequoia.pc' includedir to output /nix/store/1hvm49pdcnq38fa4kxhrbls3bzm5hxhg-sequoia-0.9.0-dev
shrinking RPATHs of ELF executables and libraries in /nix/store/y60gs9d4zqpqk2rblg47ggd006sbzan5-sequoia-0.9.0
shrinking /nix/store/y60gs9d4zqpqk2rblg47ggd006sbzan5-sequoia-0.9.0/lib/sequoia/sequoia-public-key-store
shrinking /nix/store/y60gs9d4zqpqk2rblg47ggd006sbzan5-sequoia-0.9.0/lib/libsequoia_openpgp_ffi.so.0.9.0
shrinking /nix/store/y60gs9d4zqpqk2rblg47ggd006sbzan5-sequoia-0.9.0/lib/libsequoia_ffi.so.0.9.0
shrinking /nix/store/y60gs9d4zqpqk2rblg47ggd006sbzan5-sequoia-0.9.0/lib/python3.7/site-packages/sequoia-0.1.0-py3.7-linux-x86_64.egg/_sequoia.abi3.so
shrinking /nix/store/y60gs9d4zqpqk2rblg47ggd006sbzan5-sequoia-0.9.0/bin/sq
shrinking /nix/store/y60gs9d4zqpqk2rblg47ggd006sbzan5-sequoia-0.9.0/bin/sqv
strip is /nix/store/mgdjnsrkqgmxqjaqaxgqyqm7fwyi96fk-binutils-2.31.1/bin/strip
stripping (with command strip and flags -S) in /nix/store/y60gs9d4zqpqk2rblg47ggd006sbzan5-sequoia-0.9.0/lib  /nix/store/y60gs9d4zqpqk2rblg47ggd006sbzan5-sequoia-0.9.0/bin
patching script interpreter paths in /nix/store/y60gs9d4zqpqk2rblg47ggd006sbzan5-sequoia-0.9.0
checking for references to /build/ in /nix/store/y60gs9d4zqpqk2rblg47ggd006sbzan5-sequoia-0.9.0...
strip is /nix/store/mgdjnsrkqgmxqjaqaxgqyqm7fwyi96fk-binutils-2.31.1/bin/strip
shrinking RPATHs of ELF executables and libraries in /nix/store/1hvm49pdcnq38fa4kxhrbls3bzm5hxhg-sequoia-0.9.0-dev
strip is /nix/store/mgdjnsrkqgmxqjaqaxgqyqm7fwyi96fk-binutils-2.31.1/bin/strip
patching script interpreter paths in /nix/store/1hvm49pdcnq38fa4kxhrbls3bzm5hxhg-sequoia-0.9.0-dev
checking for references to /build/ in /nix/store/1hvm49pdcnq38fa4kxhrbls3bzm5hxhg-sequoia-0.9.0-dev...
pytestcachePhase
builder for '/nix/store/7z2jsps4402m4n7bapjgmpqq573wa0vb-sequoia-0.9.0.drv' failed to produce output path '/nix/store/k5yln88kp27105hp8fhly1nvxba4h90n-sequoia-0.9.0-bin'
error: build of '/nix/store/7z2jsps4402m4n7bapjgmpqq573wa0vb-sequoia-0.9.0.drv' failed

I couldn't figure out yet exactly where's the failure..

Would you be willing to merge this only if the outputs are split? Would it be OK if I'd totally drop the use of standard pkgs/build-support/setup-hooks/multiple-outputs.sh. If so, then should I just use my own fixupPhase? Or perhaps I can get away with using preFixup?

@doronbehar
Copy link
Contributor Author

@worldofpeace

Indeed, feel free to merge this as you see fit.
(don't think the commit title is correct btw)

Would you like something more like: sequoia: 0.9.0 -> 0.9.0 (improved)?


# Don't use buildRustPackage phases, only use it for rust deps setup
configurePhase = null;
buildPhase = null;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you will probably want to use the doXXX options instead

Suggested change
buildPhase = null;
doBuild = false;

"PREFIX=${placeholder ''out''}"
];

buildFlags = [
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you're skipping the build phase now, does this even get used?

'';

preInstall = lib.optionalString pythonSupport ''
export installFlags="PYTHONPATH=$PYTHONPATH:$out/${pythonPackages.python.sitePackages}"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

prevent override other flags

Suggested change
export installFlags="PYTHONPATH=$PYTHONPATH:$out/${pythonPackages.python.sitePackages}"
export installFlags="PYTHONPATH=$PYTHONPATH:$out/${pythonPackages.python.sitePackages} ${installFlags}"

@jonringer
Copy link
Contributor

jonringer commented Aug 13, 2019

you may want to try:
[ "bin" "out" "dev" "lib" ]
as the first output is what gets defaulted when people call the derivation.

also, the build will fail if nothing gets put on a given path, which is why bin fails, there's not executable being moved there, so it's empty, and fails.

if the build is having trouble placing something, then i would suggest doing:

postInstall = ''
  install -Dm755 path/to/built/binary -t $bin/bin
'';

The easier option would be to remove the bin output altogether, although less "correct", it would probably fix a lot of your issues. [ "out" "dev" "lib" ]

The benefits will probably be marginal at that point though, because the executables in out will most likely need the lib closure (which is typically the largest). The dev closure will probably just have headers, pkgconfig info, a may a few other things, so it will be significantly smaller, but not significant in practice.

@doronbehar
Copy link
Contributor Author

Thanks for the suggestions @jonringer. I'll address the points you've made in the review there.

As for the outptus issue, do you by any chance can predict (I don't want to go into another build before I'm more confident) if the ZSH and Bash completion will be available in the (default) "out" output?

Also, the executables don't depend on the .so libraries in $out/lib/. I've checked that with ldd in the previous (successful) compilations which hadn't had multiple outputs. If so, while hopping they won't be included in the "out" output, do you the completions should arrive at "lib"?

While reading pkgs/build-support/setup-hooks/multiple-outputs.sh, I couldn't figure out how is the lib output is handled.. There are the functions _multioutDocs and _multioutDevs which I understand but there is no _multioutLibs.

Does this line:

# so-libs are often among the main things to keep, and so go to $out
_overrideFirst outputLib "lib" "out"

mean that it's just always moved to "out"?

@worldofpeace
Copy link
Contributor

I don't think we should change anything else.

I can merge this manually.

- Add the package to the pythonPackages' attribute set.

- Make the python support overrideable
  We use the pythonSupport argument.

- Rename sequoia-tool -> sequoia
  We provide the whole ecosystem which includes:
    * ffi bindings to Python and C
    * zsh and bash completion for `sq` and `sqv` executables.

- Meta:
  * Use a string as the homepage URL (plain URLs are deprecated).
  * Change description of package to fit upstream and the files we
    actually install.
  * Add @doronbehar as maintainer.
@doronbehar
Copy link
Contributor Author

Thanks @worldofpeace ! Finally... 😌.

@doronbehar doronbehar mentioned this pull request Aug 24, 2019
10 tasks
@doronbehar doronbehar mentioned this pull request Sep 19, 2019
10 tasks
@doronbehar doronbehar deleted the improve-sequoia branch March 2, 2023 10:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants