-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
nix: hack static-haskell-nix for updated nixpkgs
This patches static-haskell-nix to work for building postgrest with updated nixpkgs (from ~202203): - The ncurses 'enableStatic' argument doesn't exist anymore. We use the vanilla package instead, which seems to work fine. - The 'isExecutable' check fails with a strange error related to trying to override 'mkDerivation'. We patch 'isExecutable' to check explicitly whether we're building postgrest. ('isExecutable' is used to determine whether to build a package statically.)
- Loading branch information
Showing
4 changed files
with
38 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
diff --git a/survey/default.nix b/survey/default.nix | ||
index 46d8066..5f7950b 100644 | ||
--- a/survey/default.nix | ||
+++ b/survey/default.nix | ||
@@ -85,10 +85,9 @@ let | ||
# Function that tells us if a given Haskell package has an executable. | ||
# Pass only Haskell packages to this! | ||
# Filter away other stuff with `isProperHaskellPackage` first. | ||
- isExecutable = pkg: | ||
- (pkgs.haskell.lib.overrideCabal pkg (drv: { | ||
- passthru.isExecutable = drv.isExecutable or false; | ||
- })).isExecutable; | ||
+ # FIXME postgrest: original fails with our nixpkgs version, we | ||
+ # just hardcode the check to work for a static postgrest build. | ||
+ isExecutable = pkg: pkg.name == "postgrest"; | ||
|
||
# Turn e.g. `Cabal_1_2_3_4` into `1.2.3.4`. | ||
cabalDottedVersion = |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
diff --git a/survey/default.nix b/survey/default.nix | ||
index 46d8066..a47f214 100644 | ||
--- a/survey/default.nix | ||
+++ b/survey/default.nix | ||
@@ -1519,7 +1519,7 @@ let | ||
[ | ||
"--enable-executable-static" # requires `useFixedCabal` | ||
# `enableShared` seems to be required to avoid `recompile with -fPIC` errors on some packages. | ||
- "--extra-lib-dirs=${final.ncurses.override { enableStatic = true; enableShared = true; }}/lib" | ||
+ "--extra-lib-dirs=${final.ncurses}/lib" | ||
] | ||
# TODO Figure out why this and the below libffi are necessary. | ||
# `working` and `workingStackageExecutables` don't seem to need that, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters