build: add statically linked output
if only something like this was possible with wayland and others...
This commit is contained in:
parent
b4f0b81d9b
commit
4ffe6c8d0f
3 changed files with 23 additions and 11 deletions
1
Cargo.lock
generated
1
Cargo.lock
generated
|
|
@ -95,6 +95,7 @@ dependencies = [
|
||||||
name = "tylc"
|
name = "tylc"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
|
"gmp-mpfr-sys",
|
||||||
"rug",
|
"rug",
|
||||||
"thiserror",
|
"thiserror",
|
||||||
]
|
]
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,9 @@ thiserror = "2.0.18"
|
||||||
version = "1.30"
|
version = "1.30"
|
||||||
default-features = false
|
default-features = false
|
||||||
features = ["std", "float"]
|
features = ["std", "float"]
|
||||||
|
[dependencies.gmp-mpfr-sys]
|
||||||
|
version = "*"
|
||||||
|
features = ["force-cross"]
|
||||||
|
|
||||||
[profile.release]
|
[profile.release]
|
||||||
lto = true
|
lto = true
|
||||||
|
|
|
||||||
16
flake.nix
16
flake.nix
|
|
@ -22,21 +22,29 @@
|
||||||
cargoToml = fromTOML (builtins.readFile "${src}/Cargo.toml");
|
cargoToml = fromTOML (builtins.readFile "${src}/Cargo.toml");
|
||||||
name = cargoToml.package.name;
|
name = cargoToml.package.name;
|
||||||
|
|
||||||
bin = pkgs.rustPlatform.buildRustPackage {
|
bin =
|
||||||
|
{
|
||||||
|
rustPlatform,
|
||||||
|
m4,
|
||||||
|
}:
|
||||||
|
rustPlatform.buildRustPackage {
|
||||||
inherit name src;
|
inherit name src;
|
||||||
|
|
||||||
cargoLock.lockFile = "${src}/Cargo.lock";
|
cargoLock.lockFile = "${src}/Cargo.lock";
|
||||||
|
|
||||||
nativeBuildInputs = with pkgs; [
|
nativeBuildInputs = [
|
||||||
m4
|
m4
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
default = pkgs.callPackage bin { };
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
packages.default = bin;
|
packages.default = default;
|
||||||
|
packages.static = pkgs.pkgsStatic.callPackage bin { };
|
||||||
|
|
||||||
devShells.default = pkgs.mkShell {
|
devShells.default = pkgs.mkShell {
|
||||||
inputsFrom = [ bin ];
|
inputsFrom = [ default ];
|
||||||
|
|
||||||
packages = with pkgs; [
|
packages = with pkgs; [
|
||||||
clippy
|
clippy
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue