Skip to content

Commit

Permalink
Merge pull request #87 from DeterminateSystems/update-nixpkgs-stable
Browse files Browse the repository at this point in the history
Update stable Nixpkgs to 23.11
  • Loading branch information
lucperkins authored Dec 4, 2023
2 parents e828527 + a019bdd commit f6b2789
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions src/cli/cmd/add/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ pub(crate) struct AddSubcommand {
pub(crate) input_name: Option<String>,
/// The flake reference to add as an input.
///
/// A reference in the form of `NixOS/nixpkgs` or `NixOS/nixpkgs/0.2305.*` (without a URL
/// A reference in the form of `NixOS/nixpkgs` or `NixOS/nixpkgs/0.2311.*` (without a URL
/// scheme) will be inferred as a FlakeHub input.
pub(crate) input_ref: String,
/// Whether to insert a new input at the top of or the bottom of an existing `inputs` attrset.
Expand Down Expand Up @@ -138,10 +138,10 @@ async fn infer_flake_input_name_url(
))
}
}
// A URL like `nixos/nixpkgs` or `nixos/nixpkgs/0.2305`
// A URL like `nixos/nixpkgs` or `nixos/nixpkgs/0.2311`
Err(url::ParseError::RelativeUrlWithoutBase) => {
let (org, project, version) = match flake_ref.split('/').collect::<Vec<_>>()[..] {
// `nixos/nixpkgs/0.2305`
// `nixos/nixpkgs/0.2311`
[org, project, version] => {
let version = version.strip_suffix(".tar.gz").unwrap_or(version);
let version = version.strip_prefix('v').unwrap_or(version);
Expand Down
4 changes: 2 additions & 2 deletions src/cli/cmd/eject/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -373,13 +373,13 @@ mod test {
let server_url = server_addr.parse().unwrap();

let input_url =
url::Url::parse("https://flakehub.com/f/nixos/nixpkgs/0.2305.*.tar.gz").unwrap();
url::Url::parse("https://flakehub.com/f/nixos/nixpkgs/0.2311.*.tar.gz").unwrap();
let github_url = super::eject_input_to_github(&server_url, input_url)
.await
.ok()
.flatten()
.unwrap();
assert_eq!(github_url.to_string(), "github:nixos/nixpkgs/nixos-23.05");
assert_eq!(github_url.to_string(), "github:nixos/nixpkgs/nixos-23.11");
}

#[tokio::test]
Expand Down
8 changes: 4 additions & 4 deletions src/cli/cmd/init/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ impl FlakeHubUrl {
}

// Nixpkgs references
const NIXPKGS_LATEST: &str = "latest stable (currently 23.05)";
const NIXPKGS_23_05: &str = "23.05";
const NIXPKGS_LATEST: &str = "latest stable (currently 23.11)";
const NIXPKGS_23_11: &str = "23.11";
const NIXPKGS_UNSTABLE: &str = "unstable";
const NIXPKGS_SPECIFIC: &str = "select a specific release (not recommended in most cases)";

Expand Down Expand Up @@ -108,7 +108,7 @@ impl CommandExecute for InitSubcommand {
"Which Nixpkgs version would you like to include?",
&[
NIXPKGS_LATEST,
NIXPKGS_23_05,
NIXPKGS_23_11,
NIXPKGS_UNSTABLE,
NIXPKGS_SPECIFIC,
],
Expand All @@ -117,7 +117,7 @@ impl CommandExecute for InitSubcommand {
{
// MAYBE: find an enum-based approach to this
NIXPKGS_LATEST => FlakeHubUrl::latest("NixOS", "nixpkgs"),
NIXPKGS_23_05 => FlakeHubUrl::version("NixOS", "nixpkgs", "0.2305.*"),
NIXPKGS_23_11 => FlakeHubUrl::version("NixOS", "nixpkgs", "0.2311.*"),
NIXPKGS_UNSTABLE => FlakeHubUrl::unstable("NixOS", "nixpkgs"),
NIXPKGS_SPECIFIC => select_nixpkgs(&self.api_addr).await?,
// Just in case
Expand Down

0 comments on commit f6b2789

Please sign in to comment.