Nix packages used by OMNeT++ development environments, for software that nixpkgs does not carry (or does not carry in a usable shape).
Everything here is currently a 3D/geospatial SDK needed by Qtenv's OSG and VSG
backends and by the samples/3d-demo simulations.
{
inputs.nixpkgs.url = "github:NixOS/nixpkgs/26.05";
inputs.omnetpp-nixpkgs = {
url = "github:omnetpp/nixpkgs";
inputs.nixpkgs.follows = "nixpkgs"; # build against your own nixpkgs
};
outputs = { nixpkgs, omnetpp-nixpkgs, ... }:
let
system = "x86_64-linux";
opp = omnetpp-nixpkgs.packages.${system};
in
{ ... opp.rocky_1_1_0 ... };
}The follows matters: without it your shell links libraries built against a
different nixpkgs than the rest of your environment, which is a live C++ ABI risk.
The cost is that you no longer hit a shared binary cache unless your nixpkgs pin
matches the one CI builds with.
Build one on its own with:
nix build github:omnetpp/nixpkgs#osgearth_3_8_1
flake.nix version-resolution table + package set
lib/gdal.nix shared: GDAL with the darwin installCheck skipped
deps/<name>/<x.y.z>/package.nix one frozen directory per upstream release
Attribute names are the lowercase package name plus the version with dots replaced
by underscores: deps/rocky/1.1.0 is rocky_1_1_0. Only versioned attributes are
exported -- there is no unversioned alias, so an existing environment can never be
changed by a new release landing here.
package.nix files take their dependencies as bare callPackage arguments with no
defaults. Which version is built against which is decided in one place, the let
block in flake.nix.
| package | version | why it is here |
|---|---|---|
vsg |
1.1.16 | nixpkgs has 1.1.15, and static; vsgXchange 1.1.14 needs 1.1.16 and Qtenv links -lvsg |
vsgxchange |
1.1.14 | not in nixpkgs |
osgearth |
3.8.1 | not in nixpkgs |
rocky |
1.1.0 | not in nixpkgs |
rocky takes a weejobsNamespace argument. Rocky and osgEarth both vendor the
header-only weejobs library in the same jobs namespace at different versions; if
both are loaded into one process their weak symbols interpose and a worker thread
calls through a vtable of the wrong layout. Set it to move Rocky's copy out of the
way:
opp.rocky_1_1_0.override { weejobsNamespace = "rocky_jobs"; }The default is upstream's jobs, so a consumer that does not use osgEarth gets the
package unaltered.
x86_64-linux, aarch64-linux and aarch64-darwin. x86_64-darwin is exported
too, but does not evaluate: nixpkgs 26.05 marks arrow-cpp broken there and GDAL
pulls it in, so osgearth and rocky fail with that error. It is listed so a
consumer sees the real upstream reason rather than a missing attribute.
Copy the newest version directory to a new one named after the upstream release,
adjust version/hash/patches, and add it to the table in flake.nix. Do not
refactor shared code out of the old directory: version directories are frozen on
purpose, so that an old one keeps building unchanged. lib/ is the single exception
and should stay tiny.