2018-08-12 16:17:28 +02:00
|
|
|
src:
|
|
|
|
|
2019-03-24 19:01:43 +01:00
|
|
|
{ cabal-install, coreutils, glibcLocales, lib, runCommand, stdenv }:
|
2018-08-12 16:17:28 +02:00
|
|
|
|
2019-03-24 19:01:43 +01:00
|
|
|
runCommand "dhall-sdist"
|
|
|
|
( { LANG = "en_US.UTF-8"; }
|
|
|
|
// lib.optionalAttrs (stdenv.buildPlatform.libc == "glibc")
|
|
|
|
{ LOCALE_ARCHIVE = "${glibcLocales}/lib/locale/locale-archive"; }
|
|
|
|
)
|
|
|
|
''
|
2018-08-12 16:17:28 +02:00
|
|
|
${coreutils}/bin/mkdir $out
|
|
|
|
${coreutils}/bin/cp --recursive ${src} src
|
|
|
|
cd src
|
|
|
|
${coreutils}/bin/chmod --recursive u+w .
|
|
|
|
${coreutils}/bin/mkdir dist
|
|
|
|
HOME=$PWD ${cabal-install}/bin/cabal sdist --output-directory=$out
|
2019-03-24 19:01:43 +01:00
|
|
|
''
|