From cdedb410393cacc4756422d7d64b5144b816ff28 Mon Sep 17 00:00:00 2001 From: sternenseemann Date: Sun, 21 Apr 2024 21:35:08 +0200 Subject: [PATCH] git-annex: fix installation location of .desktop files and icons --- .../haskell-modules/configuration-common.nix | 7 +++++++ .../patches/git-annex-no-usr-prefix.patch | 13 +++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 pkgs/development/haskell-modules/patches/git-annex-no-usr-prefix.patch 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