From d437fcbefdafc12f213f61dbbb20d898360fe525 Mon Sep 17 00:00:00 2001 From: Dee Anzorge Date: Sun, 22 Oct 2023 18:00:45 +0200 Subject: [PATCH] duperemove: set version string --- pkgs/tools/filesystems/duperemove/default.nix | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/filesystems/duperemove/default.nix b/pkgs/tools/filesystems/duperemove/default.nix index e44e961e3aeb..f32d026ac1cf 100644 --- a/pkgs/tools/filesystems/duperemove/default.nix +++ b/pkgs/tools/filesystems/duperemove/default.nix @@ -1,6 +1,6 @@ { lib, stdenv, fetchFromGitHub, libgcrypt , pkg-config, glib, linuxHeaders ? stdenv.cc.libc.linuxHeaders, sqlite -, util-linux }: +, util-linux, testers, duperemove }: stdenv.mkDerivation rec { pname = "duperemove"; @@ -21,7 +21,16 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ pkg-config ]; buildInputs = [ libgcrypt glib linuxHeaders sqlite ]; - makeFlags = [ "PREFIX=${placeholder "out"}" ]; + makeFlags = [ + "PREFIX=${placeholder "out"}" + "VERSION=v${version}" + ]; + + passthru.tests.version = testers.testVersion { + package = duperemove; + command = "duperemove --version"; + version = "v${version}"; + }; meta = with lib; { description = "A simple tool for finding duplicated extents and submitting them for deduplication";