Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

consolidate nixpkgs imports #21

Merged
merged 1 commit into from
Aug 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions .github/workflows/nix.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,22 @@ jobs:
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
- name: Build
run: nix build .#packages.x86_64-linux.crossStdenvAarch64 --print-build-logs
x86_64-linux---packages---crossStdenvAarch64OldBintools:
name: x86_64-linux---packages---crossStdenvAarch64OldBintools
runs-on:
- ubuntu-latest
needs: []
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v25
with:
nix_path: nixpkgs=channel:nixos-unstable
- uses: cachix/cachix-action@v14
with:
name: dlr-ft
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
- name: Build
run: nix build .#packages.x86_64-linux.crossStdenvAarch64OldBintools --print-build-logs
x86_64-linux---packages---crossStdenvArmv7l:
name: x86_64-linux---packages---crossStdenvArmv7l
runs-on:
Expand All @@ -107,6 +123,22 @@ jobs:
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
- name: Build
run: nix build .#packages.x86_64-linux.crossStdenvArmv7l --print-build-logs
x86_64-linux---packages---crossStdenvArmv7lOldBintools:
name: x86_64-linux---packages---crossStdenvArmv7lOldBintools
runs-on:
- ubuntu-latest
needs: []
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v25
with:
nix_path: nixpkgs=channel:nixos-unstable
- uses: cachix/cachix-action@v14
with:
name: dlr-ft
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
- name: Build
run: nix build .#packages.x86_64-linux.crossStdenvArmv7lOldBintools --print-build-logs
x86_64-linux---packages---crossStdenvi686:
name: x86_64-linux---packages---crossStdenvi686
runs-on:
Expand Down Expand Up @@ -245,6 +277,7 @@ jobs:
- x86_64-linux---packages---camkes-deps
- x86_64-linux---packages---capDL-tool
- x86_64-linux---packages---concurrencytest
- x86_64-linux---packages---crossStdenvAarch64OldBintools
- x86_64-linux---packages---guardonce
- x86_64-linux---packages---pyfdt
- x86_64-linux---packages---seL4-deps
Expand All @@ -267,6 +300,7 @@ jobs:
- x86_64-linux---packages---camkes-deps
- x86_64-linux---packages---capDL-tool
- x86_64-linux---packages---concurrencytest
- x86_64-linux---packages---crossStdenvAarch64OldBintools
- x86_64-linux---packages---guardonce
- x86_64-linux---packages---pyfdt
- x86_64-linux---packages---seL4-deps
Expand All @@ -289,6 +323,7 @@ jobs:
- x86_64-linux---packages---camkes-deps
- x86_64-linux---packages---capDL-tool
- x86_64-linux---packages---concurrencytest
- x86_64-linux---packages---crossStdenvAarch64OldBintools
- x86_64-linux---packages---guardonce
- x86_64-linux---packages---pyfdt
- x86_64-linux---packages---seL4-deps
Expand All @@ -311,6 +346,7 @@ jobs:
- x86_64-linux---packages---camkes-deps
- x86_64-linux---packages---capDL-tool
- x86_64-linux---packages---concurrencytest
- x86_64-linux---packages---crossStdenvAarch64OldBintools
- x86_64-linux---packages---guardonce
- x86_64-linux---packages---pyfdt
- x86_64-linux---packages---seL4-deps
Expand All @@ -333,6 +369,7 @@ jobs:
- x86_64-linux---packages---camkes-deps
- x86_64-linux---packages---capDL-tool
- x86_64-linux---packages---concurrencytest
- x86_64-linux---packages---crossStdenvArmv7lOldBintools
- x86_64-linux---packages---guardonce
- x86_64-linux---packages---pyfdt
- x86_64-linux---packages---seL4-deps
Expand Down
177 changes: 57 additions & 120 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,18 @@
overlays = [ self.overlays.default ];
});

pkgsCrossArmv7lOldBintools = (import nixpkgs {
inherit system;
crossSystem.config = "armv7l-unknown-linux-gnueabihf";
overlays = [ self.overlays.default self.overlays.oldBintools ];
});

