nix-ros-overlay/release.nix
Michal Sojka a31e29ac73 release.nix: Use lockedNixpkgs as in default.nix
This ensures that CI using release.nix builds the same code as will be
used by users.

This simply copies the code from default.nix.
2024-11-20 20:13:44 -05:00

21 lines
680 B
Nix

let
lock = builtins.fromJSON (builtins.readFile ./flake.lock);
lockedNixpkgs = builtins.fetchTarball {
url = "https://github.com/lopsided98/nixpkgs/archive/${lock.nodes.nixpkgs.locked.rev}.tar.gz";
sha256 = lock.nodes.nixpkgs.locked.narHash;
};
in
{ nixpkgs ? lockedNixpkgs, nix-ros-overlay ? ./., distro ? null }:
with import (nixpkgs + /lib);
let
releasePackages = mapAttrs (_: a: removeAttrs a [
"lib"
"python"
"python3"
"python2"
"pythonPackages"
"python2Packages"
"python3Packages"
"boost"
]) (import nix-ros-overlay { inherit nixpkgs; }).rosPackages;
in if distro == null then releasePackages else releasePackages.${distro}