add: ghc-fail (#13213) (#13216)

(cherry picked from commit b9c22083ac)

Signed-off-by: Owen-sz <owen@fyralabs.com>
Co-authored-by: Owen Zimmerman <123591347+Owen-sz@users.noreply.github.com>
This commit is contained in:
Raboneko
2026-06-20 23:02:32 -05:00
committed by GitHub
parent af120a2c4b
commit deee70243d
3 changed files with 78 additions and 0 deletions
+5
View File
@@ -0,0 +1,5 @@
project pkg {
rpm {
spec = "ghc-fail.spec"
}
}
+72
View File
@@ -0,0 +1,72 @@
# generated by cabal-rpm-2.3.2
# https://docs.fedoraproject.org/en-US/packaging-guidelines/Haskell/
%global pkg_name fail
%global pkgver %{pkg_name}-%{version}
%{?haskell_setup}
Name: ghc-%{pkg_name}
Version: 4.9.0.0
Release: 1%{?dist}
Summary: Forward-compatible MonadFail class
License: BSD-3-Clause
URL: https://hackage.haskell.org/package/fail
# Begin cabal-rpm sources:
Source0: https://hackage.haskell.org/package/%{pkgver}/%{pkgver}.tar.gz
# End cabal-rpm sources
# Begin cabal-rpm deps:
BuildRequires: ghc-rpm-macros
BuildRequires: ghc-Cabal-devel
# End cabal-rpm deps
Packager: Owen Zimmerman <owen@fyralabs.com>
%description
This package contains the "Control.Monad.Fail" module providing the
<https://prime.haskell.org/wiki/Libraries/Proposals/MonadFail MonadFail> class
that became available in <https://hackage.haskell.org/package/base-4.9.0.0
base-4.9.0.0> for older 'base' package versions.
This package turns into an empty package when used with GHC versions which
already provide the "Control.Monad.Fail" module to make way for GHC's own
"Control.Monad.Fail" module.
%package devel
Summary: Haskell %{pkg_name} library development files
%if %{defined ghc_version}
Requires: ghc-compiler = %{ghc_version}
%endif
%description devel
This package provides the Haskell %{pkg_name} library development files.
%prep
# Begin cabal-rpm setup:
%setup -q -n %{pkgver}
# End cabal-rpm setup
%build
# Begin cabal-rpm build:
%ghc_lib_build_without_haddock
# End cabal-rpm build
%install
# Begin cabal-rpm install
%ghc_lib_install -m
mv %{buildroot}%{_ghcdocdir}{,-devel}
# End cabal-rpm install
%files devel -f %{name}-devel.files
%license LICENSE
%changelog
* Sun Jun 21 2026 Owen Zimmerman <owen@fyralabs.com> - 4.9.0.0-1
- Initial commit
+1
View File
@@ -0,0 +1 @@
rpm.version(hackage("fail"));