Nix: add cross-build package

This commit is contained in:
Mihai Fufezan 2024-06-11 18:21:15 +03:00
parent 0f30f9eca6
commit 1419520d5f
No known key found for this signature in database
3 changed files with 13 additions and 3 deletions

View File

@ -2,11 +2,11 @@
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1713537308,
"narHash": "sha256-XtTSSIB2DA6tOv+l0FhvfDMiyCmhoRbNB+0SeInZkbk=",
"lastModified": 1717974879,
"narHash": "sha256-GTO3C88+5DX171F/gVS3Qga/hOs/eRMxPFpiHq2t+D8=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "5c24cf2f0a12ad855f444c30b2421d044120c66f",
"rev": "c7b821ba2e1e635ba5a76d299af62821cbcb09f3",
"type": "github"
},
"original": {

View File

@ -18,6 +18,12 @@
localSystem.system = system;
overlays = with self.overlays; [hyprwayland-scanner];
});
pkgsCrossFor = eachSystem (system: crossSystem:
import nixpkgs {
localSystem = system;
crossSystem = crossSystem;
overlays = with self.overlays; [hyprwayland-scanner];
});
mkDate = longDate: (lib.concatStringsSep "-" [
(builtins.substring 0 4 longDate)
(builtins.substring 4 2 longDate)
@ -37,6 +43,7 @@
packages = eachSystem (system: {
default = self.packages.${system}.hyprwayland-scanner;
inherit (pkgsFor.${system}) hyprwayland-scanner;
hyprwayland-scanner-cross = (pkgsCrossFor.${system} "aarch64-linux").hyprwayland-scanner;
});
formatter = eachSystem (system: pkgsFor.${system}.alejandra);

View File

@ -15,6 +15,9 @@ stdenv.mkDerivation {
nativeBuildInputs = [
cmake
pkg-config
];
buildInputs = [
pugixml
];