From 00fe0bdb8508bf1a0b691c39120f3b3c474c97b5 Mon Sep 17 00:00:00 2001 From: Matteo Pacini Date: Thu, 7 Nov 2024 14:15:07 +0000 Subject: [PATCH 1/3] jitterentropy: switch to cmake build, darwin support --- .../libraries/jitterentropy/default.nix | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/pkgs/development/libraries/jitterentropy/default.nix b/pkgs/development/libraries/jitterentropy/default.nix index 3e5656ba7874..34c98c50156f 100644 --- a/pkgs/development/libraries/jitterentropy/default.nix +++ b/pkgs/development/libraries/jitterentropy/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchFromGitHub }: +{ lib, stdenv, cmake, fetchFromGitHub }: stdenv.mkDerivation rec { pname = "jitterentropy"; @@ -11,24 +11,18 @@ stdenv.mkDerivation rec { hash = "sha256-CPvgc/W5Z2OfbP9Lp2tQevUQZr+xlh6q5r5Fp2WUHhg="; }; + nativeBuildInputs = [ cmake ]; + outputs = [ "out" "dev" ]; - enableParallelBuilding = true; hardeningDisable = [ "fortify" ]; # avoid warnings - # prevent jitterentropy from builtin strip to allow controlling this from the derivation's - # settings. Also fixes a strange issue, where this strip may fail when cross-compiling. - installFlags = [ - "INSTALL_STRIP=install" - "PREFIX=${placeholder "out"}" - ]; - meta = with lib; { description = "Provides a noise source using the CPU execution timing jitter"; homepage = "https://github.com/smuellerDD/jitterentropy-library"; changelog = "https://github.com/smuellerDD/jitterentropy-library/raw/v${version}/CHANGES.md"; license = with licenses; [ bsd3 /* OR */ gpl2Only ]; - platforms = platforms.linux; + platforms = platforms.linux ++ platforms.darwin; maintainers = with maintainers; [ johnazoidberg c0bw3b ]; }; } From 11e673bad0fa6ddfefe29ef5ce5dff85b7482c8c Mon Sep 17 00:00:00 2001 From: Matteo Pacini Date: Thu, 7 Nov 2024 14:15:52 +0000 Subject: [PATCH 2/3] jitterentropy: with lib; cleanup --- pkgs/development/libraries/jitterentropy/default.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/development/libraries/jitterentropy/default.nix b/pkgs/development/libraries/jitterentropy/default.nix index 34c98c50156f..19bf10bdefc5 100644 --- a/pkgs/development/libraries/jitterentropy/default.nix +++ b/pkgs/development/libraries/jitterentropy/default.nix @@ -17,12 +17,12 @@ stdenv.mkDerivation rec { hardeningDisable = [ "fortify" ]; # avoid warnings - meta = with lib; { + meta = { description = "Provides a noise source using the CPU execution timing jitter"; homepage = "https://github.com/smuellerDD/jitterentropy-library"; changelog = "https://github.com/smuellerDD/jitterentropy-library/raw/v${version}/CHANGES.md"; - license = with licenses; [ bsd3 /* OR */ gpl2Only ]; - platforms = platforms.linux ++ platforms.darwin; - maintainers = with maintainers; [ johnazoidberg c0bw3b ]; + license = with lib.licenses; [ bsd3 /* OR */ gpl2Only ]; + platforms = lib.platforms.linux ++ lib.platforms.darwin; + maintainers = with lib.maintainers; [ johnazoidberg c0bw3b ]; }; } From 15137429e65996cf3870ec58fc0c545f5b7d8f80 Mon Sep 17 00:00:00 2001 From: Matteo Pacini Date: Thu, 7 Nov 2024 14:16:11 +0000 Subject: [PATCH 3/3] jitterentropy: rfc format --- .../libraries/jitterentropy/default.nix | 22 +++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/pkgs/development/libraries/jitterentropy/default.nix b/pkgs/development/libraries/jitterentropy/default.nix index 19bf10bdefc5..db1acb1728f9 100644 --- a/pkgs/development/libraries/jitterentropy/default.nix +++ b/pkgs/development/libraries/jitterentropy/default.nix @@ -1,4 +1,9 @@ -{ lib, stdenv, cmake, fetchFromGitHub }: +{ + lib, + stdenv, + cmake, + fetchFromGitHub, +}: stdenv.mkDerivation rec { pname = "jitterentropy"; @@ -13,7 +18,10 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake ]; - outputs = [ "out" "dev" ]; + outputs = [ + "out" + "dev" + ]; hardeningDisable = [ "fortify" ]; # avoid warnings @@ -21,8 +29,14 @@ stdenv.mkDerivation rec { description = "Provides a noise source using the CPU execution timing jitter"; homepage = "https://github.com/smuellerDD/jitterentropy-library"; changelog = "https://github.com/smuellerDD/jitterentropy-library/raw/v${version}/CHANGES.md"; - license = with lib.licenses; [ bsd3 /* OR */ gpl2Only ]; + license = with lib.licenses; [ + bsd3 # OR + gpl2Only + ]; platforms = lib.platforms.linux ++ lib.platforms.darwin; - maintainers = with lib.maintainers; [ johnazoidberg c0bw3b ]; + maintainers = with lib.maintainers; [ + johnazoidberg + c0bw3b + ]; }; }