Skip to content

Commit aa35981

Browse files
authored
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) ```
1 parent 05d9405 commit aa35981

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

dhall-bash/default.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
(import ../nix/shared.nix {}).dhall-bash
1+
(import ../nix/shared.nix {}).possibly-static.dhall-bash

dhall-json/default.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
(import ../nix/shared.nix {}).dhall-json
1+
(import ../nix/shared.nix {}).possibly-static.dhall-json

dhall-text/default.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
(import ../nix/shared.nix {}).dhall-text
1+
(import ../nix/shared.nix {}).possibly-static.dhall-text

dhall/default.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
(import ../nix/shared.nix {}).dhall
1+
(import ../nix/shared.nix {}).possibly-static.dhall

nix/shared.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -505,7 +505,7 @@ let
505505
then
506506
pkgsStaticLinux.pkgsMusl.haskell.packages."${compiler}"."${name}-static"
507507
else
508-
pkgs.haskell.packages."${compiler}"."${name}";
508+
pkgs.haskell.lib.justStaticExecutables (pkgs.haskell.packages."${compiler}"."${name}");
509509

510510
makeTarball = name:
511511
pkgsStaticLinux.releaseTools.binaryTarball rec {

0 commit comments

Comments
 (0)