Skip to content

Commit

Permalink
Update the default nixpkgs to a rolling release (#369)
Browse files Browse the repository at this point in the history
For security reasons niv should not initialize with a potentially
outdated nixpkgs, that won't receive updates when even when the user
calls `niv update`.
  • Loading branch information
mweinelt committed Apr 26, 2023
1 parent ecabfde commit 7225521
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions data/nixpkgs.json
@@ -1,12 +1,12 @@
{
"branch": "release-21.05",
"branch": "nixos-unstable",
"description": "Nix Packages collection",
"homepage": "",
"homepage": null,
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "5f244caea76105b63d826911b2a1563d33ff1cdc",
"sha256": "1xlgynfw9svy7nvh9nkxsxdzncv9hg99gbvbwv3gmrhmzc3sar75",
"rev": "6c43a3495a11e261e5f41e5d7eda2d71dae1b2fe",

This comment has been minimized.

Copy link
@ryuheechul

ryuheechul Dec 3, 2023

rolling release, but old commit? I'm new to niv today and I was expecting a latest commit but discovered that it's actually not after looking up the commit. (since it's nixos-unstable, expectations might be set to the latest commit instead of an fixed old commit)

this can be mitigated by manually running niv update nixpkgs but it would be nice that the latest commit is being used by default.

(end of thinking out loud...)

This comment has been minimized.

Copy link
@nmattia

nmattia Dec 4, 2023

Owner

I think we used to do that, but that means checking out nixpkgs (slow) and computing its hash. Maybe there's a list of nixpkgs commits & hashes somewhere?

This comment has been minimized.

Copy link
@ryuheechul

ryuheechul Dec 5, 2023

I see, I can see that there is a virtue of simplicity when working with static data.
In that case, maybe informing about it (the commit hash is static therefore user might want to update themselves) would be nice on top of the current existing message when niv init

$ niv init
Initializing
  Creating nix/sources.nix
  Creating nix/sources.json
  Using known 'nixpkgs' ...
  Adding package nixpkgs
    Writing new sources file
  Done: Adding package nixpkgs
Done: Initializing

# my one suggested example here
A heads up! `niv init` didn't fetch the latest commit for nixpkgs.
Run `niv update nixpkgs` if you wish to follow the latest. 

This comment has been minimized.

Copy link
@nmattia

nmattia Dec 5, 2023

Owner

@ryuheechul good point. Do you want to create a ticket? It'll be easier to track

This comment has been minimized.

Copy link
@ryuheechul

ryuheechul Dec 6, 2023

sure and it's here, #384!

"sha256": "16f329z831bq7l3wn1dfvbkh95l2gcggdwn6rk3cisdmv2aa3189",
"type": "tarball",
"url": "https://github.com/NixOS/nixpkgs/archive/5f244caea76105b63d826911b2a1563d33ff1cdc.tar.gz",
"url": "https://github.com/NixOS/nixpkgs/archive/6c43a3495a11e261e5f41e5d7eda2d71dae1b2fe.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
}

0 comments on commit 7225521

Please sign in to comment.