mirror of
https://github.com/digital-asset/daml.git
synced 2024-11-10 19:10:28 +03:00
e32856ecf4
* Introduce shell.nix to expose the Nix tooling, if required. * dev-env: Rewrite the ghcide script to use nix-shell. * language-support/hs: Use `nix-shell` for export-package.sh. * Nix: Add a shebang to the Bazel wrapper script. CHANGELOG_BEGIN CHANGELOG_END * dev-env: Standardize the `set` header in `ghcide`.
31 lines
717 B
Bash
Executable File
31 lines
717 B
Bash
Executable File
#!/usr/bin/env nix-shell
|
|
#!nix-shell -i bash ../../../shell.nix
|
|
|
|
# Copyright (c) 2021 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
set -eou pipefail
|
|
|
|
if [ "$#" -ne 1 ]; then
|
|
echo "Expected exactly one argument."
|
|
echo "Usage: ${BASH_SOURCE[0]} TARGET_DIR"
|
|
exit 1
|
|
fi
|
|
|
|
TARGET_DIR=$(realpath $1)
|
|
|
|
cd "$(dirname ${BASH_SOURCE[0]})"
|
|
|
|
bazel build //ledger-api/grpc-definitions:all-ledger-api-haskellpb-sources
|
|
|
|
BAZEL_BIN=$(bazel info bazel-bin)
|
|
|
|
rm -rf gen
|
|
mkdir gen
|
|
mkdir gen/src
|
|
|
|
cp -rp $BAZEL_BIN/ledger-api/grpc-definitions/Google gen/src/Google
|
|
cp -rp $BAZEL_BIN/ledger-api/grpc-definitions/Com gen/src/Com
|
|
|
|
stack sdist --tar-dir $TARGET_DIR
|