File tree Expand file tree Collapse file tree 2 files changed +27
-1
lines changed
Expand file tree Collapse file tree 2 files changed +27
-1
lines changed Original file line number Diff line number Diff line change 5252 ( import ./nix/tools.nix inputs )
5353 ( import ./nix/ouroboros-network.nix inputs )
5454 ( import ./nix/network-docs.nix inputs )
55+ ( final : _prev : {
56+ static-libsodium-vrf = final . libsodium-vrf . overrideDerivation ( old : {
57+ configureFlags = old . configureFlags ++ [ "--disable-shared" ] ;
58+ } ) ;
59+ static-secp256k1 = final . secp256k1 . overrideDerivation ( old : {
60+ configureFlags = old . configureFlags ++ [ "--enable-static" "--disable-shared" ] ;
61+ } ) ;
62+ static-gmp = ( final . gmp . override { withStatic = true ; } ) . overrideDerivation ( old : {
63+ configureFlags = old . configureFlags ++ [ "--enable-static" "--disable-shared" ] ;
64+ } ) ;
65+ static-libblst = ( final . libblst . override { enableShared = false ; } ) . overrideDerivation ( _old : {
66+ postFixup = "" ;
67+ } ) ;
68+ } )
5569 ] ;
5670 } ;
5771
116130 pkgs . setGitRev
117131 ( inputs . self . rev or inputs . self . dirtyShortRev )
118132 flake . packages . "dmq-node:exe:dmq-node" ;
133+ packages . dmq-node-static =
134+ pkgs . setGitRev
135+ ( inputs . self . rev or inputs . self . dirtyShortRev )
136+ flake . packages . "x86_64-unknown-linux-musl:dmq-node:exe:dmq-node" ;
119137 inherit hydraJobs legacyPackages devShells ;
120138 }
121139 ) ;
Original file line number Diff line number Diff line change 5555
5656 # we also want cross compilation to windows on linux (and only with default compiler).
5757 crossPlatforms =
58- p : lib . optionals ( pkgs . stdenv . hostPlatform . isLinux && config . compiler-nix-name == crossGHCVersion ) [ p . ucrt64 ] ;
58+ p : lib . optionals ( pkgs . stdenv . hostPlatform . isLinux && config . compiler-nix-name == crossGHCVersion ) [ p . ucrt64 p . musl64 ] ;
5959
6060 #
6161 # VARIANTS
124124 ( { pkgs , ... } : lib . mkIf pkgs . stdenv . hostPlatform . isWindows {
125125 packages . basement . configureFlags = [ "--hsc2hs-options=--cflag=-Wno-int-conversion" ] ;
126126 } )
127+ ( { pkgs , ... } : lib . mkIf pkgs . stdenv . hostPlatform . isMusl {
128+ packages . dmq-node . ghcOptions = with pkgs ; [
129+ "-L${ lib . getLib static-gmp } /lib"
130+ "-L${ lib . getLib static-libsodium-vrf } /lib"
131+ "-L${ lib . getLib static-secp256k1 } /lib"
132+ "-L${ lib . getLib static-libblst } /lib"
133+ ] ;
134+ } )
127135 ] ;
128136 } ) ;
129137in
You can’t perform that action at this time.
0 commit comments