aboutsummaryrefslogtreecommitdiffstats
path: root/community/hledger-stockquotes
diff options
context:
space:
mode:
Diffstat (limited to 'community/hledger-stockquotes')
-rw-r--r--community/hledger-stockquotes/APKBUILD67
-rw-r--r--community/hledger-stockquotes/cabal.config185
2 files changed, 252 insertions, 0 deletions
diff --git a/community/hledger-stockquotes/APKBUILD b/community/hledger-stockquotes/APKBUILD
new file mode 100644
index 00000000000..31cb120f22b
--- /dev/null
+++ b/community/hledger-stockquotes/APKBUILD
@@ -0,0 +1,67 @@
+# Contributor: Dhruvin Gandhi <contact@dhruvin.dev>
+# Maintainer: Dhruvin Gandhi <contact@dhruvin.dev>
+pkgname=hledger-stockquotes
+pkgver=0.1.2.2
+pkgrel=2
+pkgdesc="hledger addon that pulls historical stock prices for commodities"
+url="https://github.com/prikhi/hledger-stockquotes"
+arch="x86_64" # limited by GHC
+license="BSD-3-Clause"
+makedepends="ghc cabal libffi-dev ncurses-dev zlib-dev"
+source="$pkgname-$pkgver.tar.gz::https://github.com/prikhi/hledger-stockquotes/archive/refs/tags/$pkgver.tar.gz
+ cabal.config
+ "
+options="!check" # fail to build for some reason
+
+export CABAL_DIR="$srcdir"/cabal
+
+cabal_update() {
+ msg "Freezing $pkgname dependencies"
+
+ # Resolve deps and generate fresh cabal.config with version constraints.
+ (
+ cd "$builddir"
+ cabal update
+ cabal v1-freeze --strong-flags --shadow-installed-packages
+
+ # Add version tag at the first line.
+ sed -i "1i--$pkgver" "cabal.config"
+
+ mv "cabal.config" "$startdir/"
+ )
+
+ if ! abuild checksum; then
+ die "Failed to update checksum, run 'abuild checksum' manually"
+ fi
+}
+
+prepare() {
+ default_prepare
+
+ if [ "$(head -n 1 "$srcdir/cabal.config")" != "--$pkgver" ]; then
+ die "Requirements file is outdated, run 'abuild cabal_update'"
+ fi
+
+ ln -sf "$srcdir/cabal.config" "$builddir/cabal.project.freeze"
+}
+
+build() {
+ cabal update
+ cabal build --prefix=/usr --enable-relocatable
+}
+
+check() {
+ cabal test
+}
+
+package() {
+ local ghcver=$(ghc --version | cut -d " " -f 8)
+ install -Dm755 \
+ "dist-newstyle/build/$arch-linux/ghc-$ghcver/$pkgname-$pkgver/x/$pkgname/build/$pkgname/$pkgname" \
+ "$pkgdir"/usr/bin/$pkgname
+}
+
+sha512sums="
+0b637efc9d99f1b283b53cd45331603a8badd30d91692a854786e91c536ddf2d336973f7c2b8f1d8e439dc730893d91fbd1c2a040bed448a59f1006bfee79653 hledger-stockquotes-0.1.2.2.tar.gz
+1f22cf36724aebc303d9f11c068d4778332364c5d55ab835b4ed757619ce9a4648601d0a85261172327a30fb923c3cd3492b52778998f70694cc889847539ddf cabal.config
+"
diff --git a/community/hledger-stockquotes/cabal.config b/community/hledger-stockquotes/cabal.config
new file mode 100644
index 00000000000..4de7fbe4a2d
--- /dev/null
+++ b/community/hledger-stockquotes/cabal.config
@@ -0,0 +1,185 @@
+--0.1.2.2
+constraints: Cabal ==3.8.1.0,
+ Cabal-syntax ==3.8.1.0,
+ Decimal ==0.5.2,
+ Glob ==0.10.2,
+ OneTuple ==0.4.1.1,
+ Only ==0.1,
+ QuickCheck ==2.14.3,
+ RSA ==2.4.1,
+ SHA ==1.6.4.4,
+ StateVar ==1.2.2,
+ aeson ==2.2.1.0,
+ aeson-pretty ==0.8.10,
+ ansi-terminal ==1.0,
+ ansi-terminal-types ==0.11.5,
+ appar ==0.1.8,
+ array ==0.5.4.0,
+ asn1-encoding ==0.9.6,
+ asn1-parse ==0.9.5,
+ asn1-types ==0.3.4,
+ assoc ==1.1,
+ async ==2.2.5,
+ attoparsec ==0.14.4,
+ attoparsec-aeson ==2.2.0.1,
+ authenticate-oauth ==1.7,
+ base ==4.17.2.1,
+ base-compat ==0.13.1,
+ base-orphans ==0.9.1,
+ base64-bytestring ==1.2.1.0,
+ basement ==0.0.16,
+ bifunctors ==5.6.1,
+ binary ==0.8.9.1,
+ bitvec ==1.1.5.0,
+ blaze-builder ==0.4.2.3,
+ blaze-markup ==0.8.3.0,
+ byteorder ==1.0.4,
+ bytestring ==0.11.5.3,
+ cabal-doctest ==1.0.9,
+ call-stack ==0.4.0,
+ case-insensitive ==1.2.1.0,
+ cassava ==0.5.3.0,
+ cassava-megaparsec ==2.0.4,
+ cereal ==0.5.8.3,
+ clock ==0.8.4,
+ cmdargs ==0.10.22,
+ colour ==2.3.6,
+ comonad ==5.0.8,
+ conduit ==1.3.5,
+ conduit-extra ==1.3.6,
+ containers ==0.6.7,
+ contravariant ==1.5.5,
+ cookie ==0.4.6,
+ crypto-api ==0.13.3,
+ crypto-pubkey-types ==0.4.3,
+ crypton ==0.34,
+ crypton-connection ==0.3.1,
+ crypton-x509 ==1.7.6,
+ crypton-x509-store ==1.6.9,
+ crypton-x509-system ==1.6.7,
+ crypton-x509-validation ==1.6.12,
+ csv ==0.1.2,
+ data-default ==0.7.1.1,
+ data-default-class ==0.1.2.0,
+ data-default-instances-containers ==0.0.1,
+ data-default-instances-dlist ==0.0.1,
+ data-default-instances-old-locale ==0.0.1,
+ data-fix ==0.3.2,
+ deepseq ==1.4.8.0,
+ directory ==1.3.7.1,
+ distributive ==0.6.2.1,
+ dlist ==1.0,
+ doclayout ==0.4.0.1,
+ emojis ==0.1.3,
+ entropy ==0.4.1.10,
+ exceptions ==0.10.5,
+ extra ==1.7.14,
+ file-embed ==0.0.15.0,
+ filepath ==1.4.2.2,
+ foldable1-classes-compat ==0.1,
+ generically ==0.1.1,
+ ghc-bignum ==1.3,
+ ghc-boot-th ==9.4.8,
+ ghc-prim ==0.9.1,
+ hashable ==1.4.3.0,
+ hashtables ==1.3.1,
+ hledger-lib ==1.32.1,
+ hourglass ==0.2.12,
+ hsc2hs ==0.68.10,
+ html ==1.0.1.2,
+ http-api-data ==0.6,
+ http-client ==0.7.15,
+ http-client-tls ==0.3.6.3,
+ http-types ==0.12.4,
+ indexed-traversable ==0.1.3,
+ indexed-traversable-instances ==0.1.1.2,
+ integer-conversion ==0.1.0.1,
+ integer-gmp ==1.1,
+ integer-logarithms ==1.0.3.1,
+ iproute ==1.7.12,
+ libyaml ==0.1.2,
+ megaparsec ==9.5.0,
+ memory ==0.18.0,
+ microlens ==0.4.13.1,
+ microlens-th ==0.4.3.14,
+ mime-types ==0.1.2.0,
+ modern-uri ==0.3.6.1,
+ monad-control ==1.0.3.1,
+ mono-traversable ==1.0.15.3,
+ mtl ==2.2.2,
+ mtl-compat ==0.2.2,
+ network ==3.1.4.0,
+ network-uri ==2.6.4.2,
+ old-locale ==1.0.0.7,
+ old-time ==1.1.0.3,
+ optparse-applicative ==0.18.1.0,
+ pager ==0.1.1.0,
+ parsec ==3.1.16.1,
+ parser-combinators ==1.3.0,
+ pem ==0.2.4,
+ pretty ==1.1.3.6,
+ pretty-simple ==4.1.2.0,
+ prettyprinter ==1.7.1,
+ prettyprinter-ansi-terminal ==1.1.3,
+ primitive ==0.9.0.0,
+ process ==1.6.18.0,
+ profunctors ==5.6.2,
+ quote-quot ==0.2.1.0,
+ random ==1.2.1.1,
+ raw-strings-qq ==1.1,
+ reflection ==2.1.7,
+ regex-base ==0.94.0.2,
+ regex-tdfa ==1.3.2.2,
+ req ==3.13.1,
+ resourcet ==1.3.0,
+ retry ==0.9.3.1,
+ rts ==1.0.2,
+ safe ==0.3.19,
+ safe-exceptions ==0.1.7.4,
+ scientific ==0.3.7.0,
+ semialign ==1.3,
+ semigroupoids ==6.0.0.1,
+ socks ==0.6.1,
+ split ==0.2.4,
+ splitmix ==0.1.0.5,
+ stm ==2.5.1.0,
+ streaming-commons ==0.2.2.6,
+ strict ==0.5,
+ tabular ==0.2.2.8,
+ tagged ==0.8.8,
+ tasty ==1.5,
+ tasty-hunit ==0.10.1,
+ template-haskell ==2.19.0.0,
+ terminal-size ==0.3.4,
+ terminfo ==0.4.1.5,
+ text ==2.0.2,
+ text-ansi ==0.3.0.1,
+ text-builder-linear ==0.1.2,
+ text-iso8601 ==0.1,
+ text-short ==0.1.5,
+ th-abstraction ==0.6.0.0,
+ th-compat ==0.1.4,
+ these ==1.2,
+ time ==1.12.2,
+ time-compat ==1.9.6.1,
+ timeit ==2.0,
+ tls ==1.9.0,
+ transformers ==0.5.6.2,
+ transformers-base ==0.4.6,
+ transformers-compat ==0.7.2,
+ typed-process ==0.2.11.1,
+ uglymemo ==0.1.0.1,
+ unix ==2.7.3,
+ unix-time ==0.4.11,
+ unliftio-core ==0.2.1.0,
+ unordered-containers ==0.2.19.1,
+ utf8-string ==1.0.2,
+ uuid-types ==1.0.5.1,
+ vector ==0.13.1.0,
+ vector-algorithms ==0.9.0.1,
+ vector-stream ==0.1.0.0,
+ witherable ==0.4.2,
+ xdg-basedir ==0.2.2,
+ yaml ==0.11.11.2,
+ zlib ==0.6.3.0
+nix: disable