Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
aports
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TBK
aports
Commits
bf5f52db
Commit
bf5f52db
authored
7 years ago
by
Jakub Jirutka
Browse files
Options
Downloads
Patches
Plain Diff
testing/idris: use cabal freeze and sandbox for great good
parent
735829e7
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
testing/idris/APKBUILD
+68
-28
68 additions, 28 deletions
testing/idris/APKBUILD
testing/idris/cabal.config
+109
-0
109 additions, 0 deletions
testing/idris/cabal.config
with
177 additions
and
28 deletions
testing/idris/APKBUILD
+
68
−
28
View file @
bf5f52db
# Contributor: Mitch Tishmack <mitch.tishmack@gmail.com>
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Mitch Tishmack <mitch.tishmack@gmail.com>
# Maintainer: Mitch Tishmack <mitch.tishmack@gmail.com>
#
# Note: This abuilds downloads Haskell dependencies in the prepare phase
# without any verification!
pkgname
=
idris
pkgname
=
idris
pkgver
=
1.0
pkgver
=
1.0
pkgrel
=
0
pkgrel
=
0
...
@@ -9,44 +14,78 @@ license="BSD3"
...
@@ -9,44 +14,78 @@ license="BSD3"
depends
=
"gmp-dev gcc"
depends
=
"gmp-dev gcc"
makedepends
=
"ghc cabal libffi-dev ncurses-dev zlib-dev"
makedepends
=
"ghc cabal libffi-dev ncurses-dev zlib-dev"
subpackages
=
"
$pkgname
-doc"
subpackages
=
"
$pkgname
-doc"
source
=
"
$pkgname
-
$pkgver
.tar.gz::https://github.com/idris-lang/Idris-dev/archive/v
$pkgver
.tar.gz"
source
=
"
$pkgname
-
$pkgver
.tar.gz::https://github.com/idris-lang/Idris-dev/archive/v
$pkgver
.tar.gz
cabal.config"
builddir
=
"
$srcdir
/Idris-dev-
$pkgver
"
builddir
=
"
$srcdir
/Idris-dev-
$pkgver
"
_home
=
"
$builddir
/deps"
export
CABAL_CONFIG
=
"
$srcdir
/cabal/cabal.config"
_tmp
=
"
$builddir
/tmp"
cabal_update
()
{
msg
"Updating constraints"
cd
"
$builddir
"
# Create cabal config and fetch index.
HOME
=
"
${
CABAL_CONFIG
%/*
}
"
cabal update
# Resolve deps and generate fresh cabal.config with version constraints.
rm
-f
cabal.config
cabal freeze
# Add version tag at the first line.
sed
-i
"1i--
$pkgver
"
cabal.config
mv
cabal.config
"
$startdir
"
/
cd
"
$startdir
"
abuild checksum
}
prepare
()
{
prepare
()
{
default_prepare
default_prepare
if
[
"
$(
head
-n
1
"
$srcdir
"
/cabal.config
)
"
!=
"--
$pkgver
"
]
;
then
die
"Requirements file is outdated, run 'abuild cabal_update'"
fi
cd
"
$builddir
"
cd
"
$builddir
"
mkdir
-p
"
$_tmp
"
"
$_home
"
(
# Create cabal config and fetch index.
export
HOME
=
"
$_home
"
HOME
=
"
${
CABAL_CONFIG
%/*
}
"
cabal update
export
TMPDIR
=
"
$_tmp
"
cabal update
# Cabal implicitly loads cabal.config from the project's directory.
cabal
install
libffi
-v
ln
-sf
"
$srcdir
"
/cabal.config
.
cabal
install
--dependencies-only
-v
)
# Create Cabal sandbox that will be used for all subsequent cabal
# invocations. This is something like Python virtual env.
cabal sandbox init
# Fetch all dependencies.
# XXX: This should always fetch the same versions as defined in
# our cabal.config, but Cabal does not verify packages integrity!
cabal fetch libffi
.
}
}
build
()
{
build
()
{
cd
"
$builddir
"
cd
"
$builddir
"
(
export
HOME
=
"
$_home
"
# Build dependencies.
export
TMPDIR
=
"
$_tmp
"
cabal
install
--offline
-v
libffi
# Note, ordering of prefixes is important!
cabal
install
--only-dependencies
--offline
-v
cabal configure
--prefix
=
'/usr'
\
--docdir
=
'$prefix/share/doc'
\
# Note: ordering of prefixes is important!
--datadir
=
'$prefix/share'
\
cabal configure
\
--htmldir
=
'$docdir/html'
\
--prefix
=
'/usr'
\
--libdir
=
'$prefix/lib'
\
--docdir
=
'$prefix/share/doc'
\
--libsubdir
=
"
$pkgname
"
\
--datadir
=
'$prefix/share'
\
--datasubdir
=
"
$pkgname
"
\
--htmldir
=
'$docdir/html'
\
--dynlibdir
=
"
$pkgname
"
\
--libdir
=
'$prefix/lib'
\
--disable-shared
\
--libsubdir
=
"
$pkgname
"
\
--flags
=
'GMP FFI standalone'
--datasubdir
=
"
$pkgname
"
\
cabal build
--dynlibdir
=
"
$pkgname
"
\
)
--disable-shared
\
--flags
=
'GMP FFI standalone'
cabal build
}
}
# TODO: Run upstream tests and/or figure out how to set paths to be able
# TODO: Run upstream tests and/or figure out how to set paths to be able
...
@@ -73,4 +112,5 @@ package() {
...
@@ -73,4 +112,5 @@ package() {
mv
usr/share/doc/LICENSE usr/share/licenses/
$pkgname
/
mv
usr/share/doc/LICENSE usr/share/licenses/
$pkgname
/
}
}
sha512sums
=
"a350004a8510f01d1cc8f965a9a4e2dab219f003980b98354ebb5ae42f73b32c90c98dce193943e9709d994cb92ad35814a46b79412a1afc85d42e1018c6ba10 idris-1.0.tar.gz"
sha512sums
=
"a350004a8510f01d1cc8f965a9a4e2dab219f003980b98354ebb5ae42f73b32c90c98dce193943e9709d994cb92ad35814a46b79412a1afc85d42e1018c6ba10 idris-1.0.tar.gz
e078892987816012034295be81118fbc710e3dbf08af18257e5390fc159bb5d64e1aae8a802835ca92b1e0d065524833d657bc9edffc9ebefc8cb5c02935694a cabal.config"
This diff is collapsed.
Click to expand it.
testing/idris/cabal.config
0 → 100644
+
109
−
0
View file @
bf5f52db
--
1
.
0
constraints
:
aeson
==
1
.
1
.
2
.
0
,
attoparsec
==
0
.
13
.
1
.
0
,
array
==
0
.
5
.
1
.
1
,
base
==
4
.
9
.
1
.
0
,
ghc
-
prim
==
0
.
5
.
0
.
0
,
rts
==
1
.
0
,
integer
-
gmp
==
1
.
0
.
0
.
1
,
bytestring
==
0
.
10
.
8
.
1
,
deepseq
==
1
.
4
.
2
.
0
,
containers
==
0
.
5
.
7
.
1
,
scientific
==
0
.
3
.
4
.
12
,
binary
==
0
.
8
.
3
.
0
,
hashable
==
1
.
2
.
6
.
0
,
text
==
1
.
2
.
2
.
1
,
integer
-
logarithms
==
1
.
0
.
1
,
vector
==
0
.
12
.
0
.
1
,
primitive
==
0
.
6
.
2
.
0
,
transformers
==
0
.
5
.
2
.
0
,
base
-
compat
==
0
.
9
.
3
,
unix
==
2
.
7
.
2
.
1
,
time
==
1
.
6
.
0
.
1
,
dlist
==
0
.
8
.
0
.
2
,
tagged
==
0
.
8
.
5
,
template
-
haskell
==
2
.
11
.
1
.
0
,
ghc
-
boot
-
th
==
8
.
0
.
2
,
pretty
==
1
.
1
.
3
.
3
,
transformers
-
compat
==
0
.
5
.
1
.
4
,
time
-
locale
-
compat
==
0
.
1
.
1
.
3
,
unordered
-
containers
==
0
.
2
.
8
.
0
,
uuid
-
types
==
1
.
0
.
3
,
random
==
1
.
1
,
annotated
-
wl
-
pprint
==
0
.
7
.
0
,
ansi
-
terminal
==
0
.
6
.
2
.
3
,
ansi
-
wl
-
pprint
==
0
.
6
.
7
.
3
,
async
==
2
.
1
.
1
.
1
,
stm
==
2
.
4
.
4
.
1
,
base64
-
bytestring
==
1
.
0
.
0
.
1
,
blaze
-
html
==
0
.
9
.
0
.
1
,
blaze
-
builder
==
0
.
4
.
0
.
2
,
blaze
-
markup
==
0
.
8
.
0
.
0
,
cheapskate
==
0
.
1
.
0
.
5
,
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
,
old
-
locale
==
1
.
0
.
0
.
7
,
mtl
==
2
.
2
.
1
,
syb
==
0
.
7
,
uniplate
==
1
.
6
.
12
,
xss
-
sanitize
==
0
.
3
.
5
.
7
,
css
-
text
==
0
.
1
.
2
.
2
,
network
-
uri
==
2
.
6
.
1
.
0
,
parsec
==
3
.
1
.
11
,
tagsoup
==
0
.
14
.
1
,
utf8
-
string
==
1
.
0
.
1
.
1
,
code
-
page
==
0
.
1
.
3
,
directory
==
1
.
3
.
0
.
0
,
filepath
==
1
.
4
.
1
.
1
,
fingertree
==
0
.
1
.
1
.
0
,
fsnotify
==
0
.
2
.
1
,
hinotify
==
0
.
3
.
9
,
unix
-
compat
==
0
.
4
.
3
.
1
,
haskeline
==
0
.
7
.
3
.
0
,
terminfo
==
0
.
4
.
0
.
2
,
ieee754
==
0
.
8
.
0
,
network
==
2
.
6
.
3
.
1
,
optparse
-
applicative
==
0
.
13
.
2
.
0
,
process
==
1
.
4
.
3
.
0
,
parsers
==
0
.
12
.
4
,
base
-
orphans
==
0
.
6
,
charset
==
0
.
3
.
7
.
1
,
semigroups
==
0
.
18
.
3
,
regex
-
tdfa
==
1
.
2
.
2
,
regex
-
base
==
0
.
93
.
2
,
safe
==
0
.
3
.
14
,
split
==
0
.
2
.
3
.
2
,
terminal
-
size
==
0
.
3
.
2
.
1
,
trifecta
==
1
.
6
.
2
.
1
,
comonad
==
5
.
0
.
1
,
contravariant
==
1
.
4
,
StateVar
==
1
.
1
.
0
.
4
,
void
==
0
.
7
.
2
,
distributive
==
0
.
5
.
2
,
lens
==
4
.
15
.
2
,
bifunctors
==
5
.
4
.
2
,
exceptions
==
0
.
8
.
3
,
free
==
4
.
12
.
4
,
prelude
-
extras
==
0
.
4
.
0
.
3
,
profunctors
==
5
.
2
,
semigroupoids
==
5
.
2
,
kan
-
extensions
==
5
.
0
.
2
,
adjunctions
==
4
.
3
,
fail
==
4
.
9
.
0
.
0
,
parallel
==
3
.
2
.
1
.
1
,
reflection
==
2
.
1
.
2
,
reducers
==
3
.
12
.
1
,
vector
-
binary
-
instances
==
0
.
2
.
3
.
5
,
zip
-
archive
==
0
.
3
.
0
.
6
,
digest
==
0
.
0
.
1
.
2
,
old
-
time
==
1
.
1
.
0
.
3
,
zlib
==
0
.
6
.
1
.
2
,
tasty
==
0
.
11
.
2
.
1
,
clock
==
0
.
7
.
2
,
unbounded
-
delays
==
0
.
1
.
1
.
0
,
tasty
-
golden
==
2
.
3
.
1
.
1
,
temporary
==
1
.
2
.
0
.
4
,
tasty
-
rerun
==
1
.
1
.
6
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment