Install mostly static executables on OS X when using Nix (#830)

These aren't fully static executables (they still have some
`/nix/store` references), but they at least compile Haskell dependencies
statically.  That means that they can be `nix-env --install`ed side-by-side
with other Haskell executables, which would otherwise conflict with an
error like this one:

```
error: packages '/nix/store/hrxnlwlsiw5jjjkq5v6ihcwb0shx4fga-dhall-1.20.1/lib/li
nks/libHSbasement-0.0.8-8QjArDsw3GWCcbHE5iqtz3-ghc8.4.3.dylib' and '/nix/store/d
2y5373anwf1q3h86ar3lljk11k1lq0h-dhall-json-1.2.6/lib/links/libHSbasement-0.0.8-8
QjArDsw3GWCcbHE5iqtz3-ghc8.4.3.dylib' have the same priority 5; use 'nix-env --s
et-flag priority NUMBER INSTALLED_PKGNAME' to change the priority of one of the
conflicting packages (0 being the highest priority)
```
This commit is contained in:
Gabriel Gonzalez 2019-03-04 19:43:31 -08:00 committed by GitHub
parent 05d9405d29
commit aa359813c4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 5 additions and 5 deletions

View File

@ -1 +1 @@
(import ../nix/shared.nix {}).dhall-bash
(import ../nix/shared.nix {}).possibly-static.dhall-bash

View File

@ -1 +1 @@
(import ../nix/shared.nix {}).dhall-json
(import ../nix/shared.nix {}).possibly-static.dhall-json

View File

@ -1 +1 @@
(import ../nix/shared.nix {}).dhall-text
(import ../nix/shared.nix {}).possibly-static.dhall-text

View File

@ -1 +1 @@
(import ../nix/shared.nix {}).dhall
(import ../nix/shared.nix {}).possibly-static.dhall

View File

@ -505,7 +505,7 @@ let
then
pkgsStaticLinux.pkgsMusl.haskell.packages."${compiler}"."${name}-static"
else
pkgs.haskell.packages."${compiler}"."${name}";
pkgs.haskell.lib.justStaticExecutables (pkgs.haskell.packages."${compiler}"."${name}");
makeTarball = name:
pkgsStaticLinux.releaseTools.binaryTarball rec {