-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Slightly more documented and better musl building code (#59)
* Slightly more documented and better musl building code * Disabling "codd musl build", since it was always a glibc dyn-linked exe * Fixing codd.cabal after module removal
- Loading branch information
Showing
5 changed files
with
26 additions
and
48 deletions.
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
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 |
---|---|---|
@@ -1,19 +1,23 @@ | ||
let | ||
pkgs = import ./nixpkgsMusl.nix; | ||
stdenv = pkgs.stdenv; | ||
zlib = pkgs.zlib; | ||
gmp6 = pkgs.gmp6; | ||
projectPkgs = import ../default.nix { inherit pkgs; }; | ||
pkgs = import ./nixpkgs.nix; | ||
muslPkgs = import ../default.nix { pkgs = pkgs.pkgsCross.musl64; }; | ||
glibcPkgs = import ../default.nix { inherit pkgs; }; | ||
in | ||
# The static build thing, which can be read about at https://input-output-hk.github.io/haskell.nix/tutorials/cross-compilation/#static-executables-with-musl-libc | ||
# is not working | ||
projectPkgs.codd.components.exes.codd.overrideAttrs (oldAttrs: { | ||
configureFlags = [ | ||
"--disable-executable-dynamic" | ||
"--disable-shared" | ||
"--ghc-option=-optl=-pthread" | ||
"--ghc-option=-optl=-static" | ||
"--ghc-option=-optl=-L${gmp6.override { withStatic = true; }}/lib" | ||
"--ghc-option=-optl=-L${zlib.static}/lib" | ||
]; | ||
}) | ||
{ | ||
# Sadly postgresql doesn't build with musl yet | ||
# See https://github.com/input-output-hk/haskell.nix/issues/782 | ||
codd-musl = muslPkgs.codd.components.exes.codd.overrideAttrs (oldAttrs: { | ||
configureFlags = [ | ||
"--disable-executable-dynamic" | ||
"--disable-shared" | ||
"--ghc-option=-optl=-pthread" | ||
"--ghc-option=-optl=-static" | ||
|
||
# The two below don't use musl gmp6 and zlib. Is this right? | ||
"--ghc-option=-optl=-L${pkgs.gmp6.override { withStatic = true; }}/lib" | ||
"--ghc-option=-optl=-L${pkgs.zlib.static}/lib" | ||
]; | ||
}); | ||
|
||
codd-glibc = glibcPkgs.codd.components.exes.codd; | ||
} |
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 was deleted.
Oops, something went wrong.