berberman / arch-hs Goto Github PK
View Code? Open in Web Editor NEWDistribute hackage packages to archlinux
License: MIT License
Distribute hackage packages to archlinux
License: MIT License
According to our guidelines, licenses like BSD, ISC, MIT should not be prefixed by "custom:" although they are not provided in the system. The license should still be installed inside the package, just the custom:
prefix should be removed.
The MemberWithError
type in Polysemy
is being deprecated and will be removed in the next version. The upgrade path is simply to replace it with Member
. I'm happy to send a PR if you'd like.
Package Win32
sometimes exists during dependency resolving:
arch-hs/src/Distribution/ArchHs/Core.hs
Line 39 in f3720a2
$ arch-hs-diff optparse-applicative 0.15.1.0 0.16.0.0
ⓘ Start running...
ⓘ Downloading cabal file from https://hackage.haskell.org/package/optparse-applicative-0.15.1.0/revision/0.cabal...
ⓘ Downloading cabal file from https://hackage.haskell.org/package/optparse-applicative-0.16.0.0/revision/0.cabal...
Package: optparse-applicative
Version: 0.15.1.0 ⇒ 0.16.0.0
Synopsis: Utilities and combinators for parsing command line options
Depends:
base ==4.*
transformers >=0.2 && <0.6
transformers-compat >=0.3 && <0.7
process >=1.0 && <1.7
ansi-wl-pprint >=0.6.8 && <0.7
MakeDepends:
base -any
bytestring >=0.9 && <0.11
optparse-applicative -any
QuickCheck >=2.8 && <2.14
----------------------------
base -any
bytestring >=0.9 && <0.11
optparse-applicative -any
QuickCheck >=2.8 && <2.15
✔ Success!
As you can see, base ==4.*
in Depends has no prefix space, and the first base -any
in MakeDepends has 8 spaces instead of 4.
It would be nice to support flags as arch-hs
, so I can specify -fwarp-tests
for the following example:
$ arch-hs-diff HTTP 4000.3.14 4000.3.15
ⓘ Start running...
ⓘ Downloading cabal file from https://hackage.haskell.org/package/HTTP-4000.3.14/revision/0.cabal...
ⓘ Downloading cabal file from https://hackage.haskell.org/package/HTTP-4000.3.15/revision/0.cabal...
Package: HTTP
Version: 4000.3.14 ⇒ 4000.3.15
Synopsis: A library for client-side HTTP
URL: https://github.com/haskell/HTTP
Depends:
base >=4.3.0.0 && <4.14
time >=1.1.2.3 && <1.10
Win32 >=2.2.0.0 && <2.9
array >=0.3.0.2 && <0.6
bytestring >=0.9.1.5 && <0.11
parsec >=2.0 && <3.2
----------------------------
base >=4.3.0.0 && <4.15
time >=1.1.2.3 && <1.11
Win32 >=2.2.0.0 && <2.10
array >=0.3.0.2 && <0.6
bytestring >=0.9.1.5 && <0.11
parsec >=2.0 && <3.2
MakeDepends:
deepseq >=1.3.0.0 && <1.5
HUnit >=1.2.0.1 && <1.7
httpd-shed >=0.4 && <0.5
mtl >=1.1.1.0 && <2.3
pureMD5 >=0.2.4 && <2.2
split >=0.1.3 && <0.3
test-framework >=0.2.0 && <0.9
test-framework-hunit >=0.3.0 && <0.4
✔ Success!
Expected result: warp etc listed in makedepends.
It would also be handy if flag changes (new flag, removed flag, etc) are shown if exist.
$ arch-hs -o . toml-reader
$ cd haskell-toml-reader
$ makepkg -fsi --asdeps
==> Making package: haskell-toml-reader 0.2.1.0-1 (Mon 11 Sep 2023 05:22:40 PM CST)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
-> Found toml-reader-0.2.1.0.tar.gz
==> Validating source files with sha256sums...
toml-reader-0.2.1.0.tar.gz ... Skipped
==> Extracting sources...
-> Extracting toml-reader-0.2.1.0.tar.gz with bsdtar
==> Removing existing $pkgdir/ directory...
==> Starting build()...
<no location info>: error: module ‘Setup’ cannot be found locally
==> ERROR: A failure occurred in build().
Aborting...
$ arch-hs cabal-fmt
▶ You didn't pass -h, use hackage index file from default path.
▶ You didn't pass -c, use community db file from default path.
▶ You didn't pass -f, different flag assignments may make difference in dependency resolving.
ⓘ Loading hackage...
ⓘ Loading community.db...
ⓘ Start running...
ⓘ Solved target:
Cabal ✔ [community]
ansi-terminal ✔ [community]
ansi-wl-pprint ✔ [community]
binary ✔ [community]
bytestring ✔ [community]
cabal-fmt ✘
├─Cabal [golden :: Test,cabal-fmt-internal :: SubLibs] ✔ [community]
├─bytestring [cabal-fmt :: Exe,golden :: Test,cabal-fmt-internal :: SubLibs]✔ [community]
├─cabal-fmt-internal [cabal-fmt :: Exe,golden :: Test] ✘
├─containers [golden :: Test,cabal-fmt-internal :: SubLibs] ✔ [community]
├─directory [cabal-fmt :: Exe,cabal-fmt-internal :: SubLibs] ✔ [community]
├─filepath [cabal-fmt :: Exe,golden :: Test,cabal-fmt-internal :: SubLibs] ✔ [community]
├─mtl [cabal-fmt-internal :: SubLibs] ✔ [community]
├─optparse-applicative [cabal-fmt :: Exe] ✔ [community]
├─parsec [cabal-fmt-internal :: SubLibs] ✔ [community]
├─pretty [cabal-fmt-internal :: SubLibs] ✔ [community]
├─process [golden :: Test] ✔ [community]
├─tasty [golden :: Test] ✔ [community]
└─tasty-golden [golden :: Test] ✔ [community]
colour ✔ [community]
containers ✔ [community]
deepseq ✔ [community]
directory ✔ [community]
filepath ✔ [community]
mtl ✔ [community]
optparse-applicative ✔ [community]
parsec ✔ [community]
pretty ✔ [community]
process ✔ [community]
template-haskell ✔ [community]
text ✔ [community]
time ✔ [community]
transformers-compat ✔ [community]
unix ✔ [community]
Diff ✔ [community]
QuickCheck ✔ [community]
array ✔ [community]
base-compat ✔ [community]
base-orphans ✔ [community]
integer-logarithms ✔ [community]
stm ✔ [community]
tagged ✔ [community]
tar ✔ [community]
tasty ✔ [community]
tasty-golden ✔ [community]
tasty-hunit ✔ [community]
tasty-quickcheck ✔ [community]
temporary ✔ [community]
transformers ✔ [community]
tree-diff ✔ [community]
HUnit ✔ [community]
random ✔ [community]
test-framework ✔ [community]
test-framework-quickcheck2 ✔ [community]
integer-gmp ✔ [community]
cabal-fmt-internal ✘
test-framework-hunit ✔ [community]
ghc-boot-th ✔ [community]
quickcheck-unicode ✔ [community]
ⓘ Recommended package order (from topological sort):
1. cabal-fmt-internal
2. cabal-fmt
🛑 Runtime Exception: Unable to find [cabal-fmt-internal] (hackage name) / [haskell-cabal-fmt-internal] (community name)
I ran arch-hs to create haskell-nicify-lib and it generated a PKGBUILD with:
pkgdesc="Pretty print the standard output of default `Show` instances."
When building with aur build
, this resulted in e.g.
/home/james/src/PKGBUILDs/fossa-cli/haskell-nicify-lib/PKGBUILD: line 8: Show: command not found
This implies a code execution security problem.
Would adding a option to have machine parseable output possible ?
I'm thinking in particular to the Recommended package order. (a simple text file
with the package in the order ?)
And maybe a json file for the dependency graph ?
Your tool is fantastic, by the way o/
Thank you for your work :)
When you call cabal configure
inside a cabal project, cabal will automatically resolve dependencies and produce a file representing the build plan called plan.json
under the directory dist-newstyle/cache
. There are some advantages to using plan.json
over the current method:
ⓘ Write file: /home/felix/projects/arch/community/conduit-parse/PKGBUILD
ⓘ Write file: /home/felix/projects/arch/community/haskell-lsp/PKGBUILD
ⓘ Write file: /home/felix/projects/arch/community/lsp-test/PKGBUILD
It should use haskell-conduit-parse
etc by default.
This is a hard-coded path to CABAL_DIR
, which can be changed by the user. It would be helpful to reference the variable or to have a flag to change where we look for Cabal's files.
Target: BNFC
PKGBUILD:
depends=('ghc-libs' 'haskell-semigroups')
makedepends=('ghc' 'haskell-hunit' 'haskell-quickcheck' 'haskell-doctest' 'haskell-hspec' 'haskell-temporary')
Build log:
==> Starting build()...
Configuring BNFC-2.8.4...
Setup: The program 'alex' is required but it could not be found.
==> ERROR: A failure occurred in build().
$ arch-hs-diff skylighting-core 0.8.5 0.10
▶ You didn't pass -f, different flag values may make difference in dependency resolving.
ⓘ Loading community.db...
ⓘ Start running...
ⓘ Downloading cabal file from https://hackage.haskell.org/package/skylighting-core-0.8.5/revision/0.cabal...
ⓘ Downloading cabal file from https://hackage.haskell.org/package/skylighting-core-0.10/revision/0.cabal...
Package: skylighting-core
Version: 0.8.5 ⇒ 0.10
Synopsis: syntax highlighting library
URL: https://github.com/jgm/skylighting
Depends:
containers -any
regex-pcre-builtin >=0.95
aeson >=1.0
ansi-terminal >=0.7
attoparsec -any
base >=4.8 && <5.0
base64-bytestring -any
binary -any
blaze-html >=0.5
bytestring -any
case-insensitive -any
colour >=2.0
directory >=1.2.5
filepath -any
hxt -any
mtl -any
safe -any
text -any
transformers -any
utf8-string -any
--------------------------------------
containers >=0.5.8.2
aeson >=1.0
ansi-terminal >=0.7
attoparsec -any
base >=4.8 && <5.0
base64-bytestring -any
binary -any
blaze-html >=0.5
bytestring -any
case-insensitive -any
colour >=2.0
directory >=1.2.5
filepath -any
hxt -any
mtl -any
safe -any
text -any
transformers -any
utf8-string -any
"regex-pcre-builtin" is required to be in range (>=0.95), but [community] does not provide this package.
MakeDepends:
Diff -any
HUnit -any
QuickCheck -any
directory -any
pretty-show -any
random -any
tasty -any
tasty-golden -any
tasty-hunit -any
tasty-quickcheck -any
--------------------------------------
containers -any
Diff -any
HUnit -any
QuickCheck -any
directory -any
pretty-show -any
random -any
tasty -any
tasty-golden -any
tasty-hunit -any
tasty-quickcheck -any
Flags:
skylighting-core
⚐ executable:
description:
Build skylighting-extract tool
default: False
isManual: False
⚐ system-pcre:
description:
Use regex-pcre instead of regex-pcre-builtin
default: False
isManual: False
✔ Success!
Flag system-pcre is no longer available in the newer version.
It seems that flags will be droped (i.e., all branches of the condition tree are discarded) if they didn't be specified, even if those have default values.
Originally posted by @berberman in #12 (comment)
When running arch-hs
with target haskell-ci
:
$ arch-hs haskell-ci
...
🛑 Runtime Error: Unable to find [haskell-ci-internal]
haskell-ci
doesn't have condLibrary
, but condSubLibraries
with a suffix -internal
of its component name instead. arch-hs
currently is unable to handle such situation, and what it exactly does is to just ignore them. I checked the entire hackage, and found that only few packages have sub-libraries. Hence, supporting this will be in low priority.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.