From f94b7eefb3590aac40d4da2828d47783e59559c4 Mon Sep 17 00:00:00 2001 From: Erik Garrison Date: Wed, 29 May 2024 17:55:55 -0500 Subject: [PATCH] update nix build --- flake.nix | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/flake.nix b/flake.nix index 0f02f985..2a37f31b 100644 --- a/flake.nix +++ b/flake.nix @@ -16,8 +16,8 @@ src = pkgs.fetchFromGitHub { owner = "waveygang"; repo = "wfmash"; - rev = "517e1bc5c133ecac483a8479c5403f8a13d0fdd5"; - sha256 = "sha256-pjaFbcSA7cNx1ONg7JiBO4g22++EOYXQfdieyy1kAuI="; + rev = "e2df9c89d07a126c87518eaa1b34e75e26ddc41b"; + sha256 = "sha256-uKTbvABIR0VTZCuFe5Mr3NPR7ynbn0rkJAivTVQe9dc="; }; nativeBuildInputs = [ pkgs.cmake pkgs.makeWrapper ]; @@ -32,6 +32,14 @@ pkgs.pkg-config ]; + # Define custom attributes + enableOptimizations = true; + reproducibleBuild = false; + + # Use custom attributes to set compiler flags + CFLAGS = if enableOptimizations then "-O3 -march=native" else ""; + CXXFLAGS = if enableOptimizations then "-O3 -march=native" else ""; + postPatch = '' mkdir -p include echo "#define WFMASH_GIT_VERSION \"${version}\"" > include/wfmash_git_version.hpp