Skip to content

Commit f488491

Browse files
authored
Merge pull request #27 from MatrixAI/static-exe
Add static executable example
2 parents 5dc282b + ec7beb4 commit f488491

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

default.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# the names here can clash with non-haskell dependencies
33
# make sure to specify the names the explicitly that may be clashing
44
{ callPackage
5+
, mkDerivation
56
, nix-gitignore
67
, makeWrapper
78
, hello

release.nix

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ in
1010
rec {
1111
library = drv;
1212
application = drv;
13+
# justStaticExecutables applies static linking to haskell libraries.
14+
# System libraries are still dynamically linked.
15+
applicationStatic = pkgs.haskell.lib.justStaticExecutables drv;
1316
docker = dockerTools.buildImage {
1417
name = application.name;
1518
contents = application;

0 commit comments

Comments
 (0)