From 9b8de39d04811cdddd367838e6ea3733963bc5a2 Mon Sep 17 00:00:00 2001 From: arcnmx Date: Thu, 13 Jan 2022 08:43:36 -0800 Subject: [PATCH 1/2] notmuch: install ruby bindings previously ruby bindings were never actually installed into $out --- .../networking/mailreaders/notmuch/default.nix | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/pkgs/applications/networking/mailreaders/notmuch/default.nix b/pkgs/applications/networking/mailreaders/notmuch/default.nix index 2a95453f7ae3..e39e713efd7b 100644 --- a/pkgs/applications/networking/mailreaders/notmuch/default.nix +++ b/pkgs/applications/networking/mailreaders/notmuch/default.nix @@ -7,6 +7,7 @@ , ruby , which, dtach, openssl, bash, gdb, man , withEmacs ? true +, withRuby ? true }: stdenv.mkDerivation rec { @@ -29,15 +30,15 @@ stdenv.mkDerivation rec { pythonPackages.sphinx # (optional) documentation -> doc/INSTALL texinfo # (optional) documentation -> doc/INSTALL pythonPackages.cffi - ] ++ lib.optional withEmacs emacs; + ] ++ lib.optional withEmacs emacs + ++ lib.optional withRuby ruby; buildInputs = [ gnupg # undefined dependencies xapian gmime talloc zlib # dependencies described in INSTALL perl pythonPackages.python - ruby - ]; + ] ++ lib.optional withRuby ruby; postPatch = '' patchShebangs configure test/ @@ -56,7 +57,7 @@ stdenv.mkDerivation rec { "--infodir=${placeholder "info"}/share/info" ] ++ lib.optional (!withEmacs) "--without-emacs" ++ lib.optional withEmacs "--emacslispdir=${placeholder "emacs"}/share/emacs/site-lisp" - ++ lib.optional (isNull ruby) "--without-ruby"; + ++ lib.optional (!withRuby) "--without-ruby"; # Notmuch doesn't use autoconf and consequently doesn't tag --bindir and # friends @@ -87,6 +88,12 @@ stdenv.mkDerivation rec { postInstall = lib.optionalString withEmacs '' moveToOutput bin/notmuch-emacs-mua $emacs + '' + lib.optionalString withRuby '' + make -C bindings/ruby install \ + vendordir=$out/lib/ruby \ + SHELL=$SHELL \ + $makeFlags "''${makeFlagsArray[@]}" \ + $installFlags "''${installFlagsArray[@]}" ''; passthru = { From ed4ac9fc55a3875cd223a69518e03290d5038497 Mon Sep 17 00:00:00 2001 From: arcnmx Date: Sat, 22 Jan 2022 09:02:44 -0800 Subject: [PATCH 2/2] notmuch: place ruby bindings in their own output --- .../applications/networking/mailreaders/notmuch/default.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/networking/mailreaders/notmuch/default.nix b/pkgs/applications/networking/mailreaders/notmuch/default.nix index e39e713efd7b..aa46529bdbac 100644 --- a/pkgs/applications/networking/mailreaders/notmuch/default.nix +++ b/pkgs/applications/networking/mailreaders/notmuch/default.nix @@ -65,7 +65,9 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; makeFlags = [ "V=1" ]; - outputs = [ "out" "man" "info" ] ++ lib.optional withEmacs "emacs"; + outputs = [ "out" "man" "info" ] + ++ lib.optional withEmacs "emacs" + ++ lib.optional withRuby "ruby"; preCheck = let test-database = fetchurl { @@ -90,7 +92,7 @@ stdenv.mkDerivation rec { moveToOutput bin/notmuch-emacs-mua $emacs '' + lib.optionalString withRuby '' make -C bindings/ruby install \ - vendordir=$out/lib/ruby \ + vendordir=$ruby/lib/ruby \ SHELL=$SHELL \ $makeFlags "''${makeFlagsArray[@]}" \ $installFlags "''${installFlagsArray[@]}"