File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed
Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change 5252 } . ${ system } or null ;
5353
5454 overlays = [ ( import rust-overlay ) ] ;
55+
56+ # Derive version from Cargo.toml so there is a single source of truth
57+ version = ( builtins . fromTOML ( builtins . readFile ./Cargo.toml ) ) . workspace . package . version ;
58+
5559 lib = pkgs . lib ;
5660 stdenv = pkgs . stdenv ;
5761 isDarwin = stdenv . isDarwin ;
159163
160164 # Common args for all Crane builds
161165 commonCraneArgs = {
162- inherit src ;
166+ inherit src version ;
163167 pname = "cdk" ;
164- version = "0.15.0-rc.0" ;
165168
166169 nativeBuildInputs = with pkgs ; [
167170 pkg-config
193196 # Common args for static musl builds (Linux only)
194197 # Produces fully statically-linked binaries that run on any Linux system
195198 commonCraneArgsStatic = {
196- inherit src ;
199+ inherit src version ;
197200 pname = "cdk-static" ;
198- version = "0.15.0-rc.0" ;
199201
200202 # Cross-compile to musl for fully static linking
201203 CARGO_BUILD_TARGET = muslTarget ;
300302 # Helper function to create WASM build checks
301303 # WASM builds don't need native libs like openssl
302304 mkWasmBuild = name : cargoArgs : craneLib . cargoBuild ( {
303- inherit src ;
305+ inherit src version ;
304306 pname = "cdk-wasm-${ name } " ;
305- version = "0.15.0-rc.0" ;
306307 cargoArtifacts = workspaceDeps ;
307308 cargoExtraArgs = "${ cargoArgs } --target wasm32-unknown-unknown" ;
308309 # WASM doesn't need native build inputs
You can’t perform that action at this time.
0 commit comments