mirror of
https://github.com/zellij-org/zellij.git
synced 2024-12-26 10:43:46 +03:00
add: musl package to nix (#1297)
Build a musl package from the repo, by invoking: ``` nix build "github:zellij-org/zellij#zellij-musl" ``` makes it possible to build bundled applications, that don't need patches to run: ``` nix bundle --bundler github:NixOS/bundlers#toDEB "github:zellij-org/zellij#zellij-musl" ``` This will build a `.deb` file, that can be installed with apt.
This commit is contained in:
parent
54f7143249
commit
4d69ef6284
@ -17,6 +17,10 @@ flake-utils.lib.eachSystem [
|
|||||||
overlays = [(import rust-overlay)];
|
overlays = [(import rust-overlay)];
|
||||||
|
|
||||||
pkgs = import nixpkgs {inherit system overlays;};
|
pkgs = import nixpkgs {inherit system overlays;};
|
||||||
|
pkgsMusl = import nixpkgs {
|
||||||
|
inherit system overlays;
|
||||||
|
crossSystem = {config = "x86_64-unknown-linux-musl";};
|
||||||
|
};
|
||||||
|
|
||||||
crate2nixPkgs = import nixpkgs {
|
crate2nixPkgs = import nixpkgs {
|
||||||
inherit system;
|
inherit system;
|
||||||
@ -141,6 +145,19 @@ in rec {
|
|||||||
meta
|
meta
|
||||||
;
|
;
|
||||||
};
|
};
|
||||||
|
# musl cross-compilation - static binary
|
||||||
|
packages.zellij-musl = (pkgsMusl.makeRustPlatform {inherit rustc cargo;}).buildRustPackage {
|
||||||
|
inherit
|
||||||
|
src
|
||||||
|
name
|
||||||
|
cargoLock
|
||||||
|
postInstall
|
||||||
|
buildInputs
|
||||||
|
nativeBuildInputs
|
||||||
|
desktopItems
|
||||||
|
meta
|
||||||
|
;
|
||||||
|
};
|
||||||
|
|
||||||
defaultPackage = packages.zellij;
|
defaultPackage = packages.zellij;
|
||||||
|
|
||||||
@ -157,10 +174,11 @@ in rec {
|
|||||||
name = "fmt-shell";
|
name = "fmt-shell";
|
||||||
nativeBuildInputs = fmtInputs;
|
nativeBuildInputs = fmtInputs;
|
||||||
};
|
};
|
||||||
e2eShell = pkgs.mkShell {
|
e2eShell = pkgs.pkgsMusl.mkShell {
|
||||||
name = "e2e-shell";
|
name = "e2e-shell";
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
pkgs.cargo-make
|
pkgs.cargo-make
|
||||||
|
pkgs.pkgsMusl.cargo
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user