From d1b6f8042ac4b2c1bc04270323a1fc2cd9c6659c Mon Sep 17 00:00:00 2001 From: kyehn Date: Mon, 29 Sep 2025 11:30:33 +0800 Subject: [PATCH] seaweedfs: 3.94 -> 3.97 Diff: https://github.com/seaweedfs/seaweedfs/compare/3.94...3.97 --- pkgs/by-name/se/seaweedfs/package.nix | 37 +++++++++++++++++---------- 1 file changed, 24 insertions(+), 13 deletions(-) diff --git a/pkgs/by-name/se/seaweedfs/package.nix b/pkgs/by-name/se/seaweedfs/package.nix index 1e3ced96b2a8..657e512b5a20 100644 --- a/pkgs/by-name/se/seaweedfs/package.nix +++ b/pkgs/by-name/se/seaweedfs/package.nix @@ -1,23 +1,28 @@ { lib, - fetchFromGitHub, + stdenv, buildGoModule, + fetchFromGitHub, + libredirect, + iana-etc, testers, seaweedfs, }: -buildGoModule rec { +buildGoModule (finalAttrs: { pname = "seaweedfs"; - version = "3.94"; + version = "3.97"; src = fetchFromGitHub { owner = "seaweedfs"; repo = "seaweedfs"; - rev = version; - hash = "sha256-d8N9py3khwjg/tRyKUfImLy1CwtjoDvWzQB6F+tM5kQ="; + tag = finalAttrs.version; + hash = "sha256-h8pyjC/hbKfvt4hEKuq0v5osLMWNU+6mYqFGqsZFqXs="; }; - vendorHash = "sha256-WURNRNjUylLsf3+AMfb48VHbqfiPIT0lPmLfNjWphSU="; + vendorHash = "sha256-KRO0aDGOVx1neXcGsYYqcpD0tAqtR3GSBDhFz5TbQBs="; + + nativeBuildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ libredirect.hook ]; subPackages = [ "weed" ]; @@ -42,25 +47,31 @@ buildGoModule rec { preCheck = '' # Test all targets. unset subPackages - - # Remove unmaintained tests ahd those that require additional services. - rm -rf unmaintained test/s3 + # Remove unmaintained tests and those that require additional services. + rm -rf unmaintained test/s3 test/fuse_integration + # TestECEncodingVolumeLocationTimingBug, TestECEncodingMasterTimingRaceCondition: weed binary not found + export PATH=$PATH:$NIX_BUILD_TOP/go/bin + '' + + lib.optionalString stdenv.hostPlatform.isDarwin '' + export NIX_REDIRECTS=/etc/protocols=${iana-etc}/etc/protocols:/etc/services=${iana-etc}/etc/services ''; + __darwinAllowLocalNetworking = true; + passthru.tests.version = testers.testVersion { package = seaweedfs; command = "weed version"; }; - meta = with lib; { + meta = { description = "Simple and highly scalable distributed file system"; homepage = "https://github.com/chrislusf/seaweedfs"; - maintainers = with maintainers; [ + maintainers = with lib.maintainers; [ azahi cmacrae wozeparrot ]; mainProgram = "weed"; - license = licenses.asl20; + license = lib.licenses.asl20; }; -} +})