tpm2-openssl: init at 1.2.0#299626
Conversation
philiptaron
left a comment
There was a problem hiding this comment.
I tested it out and it does indeed work as expected.
I have a few suggestions and comments.
thillux
left a comment
There was a problem hiding this comment.
Please use a recursive attribute set instead of finalAttrs and reformat afterwards. See the attached patch for reference. Otherwise LGTM.
diff --git a/pkgs/by-name/tp/tpm2-openssl/package.nix b/pkgs/by-name/tp/tpm2-openssl/package.nix
index a3cce7058653..1a0d6454a3e2 100644
--- a/pkgs/by-name/tp/tpm2-openssl/package.nix
+++ b/pkgs/by-name/tp/tpm2-openssl/package.nix
@@ -6,16 +6,16 @@
, pkg-config
, openssl
, tpm2-tss
-,
}:
-stdenv.mkDerivation (
- finalAttrs: {
+
+stdenv.mkDerivation rec {
pname = "tpm2-openssl";
version = "1.2.0";
+
src = fetchFromGitHub {
owner = "tpm2-software";
repo = "tpm2-openssl";
- rev = finalAttrs.version;
+ rev = version;
hash = "sha256-mZ4Z/GxJFwwfyFd1SAiVlQqOjkFSzsZePeuEZtq8Mcg=";
};
@@ -37,7 +37,7 @@ stdenv.mkDerivation (
'';
prePatch = ''
- echo ${finalAttrs.version} > VERSION
+ echo ${version} > VERSION
'';
meta = with lib; {
@@ -47,5 +47,4 @@ stdenv.mkDerivation (
maintainers = with maintainers; [ stv0g ];
platforms = platforms.linux;
};
- }
-)
+}
Thanks for the review :) I am wondering, why is using |
|
#119942 and #293452 and this tip on nix.dev suggest we're broadly abandoning |
Fair, I informed myself about this (thanks @WilliButz). Never mind my comments :) |
|
Result of 1 package failed to build:
|
|
Okay, I found the issue. It was broken by this recommendation by @SuperSandro2000 Environment variables are not substituted in --- configureFlags = [ "--with-modulesdir=$out/lib/ossl-modules" ];
+++ configureFlags = [ "--with-modulesdir=$$out/lib/ossl-modules" ];I've seen that this is handled quite inconsistently in Nixpkgs. Some packages are using the escaping with I will draft another PR to align this tree-wide. |
|
I think you could also use $(out) |
Description of changes
This PR packages tpm2-openssl an OpenSSL Provider for TPM2 integration.
Tested with:
Things done
nix.conf? (See Nix manual)sandbox = relaxedsandbox = truenix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)Add a 👍 reaction to pull requests you find important.