Skip to content

Commit

Permalink
update nix build
Browse files Browse the repository at this point in the history
  • Loading branch information
ekg committed May 29, 2024
1 parent e2df9c8 commit f94b7ee
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 ];
Expand All @@ -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
Expand Down

0 comments on commit f94b7ee

Please sign in to comment.