nix(refactor): Move shell scripts to subdirectory nix/tools
This commit is contained in:
committed by
Wolfgang Walther
parent
fe497fc438
commit
b566481477
+10
-10
@@ -104,21 +104,21 @@ rec {
|
|||||||
|
|
||||||
# Docker images and loading script.
|
# Docker images and loading script.
|
||||||
docker =
|
docker =
|
||||||
pkgs.callPackage nix/docker { postgrest = postgrestStatic; };
|
pkgs.callPackage nix/tools/docker { postgrest = postgrestStatic; };
|
||||||
|
|
||||||
env =
|
env =
|
||||||
postgrest.env;
|
postgrest.env;
|
||||||
|
|
||||||
# Utility for updating the pinned version of Nixpkgs.
|
# Utility for updating the pinned version of Nixpkgs.
|
||||||
nixpkgsTools =
|
nixpkgsTools =
|
||||||
pkgs.callPackage nix/nixpkgstools.nix { };
|
pkgs.callPackage nix/tools/nixpkgstools.nix { };
|
||||||
|
|
||||||
withTools =
|
withTools =
|
||||||
pkgs.callPackage nix/withtools.nix { inherit postgresqlVersions; };
|
pkgs.callPackage nix/tools/withtools.nix { inherit postgresqlVersions; };
|
||||||
|
|
||||||
# Scripts for running tests.
|
# Scripts for running tests.
|
||||||
tests =
|
tests =
|
||||||
pkgs.callPackage nix/tests.nix {
|
pkgs.callPackage nix/tools/tests.nix {
|
||||||
inherit postgrest devCabalOptions withTools;
|
inherit postgrest devCabalOptions withTools;
|
||||||
ghc = pkgs.haskell.compiler."${compiler}";
|
ghc = pkgs.haskell.compiler."${compiler}";
|
||||||
hpc-codecov = pkgs.haskell.packages."${compiler}".hpc-codecov;
|
hpc-codecov = pkgs.haskell.packages."${compiler}".hpc-codecov;
|
||||||
@@ -126,11 +126,11 @@ rec {
|
|||||||
|
|
||||||
# Script for running memory tests.
|
# Script for running memory tests.
|
||||||
memory =
|
memory =
|
||||||
pkgs.callPackage nix/memory.nix { inherit postgrestProfiled withTools; };
|
pkgs.callPackage nix/tools/memory.nix { inherit postgrestProfiled withTools; };
|
||||||
|
|
||||||
# Linting and styling scripts.
|
# Linting and styling tools.
|
||||||
style =
|
style =
|
||||||
pkgs.callPackage nix/style.nix { };
|
pkgs.callPackage nix/tools/style.nix { };
|
||||||
|
|
||||||
# Tooling for analyzing Haskell imports and exports.
|
# Tooling for analyzing Haskell imports and exports.
|
||||||
hsie =
|
hsie =
|
||||||
@@ -138,13 +138,13 @@ rec {
|
|||||||
ghcWithPackages = pkgs.haskell.packages."${compiler}".ghcWithPackages;
|
ghcWithPackages = pkgs.haskell.packages."${compiler}".ghcWithPackages;
|
||||||
};
|
};
|
||||||
|
|
||||||
# Development tools, including linting and styling scripts.
|
# Development tools.
|
||||||
devtools =
|
devtools =
|
||||||
pkgs.callPackage nix/devtools.nix { inherit tests style devCabalOptions hsie; };
|
pkgs.callPackage nix/tools/devtools.nix { inherit tests style devCabalOptions hsie; };
|
||||||
|
|
||||||
# Scripts for publishing new releases.
|
# Scripts for publishing new releases.
|
||||||
release =
|
release =
|
||||||
pkgs.callPackage nix/release {
|
pkgs.callPackage nix/tools/release {
|
||||||
inherit docker;
|
inherit docker;
|
||||||
postgrest = postgrestStatic;
|
postgrest = postgrestStatic;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ let
|
|||||||
--replace nightly \
|
--replace nightly \
|
||||||
"postgrest-nightly-$suffix-linux-x64-static.tar.xz"
|
"postgrest-nightly-$suffix-linux-x64-static.tar.xz"
|
||||||
else
|
else
|
||||||
changes="$(sed -n "1,/$_arg_version/d;/## \[/q;p" ${../../CHANGELOG.md})"
|
changes="$(sed -n "1,/$_arg_version/d;/## \[/q;p" ${../../../CHANGELOG.md})"
|
||||||
|
|
||||||
tar cvJf "postgrest-$_arg_version-linux-x64-static.tar.xz" \
|
tar cvJf "postgrest-$_arg_version-linux-x64-static.tar.xz" \
|
||||||
-C ${postgrest}/bin postgrest
|
-C ${postgrest}/bin postgrest
|
||||||
@@ -27,7 +27,7 @@ let
|
|||||||
if test ! -v PGRST_DB_URI; then
|
if test ! -v PGRST_DB_URI; then
|
||||||
export PATH=${postgresql}/bin:"$PATH"
|
export PATH=${postgresql}/bin:"$PATH"
|
||||||
|
|
||||||
exec ${../test/with_tmp_db} "$_arg_command" "''${_arg_leftovers[@]}"
|
exec ${../../test/with_tmp_db} "$_arg_command" "''${_arg_leftovers[@]}"
|
||||||
else
|
else
|
||||||
"$@"
|
"$@"
|
||||||
fi
|
fi
|
||||||
Reference in New Issue
Block a user