lol

Merge pull request #266453 from nessdoor/emacsPackages/notdeft

emacsPackages.notdeft: init at 20211204.0846

authored by

adisbladis and committed by
GitHub
1f37660f 97b0ae26

+77
+2
pkgs/applications/editors/emacs/elisp-packages/manual-packages.nix
··· 65 65 66 66 mu4e = callPackage ./manual-packages/mu4e { }; 67 67 68 + notdeft = callPackage ./manual-packages/notdeft { }; 69 + 68 70 ott-mode = callPackage ./manual-packages/ott-mode { }; 69 71 70 72 perl-completion = callPackage ./manual-packages/perl-completion { };
+75
pkgs/applications/editors/emacs/elisp-packages/manual-packages/notdeft/default.nix
··· 1 + { lib 2 + , stdenv 3 + , trivialBuild 4 + , fetchFromGitHub 5 + , emacs 6 + , hydra 7 + , ivy 8 + , pkg-config 9 + , tclap 10 + , xapian 11 + # Include pre-configured hydras 12 + , withHydra ? false 13 + # Include Ivy integration 14 + , withIvy ? false 15 + }: 16 + 17 + let 18 + pname = "notdeft"; 19 + version = "20211204.0846"; 20 + 21 + src = fetchFromGitHub { 22 + owner = "hasu"; 23 + repo = "notdeft"; 24 + rev = "1b7054dcfc3547a7cafeb621552cec01d0540478"; 25 + hash = "sha256-LMMLJFVpmoE/y3MqrgY2fmsehmzk6TkLsVoHmFUxiSw="; 26 + }; 27 + 28 + # Xapian bindings for NotDeft 29 + notdeft-xapian = stdenv.mkDerivation { 30 + pname = "notdeft-xapian"; 31 + inherit version src; 32 + 33 + sourceRoot = "${src.name}/xapian"; 34 + 35 + nativeBuildInputs = [ pkg-config tclap xapian ]; 36 + 37 + installPhase = '' 38 + runHook preInstall 39 + 40 + mkdir -p $out/bin 41 + cp notdeft-xapian $out/bin 42 + 43 + runHook postInstall 44 + ''; 45 + }; 46 + in 47 + trivialBuild { 48 + inherit pname version src; 49 + packageRequires = lib.optional withHydra hydra 50 + ++ lib.optional withIvy ivy; 51 + buildInputs = [ xapian ]; 52 + 53 + postPatch = '' 54 + substituteInPlace notdeft-xapian.el \ 55 + --replace 'defcustom notdeft-xapian-program nil' \ 56 + "defcustom notdeft-xapian-program \"${notdeft-xapian}/bin/notdeft-xapian\"" 57 + ''; 58 + 59 + # Extra modules are contained in the extras/ directory 60 + preBuild = lib.optionalString withHydra '' 61 + mv extras/notdeft-{mode-hydra,global-hydra}.el ./ 62 + '' + 63 + lib.optionalString withIvy '' 64 + mv extras/notdeft-ivy.el ./ 65 + '' + '' 66 + rm -r extras/ 67 + ''; 68 + 69 + meta = with lib; { 70 + homepage = "https://tero.hasu.is/notdeft/"; 71 + description = "Fork of Deft that uses Xapian as a search engine"; 72 + maintainers = [ maintainers.nessdoor ]; 73 + platforms = platforms.linux; 74 + }; 75 + }