Skip to content

Commit

Permalink
Use nixpkgs version from flake by default
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
lopsided98 committed Mar 9, 2024
1 parent e761430 commit 2c27818
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion default.nix
Original file line number Diff line number Diff line change
@@ -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:

Expand Down

0 comments on commit 2c27818

Please sign in to comment.