buildCrystalPackage: add copyShardDeps flag
This commit is contained in:
parent
a0692d3b21
commit
9c1f3b305a
1 changed files with 5 additions and 1 deletions
|
@ -26,6 +26,9 @@
|
|||
# The default `crystal build` options can be overridden with { foo.options = [ "--optionname" ]; }
|
||||
, crystalBinaries ? { }
|
||||
, enableParallelBuilding ? true
|
||||
# Copy all shards dependencies instead of symlinking and add write permissions
|
||||
# to make environment more local-like
|
||||
, copyShardDeps ? false
|
||||
, ...
|
||||
}@args:
|
||||
|
||||
|
@ -78,7 +81,8 @@ stdenv.mkDerivation (mkDerivationArgs // {
|
|||
++ lib.optional (lockFile != null) "cp ${lockFile} ./shard.lock"
|
||||
++ lib.optionals (shardsFile != null) [
|
||||
"test -e lib || mkdir lib"
|
||||
"for d in ${crystalLib}/*; do ln -s $d lib/; done"
|
||||
(if copyShardDeps then "for d in ${crystalLib}/*; do cp -r $d/ lib/; done; chmod -R +w lib/"
|
||||
else "for d in ${crystalLib}/*; do ln -s $d lib/; done")
|
||||
"cp shard.lock lib/.shards.info"
|
||||
]
|
||||
++ [ "runHook postConfigure" ]
|
||||
|
|
Loading…
Reference in a new issue