mirror of
https://github.com/PaddiM8/kalker.git
synced 2025-06-27 05:02:32 +02:00
Merge pull request #61 from Kloenk/aarch64-darwin
Fix nix flake build for aarch64-darwin
This commit is contained in:
commit
72d5e39e87
32
flake.nix
32
flake.nix
@ -1,14 +1,10 @@
|
|||||||
{
|
{
|
||||||
description = "A very basic flake";
|
description = "A calculator program/website";
|
||||||
|
|
||||||
outputs = { self, nixpkgs }:
|
outputs = { self, nixpkgs }:
|
||||||
let
|
let
|
||||||
systems = [
|
systems =
|
||||||
"x86_64-linux"
|
[ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];
|
||||||
"aarch64-linux"
|
|
||||||
"x86_64-darwin"
|
|
||||||
#"aarch64-darwin" # currently not building due to gmp
|
|
||||||
];
|
|
||||||
|
|
||||||
forAllSystems = f: nixpkgs.lib.genAttrs systems (system: f system);
|
forAllSystems = f: nixpkgs.lib.genAttrs systems (system: f system);
|
||||||
|
|
||||||
@ -25,7 +21,7 @@
|
|||||||
|
|
||||||
src = self;
|
src = self;
|
||||||
|
|
||||||
nativeBuildInputs = with final; [ m4 ];
|
nativeBuildInputs = with final; [ gcc ];
|
||||||
|
|
||||||
outputs = [ "out" "lib" ];
|
outputs = [ "out" "lib" ];
|
||||||
|
|
||||||
@ -35,21 +31,23 @@
|
|||||||
|
|
||||||
cargoLock = { lockFile = self + "/Cargo.lock"; };
|
cargoLock = { lockFile = self + "/Cargo.lock"; };
|
||||||
|
|
||||||
}
|
|
||||||
# FIXME: fix aarch64-darwin builds
|
|
||||||
/* // (if (final.stdenv.isDarwin && final.stdenv.isAarch64) then {
|
|
||||||
CARGO_FEATURE_USE_SYSTEM_LIBS = "1";
|
|
||||||
RUST_BACKTRACE = "1";
|
|
||||||
buildInputs = with final; [ gmp mpfr libmpc ];
|
buildInputs = with final; [ gmp mpfr libmpc ];
|
||||||
} else
|
|
||||||
{ })
|
CARGO_FEATURE_USE_SYSTEM_LIBS = "1";
|
||||||
*/
|
};
|
||||||
;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
packages = forAllSystems (system: nixpkgsFor.${system});
|
packages = forAllSystems (system: nixpkgsFor.${system});
|
||||||
|
|
||||||
defaultPackage = forAllSystems (system: self.packages.${system}.kalker);
|
defaultPackage = forAllSystems (system: self.packages.${system}.kalker);
|
||||||
|
|
||||||
|
apps = forAllSystems (system: {
|
||||||
|
kalker = {
|
||||||
|
type = "app";
|
||||||
|
program = "${self.packages.${system}.kalker}/bin/kalker";
|
||||||
|
};
|
||||||
|
});
|
||||||
|
|
||||||
|
defaultApp = forAllSystems (system: self.apps.${system}.kalker);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user