mirror of
https://github.com/justinwoo/easy-dhall-nix.git
synced 2024-11-26 21:19:42 +01:00
fix(macos): allow multiple directories in the tarball
Some of the releases (only MacOS, sigh) lately contain more than one directory. With this we should be able to get around that.
This commit is contained in:
parent
635d2ed992
commit
646a850fc1
1 changed files with 9 additions and 2 deletions
11
build.nix
11
build.nix
|
@ -23,13 +23,15 @@ pkgs.stdenv.mkDerivation rec {
|
||||||
|
|
||||||
passthru.binNames = binNames;
|
passthru.binNames = binNames;
|
||||||
|
|
||||||
|
sourceRoot = ".";
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
mkdir -p $out/bin
|
mkdir -p $out/bin
|
||||||
|
|
||||||
${pkgs.lib.concatMapStringsSep "\n" (binName: ''
|
${pkgs.lib.concatMapStringsSep "\n" (binName: ''
|
||||||
binPath="$out/bin/${binName}"
|
binPath="$out/bin/${binName}"
|
||||||
install -D -m555 -T "${binName}" "$binPath"
|
install -D -m555 -T "bin/${binName}" "$binPath"
|
||||||
rm "${binName}"
|
rm "bin/${binName}"
|
||||||
|
|
||||||
"$binPath" --bash-completion-script "$binPath" > "${binName}.bash"
|
"$binPath" --bash-completion-script "$binPath" > "${binName}.bash"
|
||||||
installShellCompletion --bash "${binName}.bash"
|
installShellCompletion --bash "${binName}.bash"
|
||||||
|
@ -42,6 +44,11 @@ pkgs.stdenv.mkDerivation rec {
|
||||||
rm "${binName}.fish"
|
rm "${binName}.fish"
|
||||||
'') binNames}
|
'') binNames}
|
||||||
|
|
||||||
|
rmdir bin
|
||||||
|
|
||||||
|
# a bit hacky, but sourceRoot unfortunately unpacks to the runtime build dir
|
||||||
|
rm env-vars .sandbox.sb || true
|
||||||
|
|
||||||
# check that we didn’t forget any files (maybe a new binary was added)
|
# check that we didn’t forget any files (maybe a new binary was added)
|
||||||
if [ ! -z "$(${pkgs.lr}/bin/lr -1 -t 'depth == 1' .)" ]; then
|
if [ ! -z "$(${pkgs.lr}/bin/lr -1 -t 'depth == 1' .)" ]; then
|
||||||
echo "still some files remaining!" >&2
|
echo "still some files remaining!" >&2
|
||||||
|
|
Loading…
Reference in a new issue