From 85c6ec2fe3163678134d22c8d77dacd9e7608782 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 5 Jan 2025 22:13:47 +0100 Subject: [PATCH 1/4] keyscope: 1.3.0 -> 1.4.0 Diff: https://github.com/spectralops/keyscope/compare/refs/tags/v1.3.0...v1.4.0 Changelog: https://github.com/spectralops/keyscope/blob/v1.4.0/CHANGELOG.md --- pkgs/tools/security/keyscope/default.nix | 25 +++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/pkgs/tools/security/keyscope/default.nix b/pkgs/tools/security/keyscope/default.nix index 06b343a5064e7..c1f037199e5bd 100644 --- a/pkgs/tools/security/keyscope/default.nix +++ b/pkgs/tools/security/keyscope/default.nix @@ -1,28 +1,28 @@ { lib, - rustPlatform, - fetchFromGitHub, - pkg-config, - openssl, - stdenv, DiskArbitration, + fetchFromGitHub, Foundation, IOKit, + openssl, + pkg-config, + rustPlatform, Security, + stdenv, }: rustPlatform.buildRustPackage rec { pname = "keyscope"; - version = "1.3.0"; + version = "1.4.0"; src = fetchFromGitHub { owner = "spectralops"; - repo = pname; - rev = "v${version}"; - sha256 = "sha256-SrBtgirg52q7gM3GZsJsV8ASACvb4sYv5HDbyItpjbk="; + repo = "keyscope"; + tag = "v${version}"; + hash = "sha256-2DhKiQixhTCQD/SYIQa+o1kzEsslu6wAReuWr0rTrH8="; }; - cargoHash = "sha256-MFP3AqlfaclmZxRwaWFw6hsZwCQMRKJEyFEyUN+QLqo="; + cargoHash = "sha256-01Q5qCH0VIdO9dpcZxp8wbSjeON9N2C+0qa/2CvMHrc="; nativeBuildInputs = [ pkg-config ]; @@ -42,12 +42,15 @@ rustPlatform.buildRustPackage rec { VERGEN_GIT_SEMVER = "v${version}"; + # Test require network access + doCheck = false; + meta = with lib; { description = "Key and secret workflow (validation, invalidation, etc.) tool"; - mainProgram = "keyscope"; homepage = "https://github.com/spectralops/keyscope"; changelog = "https://github.com/spectralops/keyscope/blob/v${version}/CHANGELOG.md"; license = licenses.asl20; maintainers = with maintainers; [ figsoda ]; + mainProgram = "keyscope"; }; } From f9592494be1221739c3f3fbc98f65d28a585b293 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 10 Jan 2025 10:19:10 +0100 Subject: [PATCH 2/4] keyscope: remove with lib; --- pkgs/tools/security/keyscope/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/tools/security/keyscope/default.nix b/pkgs/tools/security/keyscope/default.nix index c1f037199e5bd..182f41d0317fe 100644 --- a/pkgs/tools/security/keyscope/default.nix +++ b/pkgs/tools/security/keyscope/default.nix @@ -45,12 +45,12 @@ rustPlatform.buildRustPackage rec { # Test require network access doCheck = false; - meta = with lib; { + meta = { description = "Key and secret workflow (validation, invalidation, etc.) tool"; homepage = "https://github.com/spectralops/keyscope"; changelog = "https://github.com/spectralops/keyscope/blob/v${version}/CHANGELOG.md"; - license = licenses.asl20; - maintainers = with maintainers; [ figsoda ]; + license = lib.licenses.asl20; + maintainers = with lib.maintainers; [ figsoda ]; mainProgram = "keyscope"; }; } From 617d6a5f7a0d74f4ce4176205d017c2a033ac284 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 10 Jan 2025 10:21:31 +0100 Subject: [PATCH 3/4] keyscope: add passthru.updateScript --- pkgs/tools/security/keyscope/default.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/tools/security/keyscope/default.nix b/pkgs/tools/security/keyscope/default.nix index 182f41d0317fe..32f9fa842302e 100644 --- a/pkgs/tools/security/keyscope/default.nix +++ b/pkgs/tools/security/keyscope/default.nix @@ -3,6 +3,7 @@ DiskArbitration, fetchFromGitHub, Foundation, + gitUpdater, IOKit, openssl, pkg-config, @@ -45,6 +46,8 @@ rustPlatform.buildRustPackage rec { # Test require network access doCheck = false; + passthru.updateScript = gitUpdater { }; + meta = { description = "Key and secret workflow (validation, invalidation, etc.) tool"; homepage = "https://github.com/spectralops/keyscope"; From af7ff9f279aac67d6995764a1935c4d3540360eb Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 10 Jan 2025 10:54:47 +0100 Subject: [PATCH 4/4] keyscope: migrate to pkgs/by-name --- .../ke/keyscope/package.nix} | 14 +------------- pkgs/top-level/all-packages.nix | 4 ---- 2 files changed, 1 insertion(+), 17 deletions(-) rename pkgs/{tools/security/keyscope/default.nix => by-name/ke/keyscope/package.nix} (82%) diff --git a/pkgs/tools/security/keyscope/default.nix b/pkgs/by-name/ke/keyscope/package.nix similarity index 82% rename from pkgs/tools/security/keyscope/default.nix rename to pkgs/by-name/ke/keyscope/package.nix index 32f9fa842302e..35cc09b98f718 100644 --- a/pkgs/tools/security/keyscope/default.nix +++ b/pkgs/by-name/ke/keyscope/package.nix @@ -1,15 +1,10 @@ { lib, - DiskArbitration, fetchFromGitHub, - Foundation, gitUpdater, - IOKit, openssl, pkg-config, rustPlatform, - Security, - stdenv, }: rustPlatform.buildRustPackage rec { @@ -27,14 +22,7 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ pkg-config ]; - buildInputs = - [ openssl ] - ++ lib.optionals stdenv.hostPlatform.isDarwin [ - DiskArbitration - Foundation - IOKit - Security - ]; + buildInputs = [ openssl ]; # build script tries to get information from git postPatch = '' diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 3327d4a79f0b9..fa376aafbd962 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3907,10 +3907,6 @@ with pkgs; keybase-gui = callPackage ../tools/security/keybase/gui.nix { }; - keyscope = callPackage ../tools/security/keyscope { - inherit (darwin.apple_sdk.frameworks) DiskArbitration Foundation IOKit Security; - }; - keystore-explorer = callPackage ../applications/misc/keystore-explorer { jdk = jdk11; };