diff options
author | Arnout Engelen <arnout@bzzt.net> | 2021-04-16 17:49:23 +0200 |
---|---|---|
committer | tomberek <tomberek@users.noreply.github.com> | 2021-04-28 01:25:17 -0400 |
commit | e424c9118bbc05a82c13ae252f7808ffb6a65a8b (patch) | |
tree | e75e2fd01b50e2ce6db94a1736612999b1e9625d /pkgs/applications/networking/seaweedfs | |
parent | 267761cf44498f9e1aa81dbdb92d77d5873dd9f6 (diff) |
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.
Diffstat (limited to 'pkgs/applications/networking/seaweedfs')
-rw-r--r-- | pkgs/applications/networking/seaweedfs/default.nix | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/pkgs/applications/networking/seaweedfs/default.nix b/pkgs/applications/networking/seaweedfs/default.nix index 23d2d498d6c01..61f318009f727 100644 --- a/pkgs/applications/networking/seaweedfs/default.nix +++ b/pkgs/applications/networking/seaweedfs/default.nix @@ -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"; |