nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5}:
6
7stdenv.mkDerivation (finalAttrs: {
8 version = "2024.2.0";
9 pname = "fsnotifier";
10
11 src = fetchFromGitHub {
12 owner = "JetBrains";
13 repo = "intellij-community";
14 rev = "0f6d9ccb67b8fcad0d802cd76209d503c4ed66a6";
15 hash = "sha256-3TAiVvKi50JQRrVG6J7LUJKTiuOTDyKt4DhoA1QmbrM=";
16 sparseCheckout = [ "native/fsNotifier/linux" ];
17 };
18
19 # fix for hard-links in nix-store, https://github.com/JetBrains/intellij-community/pull/2171
20 patches = [ ./fsnotifier.patch ];
21
22 sourceRoot = "${finalAttrs.src.name}/native/fsNotifier/linux";
23
24 buildPhase = ''
25 mkdir -p $out/bin
26
27 $CC -O2 -Wall -Wextra -Wpedantic -D "VERSION=\"${finalAttrs.version}\"" -std=c11 main.c inotify.c util.c -o fsnotifier
28
29 cp fsnotifier $out/bin/fsnotifier
30 '';
31
32 meta = {
33 homepage = "https://github.com/JetBrains/intellij-community/tree/master/native/fsNotifier/linux";
34 description = "IntelliJ Platform companion program for watching and reporting file and directory structure modification";
35 license = lib.licenses.asl20;
36 mainProgram = "fsnotifier";
37 maintainers = [ ];
38 platforms = lib.platforms.linux;
39 };
40})