git-annex: adjust for 10.20250320
- git-annex now supports either filepath-bytestring or filepath (>= 1.5.2) with the new OsPath API. For GHC 9.8, we have too stick to filepath-bytestring and manually disable the OsPath flag. However, we can already support building git-annex with GHC 9.10 and implement our overrides in a future proof way. Due to code changes relating to OsPath, our patch has to be rebased. - The Utility.* modules gain a few dependencies, but for modules that aren't used in Setup.hs. Consequently, our approach of reusing the setup package db in GHC for the installer tool managed by the git-annex Makefile is no longer enough.
This commit is contained in:
@@ -463,34 +463,42 @@ self: super:
|
|||||||
|
|
||||||
# The Hackage tarball is purposefully broken, because it's not intended to be, like, useful.
|
# The Hackage tarball is purposefully broken, because it's not intended to be, like, useful.
|
||||||
# https://git-annex.branchable.com/bugs/bash_completion_file_is_missing_in_the_6.20160527_tarball_on_hackage/
|
# https://git-annex.branchable.com/bugs/bash_completion_file_is_missing_in_the_6.20160527_tarball_on_hackage/
|
||||||
git-annex = overrideCabal (drv: {
|
git-annex = lib.pipe super.git-annex (
|
||||||
src = pkgs.fetchgit {
|
[
|
||||||
name = "git-annex-${super.git-annex.version}-src";
|
(overrideCabal (drv: {
|
||||||
url = "git://git-annex.branchable.com/";
|
src = pkgs.fetchgit {
|
||||||
rev = "refs/tags/" + super.git-annex.version;
|
name = "git-annex-${super.git-annex.version}-src";
|
||||||
sha256 = "08k0qlx97j0c7vx07nwhzwxb2rxcnzwzlg2x3j01cx033vwch8hq";
|
url = "git://git-annex.branchable.com/";
|
||||||
# delete android and Android directories which cause issues on
|
rev = "refs/tags/" + super.git-annex.version;
|
||||||
# darwin (case insensitive directory). Since we don't need them
|
sha256 = "18n6ah4d5i8qhx1s95zsb8bg786v0nv9hcjyxggrk88ya77maxha";
|
||||||
# during the build process, we can delete it to prevent a hash
|
# delete android and Android directories which cause issues on
|
||||||
# mismatch on darwin.
|
# darwin (case insensitive directory). Since we don't need them
|
||||||
postFetch = ''
|
# during the build process, we can delete it to prevent a hash
|
||||||
rm -r $out/doc/?ndroid*
|
# mismatch on darwin.
|
||||||
'';
|
postFetch = ''
|
||||||
};
|
rm -r $out/doc/?ndroid*
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
patches = drv.patches or [ ] ++ [
|
patches = drv.patches or [ ] ++ [
|
||||||
# Prevent .desktop files from being installed to $out/usr/share.
|
# Prevent .desktop files from being installed to $out/usr/share.
|
||||||
# TODO(@sternenseemann): submit upstreamable patch resolving this
|
# TODO(@sternenseemann): submit upstreamable patch resolving this
|
||||||
# (this should be possible by also taking PREFIX into account).
|
# (this should be possible by also taking PREFIX into account).
|
||||||
./patches/git-annex-no-usr-prefix.patch
|
./patches/git-annex-no-usr-prefix.patch
|
||||||
];
|
];
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
substituteInPlace Makefile \
|
substituteInPlace Makefile \
|
||||||
--replace-fail 'InstallDesktopFile $(PREFIX)/bin/git-annex' \
|
--replace-fail 'InstallDesktopFile $(PREFIX)/bin/git-annex' \
|
||||||
'InstallDesktopFile git-annex'
|
'InstallDesktopFile git-annex'
|
||||||
'';
|
'';
|
||||||
}) super.git-annex;
|
}))
|
||||||
|
]
|
||||||
|
++ lib.optionals (lib.versionOlder self.ghc.version "9.10") [
|
||||||
|
(disableCabalFlag "OsPath")
|
||||||
|
(addBuildDepends [ self.filepath-bytestring ])
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
# Too strict bounds on servant
|
# Too strict bounds on servant
|
||||||
# Pending a hackage revision: https://github.com/berberman/arch-web/commit/5d08afee5b25e644f9e2e2b95380a5d4f4aa81ea#commitcomment-89230555
|
# Pending a hackage revision: https://github.com/berberman/arch-web/commit/5d08afee5b25e644f9e2e2b95380a5d4f4aa81ea#commitcomment-89230555
|
||||||
|
|||||||
@@ -851,6 +851,15 @@ builtins.intersectAttrs super {
|
|||||||
executableSystemDepends = runtimeExecDeps;
|
executableSystemDepends = runtimeExecDeps;
|
||||||
enableSharedExecutables = false;
|
enableSharedExecutables = false;
|
||||||
|
|
||||||
|
# Unnecessary for Setup.hs, but we reuse the setup package db
|
||||||
|
# for the installation utilities.
|
||||||
|
setupHaskellDepends = drv.setupHaskellDepends or [ ] ++ [
|
||||||
|
self.buildHaskellPackages.unix-compat
|
||||||
|
self.buildHaskellPackages.IfElse
|
||||||
|
self.buildHaskellPackages.QuickCheck
|
||||||
|
self.buildHaskellPackages.data-default
|
||||||
|
];
|
||||||
|
|
||||||
preConfigure =
|
preConfigure =
|
||||||
drv.preConfigure or ""
|
drv.preConfigure or ""
|
||||||
+ ''
|
+ ''
|
||||||
|
|||||||
@@ -2,12 +2,12 @@ diff --git a/Utility/FreeDesktop.hs b/Utility/FreeDesktop.hs
|
|||||||
index 896b89b991..6cbb4f90ae 100644
|
index 896b89b991..6cbb4f90ae 100644
|
||||||
--- a/Utility/FreeDesktop.hs
|
--- a/Utility/FreeDesktop.hs
|
||||||
+++ b/Utility/FreeDesktop.hs
|
+++ b/Utility/FreeDesktop.hs
|
||||||
@@ -112,7 +112,7 @@ desktopfile f = f ++ ".desktop"
|
@@ -106,7 +106,7 @@ desktopfile f = toOsPath $ f ++ ".desktop"
|
||||||
|
|
||||||
{- Directory used for installation of system wide data files.. -}
|
{- Directory used for installation of system wide data files.. -}
|
||||||
systemDataDir :: FilePath
|
systemDataDir :: OsPath
|
||||||
-systemDataDir = "/usr/share"
|
-systemDataDir = literalOsPath "/usr/share"
|
||||||
+systemDataDir = "/share"
|
+systemDataDir = literalOsPath "/share"
|
||||||
|
|
||||||
{- Directory used for installation of system wide config files. -}
|
{- Directory used for installation of system wide config files. -}
|
||||||
systemConfigDir :: FilePath
|
systemConfigDir :: OsPath
|
||||||
|
|||||||
Reference in New Issue
Block a user