mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-17 07:13:23 +01:00
seaweedfs: add version check passthru.tests
passthru.tests instead of installCheckPhase as recommended in https://github.com/ryantm/nixpkgs-update/issues/260#issuecomment-821287971 Inspired by https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/science/logic/key/default.nix#L54-L57 This is basically the extent of testing I usually do when an upgrade is proposed, so this takes that manual step away.
This commit is contained in:
parent
267761cf44
commit
e424c9118b
1 changed files with 11 additions and 1 deletions
|
@ -1,4 +1,9 @@
|
|||
{ lib, fetchFromGitHub, buildGoModule }:
|
||||
{ lib
|
||||
, fetchFromGitHub
|
||||
, buildGoModule
|
||||
, runCommand
|
||||
, seaweedfs
|
||||
}:
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "seaweedfs";
|
||||
|
@ -15,6 +20,11 @@ buildGoModule rec {
|
|||
|
||||
subPackages = [ "weed" ];
|
||||
|
||||
passthru.tests.check-version = runCommand "weed-version" { meta.timeout = 3; } ''
|
||||
${seaweedfs}/bin/weed version | grep -Fw ${version}
|
||||
touch $out
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Simple and highly scalable distributed file system";
|
||||
homepage = "https://github.com/chrislusf/seaweedfs";
|
||||
|
|
Loading…
Reference in a new issue