nixpkgs/pkgs/by-name/re/reg/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

43 lines
1.2 KiB
Nix

{ lib
, fetchpatch
, fetchFromGitHub
, buildGoModule
}:
buildGoModule rec {
pname = "reg";
version = "0.16.1";
src = fetchFromGitHub {
owner = "genuinetools";
repo = "reg";
rev = "v${version}";
hash = "sha256-tfBetjoJkr84XLEEcfdRTtc0UZ4m/uRH1Fpr91lQn8o=";
};
patches = [
# https://github.com/genuinetools/reg/pull/218
(fetchpatch {
name = "update-x-sys-for-go-1.18-on-aarch64-darwin.patch";
url = "https://github.com/genuinetools/reg/commit/f37b04ad8be47f1e68ef9b2c5906324d7096231e.patch";
hash = "sha256-wmBjPdrpNpxx//I+d+k8DNR11TmyXxb84vXR/MrYHKA=";
})
(fetchpatch {
name = "update-vendored-dependencies.patch";
url = "https://github.com/genuinetools/reg/commit/8bb04bc3fd41c089716e65ee905c6feac8bda5a0.patch";
hash = "sha256-5nZaayy0xu7sOJHVCp6AotINiF7vXk2Jic8SR8ZrH/g=";
})
];
vendorHash = null;
doCheck = false;
meta = with lib; {
description = "Docker registry v2 command line client and repo listing generator with security checks";
homepage = "https://github.com/genuinetools/reg";
license = licenses.mit;
maintainers = with maintainers; [ ereslibre ];
mainProgram = "reg";
};
}