Skip to content

Commit

Permalink
update flake
Browse files Browse the repository at this point in the history
  • Loading branch information
foolnotion committed May 28, 2024
1 parent 4950d7a commit e89367c
Showing 1 changed file with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@
name = "operon";
src = self;

enableShared = true;

cmakeFlags = [
"-DBUILD_CLI_PROGRAMS=ON"
"-DBUILD_SHARED_LIBS=${if pkgs.stdenv.hostPlatform.isStatic then "OFF" else "ON"}"
"-DBUILD_TESTING=OFF"
"--preset ${if pkgs.stdenv.hostPlatform.isx86_64 then "build-linux" else "build-osx"}"
"-DCMAKE_BUILD_TYPE=Release"
"-DUSE_SINGLE_PRECISION=ON"
];
Expand Down Expand Up @@ -88,18 +88,16 @@
packages = {
default = operon.overrideAttrs(old: {
cmakeFlags = old.cmakeFlags ++ [
"-DCMAKE_CXX_FLAGS=${
if pkgs.stdenv.hostPlatform.isx86_64 then "-march=x86-64-v3" else ""
}"
"-DBUILD_CLI_PROGRAMS=ON"
];
});

operon-generic = operon.overrideAttrs(old: {
cmakeFlags = old.cmakeFlags ++ [
"-DCMAKE_CXX_FLAGS=${
if pkgs.stdenv.hostPlatform.isx86_64 then "-march=x86-64" else ""
}"
];
library = operon.overrideAttrs(old: {
enableShared = true;
});

library-static = operon.overrideAttrs(old: {
enableShared = false;
});
};

Expand Down

0 comments on commit e89367c

Please sign in to comment.