-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathflake.nix
More file actions
70 lines (63 loc) · 2.54 KB
/
Copy pathflake.nix
File metadata and controls
70 lines (63 loc) · 2.54 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
{
description = "An ARINC 653 implementation on top of POSIX";
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05";
inputs.flake-utils.url = "github:numtide/flake-utils";
# inputs.arinc653-wasm.url = "github:psiegl/arinc653-wasm/psiegl-old";
outputs = { self, nixpkgs, flake-utils }: # arinc653-wasm
flake-utils.lib.eachSystem [ "x86_64-linux" "aarch64-linux" "powerpc64-linux"] (system:
let
# import the nixpkgs, passing the current system as arg
pkgs = import nixpkgs {
inherit system;
};
# arinc653Packages = arinc653-wasm.packages.${system} or {};
in
{
packages = rec {
# define default package
default = a653lib;
# just call the package with the normal stdenv
a653lib = pkgs.callPackage ./pkgs/a653lib.nix { };
# a653lib-wasm = pkgs.callPackage ./pkgs/a653lib.nix {
# enableWasm = true;
#
# clang = pkgs.clang;
# wasiSdk = pkgs.wasi-sdk;
# wasmtime = pkgs.wasmtime;
# wamr = pkgs.wamr;
# cAbiLens = arinc653Packages.c-abi-lens;
# };
# override the stdenv to use an older gcc
a653lib-gcc11 =
let
stdenv = pkgs.overrideCC pkgs.stdenv pkgs.gcc11;
in
pkgs.callPackage ./pkgs/a653lib.nix { inherit stdenv; };
# override the build to be with debug symbols (source still missing though)
a653lib-debug = pkgs.enableDebugging a653lib;
# cross compile for a pre-defined target platform
a653lib-aarch64 = pkgs.pkgsCross.aarch64-multiplatform-musl.pkgsStatic.callPackage ./pkgs/a653lib.nix { };
# cross compile for a custom defined target platform
a653lib-armv7a =
let
# import nixpkgs, defining a crossSystem via llvm target triple
pkgsCross = import nixpkgs {
inherit system;
crossSystem.config = "armv7l-unknown-linux-musleabi";
};
in
pkgsCross.callPackage ./pkgs/a653lib.nix { };
# cross compile for a custom defined target platform
a653lib-powerpc64 =
let
# import nixpkgs, defining a crossSystem via llvm target triple
pkgsCross = import nixpkgs {
inherit system;
crossSystem.config = "powerpc64-unknown-linux-gnuabielfv2";
};
in
pkgsCross.pkgsStatic.callPackage ./pkgs/a653lib.nix { };
};
}
);
}