Use nixpkgs version from flake by default

When not using flakes, you would immediately start using the latest
version of the nix-ros branch whenever I updated it, even if it hadn't
been tested or added to the cache yet. Now, it will match the flake
locked version by default even when not using flakes.
This commit is contained in:
Ben Wolsieffer 2024-03-09 12:27:10 -05:00
parent e761430bde
commit 2c2781805f

View file

@ -1,4 +1,11 @@
{ nixpkgs ? builtins.fetchTarball "https://github.com/lopsided98/nixpkgs/archive/nix-ros.tar.gz"
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
, overlays ? []
, ... }@args: