diff --git a/pkgs/tools/security/notary/default.nix b/pkgs/by-name/no/notary/package.nix similarity index 58% rename from pkgs/tools/security/notary/default.nix rename to pkgs/by-name/no/notary/package.nix index be147369ffe2..1f35222ee960 100644 --- a/pkgs/tools/security/notary/default.nix +++ b/pkgs/by-name/no/notary/package.nix @@ -1,41 +1,32 @@ -{ lib, fetchFromGitHub, buildGoPackage, libtool }: - -buildGoPackage rec { +{ lib +, fetchFromGitHub +, buildGoModule +}: +buildGoModule rec { pname = "notary"; - version = "0.6.1"; - gitcommit = "d6e1431f"; + version = "0.6.1-unstable-2024-04-16"; src = fetchFromGitHub { - owner = "theupdateframework"; + owner = "notaryproject"; repo = "notary"; - rev = "v${version}"; - sha256 = "1ak9dk6vjny5069hp3w36dbjawcnaq82l3i2qvf7mn7zfglbsnf9"; + rev = "9d2b3b35929392c9945d976b8bdecbe2f53a299e"; + sha256 = "sha256-u19BfTJwRWholK0b3BcgSmcMM9AR7OeXo64AOi87r0A="; }; - patches = [ ./no-git-usage.patch ]; + vendorHash = null; - buildInputs = [ libtool ]; - buildPhase = '' - runHook preBuild - cd go/src/github.com/theupdateframework/notary - SKIPENVCHECK=1 make client GITCOMMIT=${gitcommit} - runHook postBuild - ''; + tags = [ + "pkcs11" + ]; - goPackagePath = "github.com/theupdateframework/notary"; + ldflags = [ + "-X github.com/theupdateframework/notary/version.NotaryVersion=${version}" + ]; - installPhase = '' - runHook preInstall - install -D bin/notary $out/bin/notary - runHook postInstall - ''; + # Tests try to use network. + doCheck = false; - #doCheck = true; # broken by tzdata: 2018g -> 2019a - checkPhase = '' - make test PKGS=github.com/theupdateframework/notary/cmd/notary - ''; - - meta = with lib; { + meta = { description = "Project that allows anyone to have trust over arbitrary collections of data"; mainProgram = "notary"; longDescription = '' @@ -58,9 +49,9 @@ buildGoPackage rec { relying only on the publisher's key to determine the validity and integrity of the received content. ''; - license = licenses.asl20; + license = lib.licenses.asl20; homepage = "https://github.com/theupdateframework/notary"; - maintainers = with maintainers; [ vdemeester ]; - platforms = platforms.unix; + maintainers = [ lib.maintainers.vdemeester ]; + platforms = lib.platforms.unix; }; } diff --git a/pkgs/tools/security/notary/no-git-usage.patch b/pkgs/tools/security/notary/no-git-usage.patch deleted file mode 100644 index 363eefe36921..000000000000 --- a/pkgs/tools/security/notary/no-git-usage.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff --git a/Makefile b/Makefile -index ab794165..0cbd047f 100644 ---- a/Makefile -+++ b/Makefile -@@ -5,8 +5,8 @@ PREFIX?=$(shell pwd) - # Add to compile time flags - NOTARY_PKG := github.com/theupdateframework/notary - NOTARY_VERSION := $(shell cat NOTARY_VERSION) --GITCOMMIT := $(shell git rev-parse --short HEAD) --GITUNTRACKEDCHANGES := $(shell git status --porcelain --untracked-files=no) -+GITCOMMIT ?= $(shell git rev-parse --short HEAD) -+GITUNTRACKEDCHANGES := - ifneq ($(GITUNTRACKEDCHANGES),) - GITCOMMIT := $(GITCOMMIT)-dirty - endif diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 1068f2ed4f21..deea39bc7416 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -11062,8 +11062,6 @@ with pkgs; noisetorch = callPackage ../applications/audio/noisetorch { }; - notary = callPackage ../tools/security/notary { }; - notation = callPackage ../tools/security/notation { }; notify-osd = callPackage ../applications/misc/notify-osd { };