wip: musl static builds

This commit is contained in:
Armaël Guéneau 2024-04-25 16:40:58 +02:00
parent 9bb505d977
commit 178ccd147a
2 changed files with 8 additions and 1 deletions

View file

@ -127,6 +127,7 @@
"original": {
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "74f1a64dd28faeeb85ef081f32cad2989850322c",
"type": "github"
}
},

View file

@ -1,5 +1,5 @@
{
description = "A very basic flake";
description = "Tricot, a reverse proxy with consul integration";
inputs.nixpkgs.url = "github:NixOS/nixpkgs/a3073c49bc0163fea6a121c276f526837672b555";
inputs.cargo2nix = {
@ -15,8 +15,13 @@
outputs = { self, nixpkgs, cargo2nix }:
let
targetHost = "x86_64-unknown-linux-musl";
pkgs = import nixpkgs {
system = "x86_64-linux";
crossSystem = {
config = targetHost;
isStatic = true;
};
overlays = [ cargo2nix.overlays.default ];
};
packageFun = import ./Cargo.nix;
@ -26,6 +31,7 @@
let
packageSet = pkgs.rustBuilder.makePackageSet ({
inherit packageFun rustVersion;
target = targetHost;
} // args);
in
packageSet.workspace.tricot {