mirror of
https://github.com/bdnugget/nix-config.git
synced 2026-11-07 09:07:27 +00:00
419 B
419 B
Distribute a binary
cabal new-configure --disable-executable-dynamic --ghc-option=-optl=-static --ghc-option=-optl=-pthread
If using cabal2nix then:
nix-build | cachix push <name>
The binary will be left at ./result/bin/, no dependencies. Copy it, change the permissions and ship it!
cp ./result/bin/my-app ~/my-app && cd ~/
chown <user> my-app
tar -czvf my-app.tar.gz my-app