Bump nixpkgs and simplify/clean up nix setup (#1529)

* Refactor tests and fix README

* fix linting hints from new hlint version

* postgrest-style with new nixpkgs-fmt
This commit is contained in:
Remo Rechkemmer
2020-05-20 21:30:20 -05:00
committed by GitHub
parent e6874c866d
commit 48c9ac36b1
27 changed files with 268 additions and 344 deletions
+18 -17
View File
@@ -1,28 +1,29 @@
{ runCommand }:
{
# Apply patches to a directory.
applyPatches =
name: path: patches:
runCommand name { inherit patches; }
''
set -eou pipefail
name: src: patches:
runCommand
name
{ inherit src patches; }
''
set -eou pipefail
cp -r ${path} $out
chmod -R u+w $out
cp -r $src $out
chmod -R u+w $out
for patch in $patches; do
echo "Applying patch $patch"
patch -d "$out" -p1 < "$patch"
done
'';
static-haskell-nix-postgrest-libpq =
./static-haskell-nix-postgrest-libpq.patch;
for patch in $patches; do
echo "Applying patch $patch"
patch -d "$out" -p1 < "$patch"
done
'';
# Patch is required for static builds on GHC 8.8.3, see:
# https://github.com/NixOS/nixpkgs/issues/85924
nixpkgs-revert-ghc-bootstrap =
./nixpkgs-revert-ghc-bootstrap.patch;
openssl-split-runtime-dependencies-of-static-builds =
./openssl-split-runtime-dependencies-of-static-builds.patch;
# See: https://github.com/NixOS/nixpkgs/pull/87879
nixpkgs-openssl-split-runtime-dependencies-of-static-builds =
./nixpkgs-openssl-split-runtime-dependencies-of-static-builds.patch;
}