diff options
author | Sandro Jäckel <sandro.jaeckel@gmail.com> | 2023-07-31 13:31:53 +0200 |
---|---|---|
committer | Sandro Jäckel <sandro.jaeckel@gmail.com> | 2023-07-31 13:42:29 +0200 |
commit | e66c968210752c7fe25033264b683c2ab820c223 (patch) | |
tree | a0f5320ae9594fb9ca3f05485b52cf0b4744e18f | |
parent | 28f412016377b1f4f21c8950ffb4e322bf2a17cb (diff) |
librsvg: use installShellCompletion, little cleanup
-rw-r--r-- | pkgs/development/libraries/librsvg/default.nix | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/pkgs/development/libraries/librsvg/default.nix b/pkgs/development/libraries/librsvg/default.nix index 6542fdfb14fea..bece97ac482de 100644 --- a/pkgs/development/libraries/librsvg/default.nix +++ b/pkgs/development/libraries/librsvg/default.nix @@ -4,6 +4,7 @@ , pkg-config , glib , gdk-pixbuf +, installShellFiles , pango , cairo , libxml2 @@ -59,6 +60,7 @@ stdenv.mkDerivation (finalAttrs: { nativeBuildInputs = [ gdk-pixbuf + installShellFiles pkg-config rustc cargo-auditable-cargo-wrapper @@ -121,12 +123,10 @@ stdenv.mkDerivation (finalAttrs: { postConfigure = '' GDK_PIXBUF=$out/lib/gdk-pixbuf-2.0/2.10.0 mkdir -p $GDK_PIXBUF/loaders - sed -e "s#gdk_pixbuf_moduledir = .*#gdk_pixbuf_moduledir = $GDK_PIXBUF/loaders#" \ - -i gdk-pixbuf-loader/Makefile - sed -e "s#gdk_pixbuf_cache_file = .*#gdk_pixbuf_cache_file = $GDK_PIXBUF/loaders.cache#" \ - -i gdk-pixbuf-loader/Makefile - sed -e "s#\$(GDK_PIXBUF_QUERYLOADERS)#GDK_PIXBUF_MODULEDIR=$GDK_PIXBUF/loaders \$(GDK_PIXBUF_QUERYLOADERS)#" \ - -i gdk-pixbuf-loader/Makefile + sed -i gdk-pixbuf-loader/Makefile \ + -e "s#gdk_pixbuf_moduledir = .*#gdk_pixbuf_moduledir = $GDK_PIXBUF/loaders#" \ + -e "s#gdk_pixbuf_cache_file = .*#gdk_pixbuf_cache_file = $GDK_PIXBUF/loaders.cache#" \ + -e "s#\$(GDK_PIXBUF_QUERYLOADERS)#GDK_PIXBUF_MODULEDIR=$GDK_PIXBUF/loaders \$(GDK_PIXBUF_QUERYLOADERS)#" # Fix thumbnailer path sed -e "s#@bindir@\(/gdk-pixbuf-thumbnailer\)#${gdk-pixbuf}/bin\1#g" \ @@ -147,12 +147,10 @@ stdenv.mkDerivation (finalAttrs: { cat ${lib.getLib gdk-pixbuf}/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache $GDK_PIXBUF/loaders.cache > $GDK_PIXBUF/loaders.cache.tmp mv $GDK_PIXBUF/loaders.cache.tmp $GDK_PIXBUF/loaders.cache - mkdir -p "$out/share/bash-completion/completions/" - ${emulator} $out/bin/rsvg-convert --completion bash > "$out/share/bash-completion/completions/rsvg-convert" - mkdir -p "$out/share/zsh/site-functions/" - ${emulator} $out/bin/rsvg-convert --completion zsh > "$out/share/zsh/site-functions/_rsvg-convert" - mkdir -p "$out/share/fish/vendor_completions.d/" - ${emulator} $out/bin/rsvg-convert --completion fish > "$out/share/fish/vendor_completions.d/rsvg-convert.fish" + installShellCompletion --cmd rsvg-convert \ + --bash <(${emulator} $out/bin/rsvg-convert --completion bash) \ + --fish <(${emulator} $out/bin/rsvg-convert --completion fish) \ + --zsh <(${emulator} $out/bin/rsvg-convert --completion zsh) ''; postFixup = lib.optionalString withIntrospection '' |