summaryrefslogtreecommitdiff
path: root/nix/static.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nix/static.nix')
-rw-r--r--nix/static.nix20
1 files changed, 20 insertions, 0 deletions
diff --git a/nix/static.nix b/nix/static.nix
new file mode 100644
index 0000000..5a5606f
--- /dev/null
+++ b/nix/static.nix
@@ -0,0 +1,20 @@
+{
+ lib,
+ pkgsCross,
+ teawie-bot,
+}:
+let
+ crossPkgsFor = with pkgsCross; {
+ x86_64 = musl64.pkgsStatic;
+ aarch64 = aarch64-multiplatform.pkgsStatic;
+ };
+in
+{ arch }:
+let
+ crossPkgs = crossPkgsFor.${arch};
+in
+(crossPkgs.callPackage ./derivation.nix { optimizeSize = true; }).overrideAttrs (old: {
+ passthru = old.passthru or { } // {
+ inherit crossPkgs;
+ };
+})