diff options
| author | Seth Flynn <[email protected]> | 2025-03-05 15:27:26 -0500 |
|---|---|---|
| committer | Seth Flynn <[email protected]> | 2025-03-05 15:31:38 -0500 |
| commit | 6fa4458f59160cdf9e82ad2138300b1041f510ad (patch) | |
| tree | 88aeb808a13eadeacf0bc9b97d85c93f10de7a2d /default.nix | |
| parent | b229a37e59b9720b7017e72a6d159b869ff36458 (diff) | |
treewide: use flake
Signed-off-by: Seth Flynn <[email protected]>
Diffstat (limited to 'default.nix')
| -rw-r--r-- | default.nix | 63 |
1 files changed, 0 insertions, 63 deletions
diff --git a/default.nix b/default.nix deleted file mode 100644 index fb95f92..0000000 --- a/default.nix +++ /dev/null @@ -1,63 +0,0 @@ -# nix-build -# or to build a cross compiled package: nix-build -A <triple>.lwjgl -# i.e., nix-build -A aarch64-unknown-linux-gnu.lwjgl -{ - pkgs ? import <nixpkgs> { - inherit system; - config = { }; - overlays = [ ]; - }, - nixpkgs ? <nixpkgs>, - system ? builtins.currentSystem, -}: - -let - inherit (pkgs) lib; - inherit (pkgs.stdenv.hostPlatform) system; - nativeTarget = pkgs.stdenv.hostPlatform.config; - - # Targets we want to build for - targets = [ - "x86_64-unknown-linux-gnu" - "i686-unknown-linux-gnu" - "aarch64-unknown-linux-gnu" - "armv7l-unknown-linux-gnueabihf" - "riscv64-unknown-linux-gnu" - ]; - - # Loop over each target - forAllTargets = lib.genAttrs targets; - - # Nixpkgs re-instantiated to cross compile from our current system to each target - crossPkgsFor = forAllTargets ( - target: - - import nixpkgs { - inherit system; - inherit (pkgs) config overlays; - crossSystem = { - config = target; - }; - } - ); - - # Our package set for each target - ourPackagesFor = forAllTargets ( - target: - - let - callPackage = lib.callPackageWith (ourPackagesFor.${target} // crossPkgsFor.${target}); - in - - { - fetchAntDeps = callPackage ./pkgs/fetch-ant-deps.nix { }; - lwjgl = callPackage ./pkgs/lwjgl.nix { }; - } - ); - - nativeLwjgl = - ourPackagesFor.${nativeTarget}.lwjgl - or (lib.trace "${nativeTarget} is not a supported target" pkgs.emptyFile); -in - -ourPackagesFor // { lwjgl = nativeLwjgl; } |
