mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-30 00:00:11 +01:00
packaging-nix: fix cross-compilation
Update nixpkgs for upstream libre cross compilation fix. Use minimal systemd dependency for mosquitto and rdma-core. Signed-off-by: Philipp Jungkamp <Philipp.Jungkamp@opal-rt.com>
This commit is contained in:
parent
4c662ff56a
commit
cd5a99df67
2 changed files with 20 additions and 11 deletions
8
packaging/nix/flake.lock
generated
8
packaging/nix/flake.lock
generated
|
@ -90,16 +90,16 @@
|
||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1687482344,
|
"lastModified": 1687354544,
|
||||||
"narHash": "sha256-ZKsH8Cpb97Zbozaz26XkLv7Swa5uk3G1Vmy34MVt1ro=",
|
"narHash": "sha256-1Xu+QzyA10AiY21i27Zu9bqQAaxXBacNKbGUA9OZy7Y=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "3612945be80f916cde80537433ec0a4a0e6b3d3b",
|
"rev": "876181e3ae452cc6186486f6f7300a8a6de237cb",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"ref": "release-22.11",
|
"ref": "release-23.05",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
description = "a tool for connecting real-time power grid simulation equipment";
|
description = "a tool for connecting real-time power grid simulation equipment";
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:NixOS/nixpkgs/release-22.11";
|
nixpkgs.url = "github:NixOS/nixpkgs/release-23.05";
|
||||||
|
|
||||||
common = {
|
common = {
|
||||||
url = "github:VILLASframework/common";
|
url = "github:VILLASframework/common";
|
||||||
|
@ -55,18 +55,23 @@
|
||||||
# generate attributes corresponding to all supported combinations of system and crossSystem
|
# generate attributes corresponding to all supported combinations of system and crossSystem
|
||||||
forSupportedCrossSystems = f: forSupportedSystems (system: lib.genAttrs supportedCrossSystems (f system));
|
forSupportedCrossSystems = f: forSupportedSystems (system: lib.genAttrs supportedCrossSystems (f system));
|
||||||
|
|
||||||
# this overlay can be applied to nixpkgs (see `pkgsFor` below for an example)
|
|
||||||
overlay = final: prev: packagesWith final;
|
|
||||||
|
|
||||||
# initialize nixpkgs for the specified `system`
|
# initialize nixpkgs for the specified `system`
|
||||||
pkgsFor = system:
|
pkgsFor = system:
|
||||||
import nixpkgs {
|
import nixpkgs {
|
||||||
inherit system;
|
inherit system;
|
||||||
overlays = [overlay];
|
overlays = [self.overlays.default];
|
||||||
};
|
};
|
||||||
|
|
||||||
# initialize nixpkgs for cross-compiling from `system` to `crossSystem`
|
# initialize nixpkgs for cross-compiling from `system` to `crossSystem`
|
||||||
crossPkgsFor = system: crossSystem: (pkgsFor system).pkgsCross.${crossSystem};
|
crossPkgsFor = system: crossSystem:
|
||||||
|
(import nixpkgs {
|
||||||
|
inherit system;
|
||||||
|
overlays = [
|
||||||
|
self.overlays.default
|
||||||
|
self.overlays.minimal
|
||||||
|
];
|
||||||
|
})
|
||||||
|
.pkgsCross.${crossSystem};
|
||||||
|
|
||||||
# build villas and its dependencies for the specified `pkgs`
|
# build villas and its dependencies for the specified `pkgs`
|
||||||
packagesWith = pkgs: rec {
|
packagesWith = pkgs: rec {
|
||||||
|
@ -113,7 +118,11 @@
|
||||||
|
|
||||||
# standard flake attribute allowing you to add the villas packages to your nixpkgs
|
# standard flake attribute allowing you to add the villas packages to your nixpkgs
|
||||||
overlays = {
|
overlays = {
|
||||||
default = overlay;
|
default = final: prev: packagesWith final;
|
||||||
|
minimal = final: prev: {
|
||||||
|
mosquitto = prev.mosquitto.override {systemd = final.systemdMinimal;};
|
||||||
|
rdma-core = prev.rdma-core.override {udev = final.systemdMinimal;};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# standard flake attribute for defining developer environments
|
# standard flake attribute for defining developer environments
|
||||||
|
|
Loading…
Add table
Reference in a new issue