From 4ae4dd49c64f6c1b825bb77e4525f844672e44a8 Mon Sep 17 00:00:00 2001 From: rogarb <69053978+rogarb@users.noreply.github.com> Date: Wed, 5 Jul 2023 12:50:46 +0000 Subject: [PATCH] inotify-tools: add fanotify support and refactor package expression (#233767) --- .../tools/misc/inotify-tools/default.nix | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/pkgs/development/tools/misc/inotify-tools/default.nix b/pkgs/development/tools/misc/inotify-tools/default.nix index d4e049f1d4e9..bd126ceb7c1b 100644 --- a/pkgs/development/tools/misc/inotify-tools/default.nix +++ b/pkgs/development/tools/misc/inotify-tools/default.nix @@ -1,16 +1,20 @@ -{ lib, stdenv, autoreconfHook, fetchFromGitHub, nix-update-script }: +{ lib, stdenv, autoreconfHook, fetchFromGitHub, nix-update-script, fanotifySupport ? true }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "inotify-tools"; version = "3.22.6.0"; src = fetchFromGitHub { repo = "inotify-tools"; owner = "inotify-tools"; - rev = version; - sha256 = "sha256-EYWVSgwoMjAlc/V5kv+2jfxEqWVW/lEoIxVd+ctEMsk="; + rev = finalAttrs.version; + hash = "sha256-EYWVSgwoMjAlc/V5kv+2jfxEqWVW/lEoIxVd+ctEMsk="; }; + configureFlags = [ + (lib.enableFeature fanotifySupport "fanotify") + ]; + nativeBuildInputs = [ autoreconfHook ]; passthru = { @@ -23,4 +27,4 @@ stdenv.mkDerivation rec { maintainers = with maintainers; [ marcweber pSub shamilton ]; platforms = platforms.linux; }; -} +})