mirror of
https://github.com/lopsided98/nix-ros-overlay.git
synced 2025-06-10 01:42:24 +03:00

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.
21 lines
680 B
Nix
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}
|