diff --git a/pkgs/development/haskell-modules/configuration-common.nix b/pkgs/development/haskell-modules/configuration-common.nix index 79a8beec01b1..777cbef33597 100644 --- a/pkgs/development/haskell-modules/configuration-common.nix +++ b/pkgs/development/haskell-modules/configuration-common.nix @@ -411,6 +411,13 @@ self: super: { rm -r $out/doc/?ndroid* ''; }; + + patches = drv.patches or [ ] ++ [ + # Prevent .desktop files from being installed to $out/usr/share. + # TODO(@sternenseemann): submit upstreamable patch resolving this + # (this should be possible by also taking PREFIX into account). + ./patches/git-annex-no-usr-prefix.patch + ]; }) super.git-annex; # Too strict bounds on servant diff --git a/pkgs/development/haskell-modules/patches/git-annex-no-usr-prefix.patch b/pkgs/development/haskell-modules/patches/git-annex-no-usr-prefix.patch new file mode 100644 index 000000000000..03c9368d52fb --- /dev/null +++ b/pkgs/development/haskell-modules/patches/git-annex-no-usr-prefix.patch @@ -0,0 +1,13 @@ +diff --git a/Utility/FreeDesktop.hs b/Utility/FreeDesktop.hs +index 896b89b991..6cbb4f90ae 100644 +--- a/Utility/FreeDesktop.hs ++++ b/Utility/FreeDesktop.hs +@@ -112,7 +112,7 @@ desktopfile f = f ++ ".desktop" + + {- Directory used for installation of system wide data files.. -} + systemDataDir :: FilePath +-systemDataDir = "/usr/share" ++systemDataDir = "/share" + + {- Directory used for installation of system wide config files. -} + systemConfigDir :: FilePath