A Nix flake to install and run the openLCA - a free, open source software for Life Cycle Assessment (LCA) and sustainability analysis on NixOS.
openLCA ships as a pre-built Eclipse RCP app bundled with its own JRE, Intel MKL, and SWT bindings. On standard distros, these "just work." On NixOS, they break. Because NixOS lacks a global /lib, bundled binaries can't find dependencies. This flake fixes that by:
- Patching ELF binaries for the Nix store.
- Wrapping the app with the correct
LD_LIBRARY_PATH. - Fixing WebKitGTK so the internal browser actually renders. (Somewhat Works)
- NixOS with flakes enabled
- x86_64 architecture
nixpkgs.config.allowUnfree = true(required for Intel MKL)
In your /etc/nixos/flake.nix, add openlca-nix as an input:
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
# ... your other inputs ...
openlca-nix = {
url = "github:peaceofsense/openlca-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
};Then pass it into your NixOS configuration and add the package:
outputs = { self, nixpkgs, openlca-nix, ... }@inputs:
{
nixosConfigurations.yourhostname = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
./configuration.nix
{
nixpkgs.config.allowUnfree = true;
environment.systemPackages = [
openlca-nix.packages.${system}.default
];
}
];
};
};Then rebuild your system:
sudo nixos-rebuild switch --flake /etc/nixos#yourhostnamenix run github:peaceofsense/openlca-nixnix profile install github:peaceofsense/openlca-nixAfter installation, you can launch openLCA from your application menu or run:
openlcaOn first launch, openLCA will create a workspace directory at ~/openLCA-data-1.4.
When GreenDelta releases a new version:
- Get the new download URL from openLCA downloads
- Get the new hash:
nix-prefetch-url --type sha256 "YOUR_NEW_DOWNLOAD_URL" - Update
versionand thesha256inflake.nix - Commit and push
- GreenDelta for developing and maintaining openLCA
- The NixOS community for
autoPatchelfHookand packaging tooling
The Nix packaging code in this repository is released under the MIT License. openLCA itself is licensed under the Mozilla Public License 2.0. Intel MKL is subject to the Intel Simplified Software License.