pkgsCrossAarch64OldBintools = (import nixpkgs {
inherit system;
crossSystem.config = "aarch64-unknown-linux-gnu";
overlays = [ self.overlays.default self.overlays.oldBintools ];
});

pkgsCrossi686 = (import nixpkgs {
inherit system;
crossSystem.config = "i686-unknown-linux-gnu";
Expand All @@ -50,6 +62,8 @@
#
crossStdenvAarch64 = pkgsCrossAarch64.stdenvNoLibs;
crossStdenvArmv7l = pkgsCrossArmv7l.stdenvNoLibs;
crossStdenvAarch64OldBintools = pkgsCrossAarch64OldBintools.stdenvNoLibs;
crossStdenvArmv7lOldBintools = pkgsCrossArmv7lOldBintools.stdenvNoLibs;
crossStdenvi686 = pkgsCrossi686.stdenvNoLibs;
crossStdenvx86_64 = pkgsCrossx86_64.stdenvNoLibs;

Expand Down Expand Up @@ -293,134 +307,49 @@
#
### seL4 CAmkES VM Examples
#
seL4-camkes-vm-examples-aarch64-tx1 =
let
pkgsCross = (import nixpkgs {
inherit system;
crossSystem.config = "aarch64-unknown-linux-gnu";
overlays = [
self.overlays.default
# seL4's musllibc fork can't stand modern bintools because its too old.
(final: prev: {
bintools = prev.wrapBintoolsWith {
bintools = prev.binutils-unwrapped_2_38;
libc = prev.stdenv.cc.libc;
};
})
];
});
in
pkgs.callPackage pkgs/seL4-camkes-vm-examples.nix {
stdenvNoLibs = pkgsCross.overrideCC pkgsCross.stdenvNoLibs pkgsCross.stdenvNoLibs.cc;
extraCmakeFlags = [
"-DPLATFORM=tx1"
"-DCAMKES_VM_APP=vm_minimal"
];
};
seL4-camkes-vm-examples-aarch64-tx1 = pkgs.callPackage pkgs/seL4-camkes-vm-examples.nix {
stdenvNoLibs = pkgsCrossAarch64OldBintools.overrideCC pkgsCrossAarch64OldBintools.stdenvNoLibs pkgsCrossAarch64OldBintools.stdenvNoLibs.cc;
extraCmakeFlags = [
"-DPLATFORM=tx1"
"-DCAMKES_VM_APP=vm_minimal"
];
};


seL4-camkes-vm-examples-aarch64-tx2 =
let
pkgsCross = (import nixpkgs {
inherit system;
crossSystem.config = "aarch64-unknown-linux-gnu";
overlays = [
self.overlays.default
# seL4's musllibc fork can't stand modern bintools because its too old.
(final: prev: {
bintools = prev.wrapBintoolsWith {
bintools = prev.binutils-unwrapped_2_38;
libc = prev.stdenv.cc.libc;
};
})
];
});
in
pkgs.callPackage pkgs/seL4-camkes-vm-examples.nix {
stdenvNoLibs = pkgsCross.overrideCC pkgsCross.stdenvNoLibs pkgsCross.stdenvNoLibs.cc;
extraCmakeFlags = [
"-DPLATFORM=tx2"
"-DCAMKES_VM_APP=vm_minimal"
];
};
seL4-camkes-vm-examples-aarch64-tx2 = pkgs.callPackage pkgs/seL4-camkes-vm-examples.nix {
stdenvNoLibs = pkgsCrossAarch64OldBintools.overrideCC pkgsCrossAarch64OldBintools.stdenvNoLibs pkgsCrossAarch64OldBintools.stdenvNoLibs.cc;
extraCmakeFlags = [
"-DPLATFORM=tx2"
"-DCAMKES_VM_APP=vm_minimal"
];
};


seL4-camkes-vm-examples-aarch64-qemu-arm-virt =
let
pkgsCross = (import nixpkgs {
inherit system;
crossSystem.config = "aarch64-unknown-linux-gnu";
overlays = [
self.overlays.default
# seL4's musllibc fork can't stand modern bintools because its too old.
(final: prev: {
bintools = prev.wrapBintoolsWith {
bintools = prev.binutils-unwrapped_2_38;
libc = prev.stdenv.cc.libc;
};
})
];
});
in
pkgs.callPackage pkgs/seL4-camkes-vm-examples.nix {
stdenvNoLibs = pkgsCross.overrideCC pkgsCross.stdenvNoLibs pkgsCross.stdenvNoLibs.cc;
extraCmakeFlags = [
"-DPLATFORM=qemu-arm-virt"
"-DCAMKES_VM_APP=vm_minimal"
];
};
seL4-camkes-vm-examples-aarch64-qemu-arm-virt = pkgs.callPackage pkgs/seL4-camkes-vm-examples.nix {
stdenvNoLibs = pkgsCrossAarch64OldBintools.overrideCC pkgsCrossAarch64OldBintools.stdenvNoLibs pkgsCrossAarch64OldBintools.stdenvNoLibs.cc;
extraCmakeFlags = [
"-DPLATFORM=qemu-arm-virt"
"-DCAMKES_VM_APP=vm_minimal"
];
};


seL4-camkes-vm-examples-aarch64-zcu102 =
let
pkgsCross = (import nixpkgs {
inherit system;
crossSystem.config = "aarch64-unknown-linux-gnu";
overlays = [
self.overlays.default
# seL4's musllibc fork can't stand modern bintools because its too old.
(final: prev: {
bintools = prev.wrapBintoolsWith {
bintools = prev.binutils-unwrapped_2_38;
libc = prev.stdenv.cc.libc;
};
})
];
});
in
pkgs.callPackage pkgs/seL4-camkes-vm-examples.nix {
stdenvNoLibs = pkgsCross.overrideCC pkgsCross.stdenvNoLibs pkgsCross.stdenvNoLibs.cc;
extraCmakeFlags = [
"-DPLATFORM=zcu102"
"-DCAMKES_VM_APP=vm_minimal"
];
};
seL4-camkes-vm-examples-aarch64-zcu102 = pkgs.callPackage pkgs/seL4-camkes-vm-examples.nix {
stdenvNoLibs = pkgsCrossAarch64OldBintools.overrideCC pkgsCrossAarch64OldBintools.stdenvNoLibs pkgsCrossAarch64OldBintools.stdenvNoLibs.cc;
extraCmakeFlags = [
"-DPLATFORM=zcu102"
"-DCAMKES_VM_APP=vm_minimal"
];
};


seL4-camkes-vm-examples-armv7l-exynos5422 =
let
pkgsCross = (import nixpkgs {
inherit system;
crossSystem.config = "armv7l-unknown-linux-gnueabi";
overlays = [
self.overlays.default
# seL4's musllibc fork can't stand modern bintools because its too old.
(final: prev: {
bintools = prev.wrapBintoolsWith {
bintools = prev.binutils-unwrapped_2_38;
libc = prev.stdenv.cc.libc;
};
})
];
});
in
pkgs.callPackage pkgs/seL4-camkes-vm-examples.nix {
stdenvNoLibs = pkgsCross.overrideCC pkgsCross.stdenvNoLibs pkgsCross.stdenvNoLibs.cc;
extraCmakeFlags = [
"-DPLATFORM=exynos5422"
"-DCAMKES_VM_APP=vm_minimal"
];
};
seL4-camkes-vm-examples-armv7l-exynos5422 = pkgs.callPackage pkgs/seL4-camkes-vm-examples.nix {
stdenvNoLibs = pkgsCrossArmv7lOldBintools.overrideCC pkgsCrossArmv7lOldBintools.stdenvNoLibs pkgsCrossArmv7lOldBintools.stdenvNoLibs.cc;
extraCmakeFlags = [
"-DPLATFORM=exynos5422"
"-DCAMKES_VM_APP=vm_minimal"
];
};


#
Expand Down Expand Up @@ -622,5 +551,13 @@
}) // {
# declare overlay with added deps, i. e. the python packages not available in official nixpkgs
overlays.default = import ./overlay.nix;

# seL4's musllibc fork can't stand modern bintools because its too old.
overlays.oldBintools = final: prev: {
bintools = prev.wrapBintoolsWith {
bintools = prev.binutils-unwrapped_2_38;
libc = prev.stdenv.cc.libc;
};
};
};
}