Skip to content

Commit

Permalink
Merge pull request #155 from DeterminateSystems/nixpkgs-24.11
Browse files Browse the repository at this point in the history
Update Nixpkgs stable
  • Loading branch information
lucperkins authored Dec 3, 2024
2 parents 46c2856 + 3b347cd commit ae41466
Show file tree
Hide file tree
Showing 7 changed files with 54 additions and 126 deletions.
92 changes: 4 additions & 88 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

47 changes: 26 additions & 21 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
[package]
name = "fh"
version = "0.1.19"
version = "0.1.20"
authors = ["Determinate Systems <[email protected]>"]
edition = "2021"
license = "Apache 2.0"
repository = "https://github.com/DeterminateSystems/fh"

[dependencies]
async-trait = "0.1.73"
async-trait = { version = "0.1.73", default-features = false }
axum = { version = "0.7.5", features = ["macros"] }
chrono = "0.4.31"
chrono = { version = "0.4.31", default-features = false, features = ["clock"] }
clap = { version = "4.3.2", default-features = false, features = [
"color",
"derive",
Expand All @@ -18,48 +18,53 @@ clap = { version = "4.3.2", default-features = false, features = [
"std",
"error-context",
] }
clap_complete = "4.4.0"
clap_complete = { version = "4.4.0", default-features = false }
color-eyre = { version = "0.6.2", default-features = false, features = [
"issue-url",
] }
csv = "1.3.0"
csv = { version = "1.3.0", default-features = false }
gethostname = { version = "0.4.3", default-features = false }
handlebars = "4.4.0"
http = "1.0"
http-body-util = "0.1" # TODO(colemickens): revisit/remove
handlebars = { version = "4.4.0", default-features = false }
http = { version = "1.0", default-features = false }
http-body-util = { version = "0.1", default-features = false } # TODO(colemickens): revisit/remove
hyper = { version = "1.0.0", features = ["full"] }
hyper-util = { version = "0.1", features = ["tokio", "server-auto", "http1"] }
indicatif = { version = "0.17.6", default-features = false }
inquire = "0.6.2"
inquire = { version = "0.6.2", default-features = false, features = [
"console",
] }
nix = { version = "0.29.0", default-features = false, features = ["user"] }
nix-config-parser = "0.2.0"
nixel = "5.2.0"
once_cell = "1.18.0"
owo-colors = "3.5.0"
regex = "1.9.4"
nix-config-parser = { version = "0.2.0", default-features = false }
nixel = { version = "5.2.0", default-features = false }
once_cell = { version = "1.18.0", default-features = false }
owo-colors = { version = "3.5.0", default-features = false }
regex = { version = "1.9.4", default-features = false }
reqwest = { version = "0.11", default-features = false, features = [
"json",
"rustls-tls-native-roots",
] }
semver = { version = "1.0.18", default-features = false, features = ["serde"] }
serde = { version = "1.0.188", default-features = false, features = ["derive"] }
serde_json = "1.0.105"
serde_json = { version = "1.0.105", default-features = false }
tabled = { version = "0.14.0", features = ["color"] }
tempfile = "3.10.1"
tempfile = { version = "3.10.1", default-features = false }
thiserror = { version = "1.0.44", default-features = false }
tokio = { version = "1.39.1", default-features = false, features = ["full"] }
tracing = "0.1.37"
tracing-error = "0.2.0"
tracing = { version = "0.1.37", default-features = false, features = [
"attributes",
"std",
] }
tracing-error = { version = "0.2.0", default-features = false }
tracing-subscriber = { version = "0.3.17", default-features = false, features = [
"ansi",
"env-filter",
"json",
] }
url = { version = "2.4.0", default-features = false, features = ["serde"] }
urlencoding = "2.1.3"
urlencoding = { version = "2.1.3", default-features = false }
whoami = { version = "1.5.1", default-features = false }
xdg = "2.5.2"
xdg = { version = "2.5.2", default-features = false }

[dev-dependencies]
axum = { version = "0.7.5", features = ["macros"] }
axum-test = "15.3.0"
axum-test = { version = "15.3.0", default-features = false }
12 changes: 6 additions & 6 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
description = "The official CLI for FlakeHub: search for flakes, and add new inputs to your Nix flake.";

inputs = {
nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/0.1.650378.tar.gz";
nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/0.2411.*.tar.gz";

fenix = {
url = "https://flakehub.com/f/nix-community/fenix/0.1.1584.tar.gz";
Expand Down
6 changes: 3 additions & 3 deletions src/cli/cmd/add/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,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.2405.*` (without a URL
/// A reference in the form of `NixOS/nixpkgs` or `NixOS/nixpkgs/0.2411.*` (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 @@ -136,10 +136,10 @@ async fn infer_flake_input_name_url(
))
}
}
// A URL like `nixos/nixpkgs` or `nixos/nixpkgs/0.2405`
// A URL like `nixos/nixpkgs` or `nixos/nixpkgs/0.2411`
Err(url::ParseError::RelativeUrlWithoutBase) => {
let (org, project, version) = match flake_ref.split('/').collect::<Vec<_>>()[..] {
// `nixos/nixpkgs/0.2405`
// `nixos/nixpkgs/0.2411`
[org, project, version] => {
let version = version.strip_suffix(".tar.gz").unwrap_or(version);
let version = version.strip_prefix('v').unwrap_or(version);
Expand Down
11 changes: 9 additions & 2 deletions src/cli/cmd/init/handlers/rust.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
use crate::cli::cmd::init::prompt::Prompt;
use crate::{
cli::cmd::{init::prompt::Prompt, list::FLAKEHUB_WEB_ROOT},
flakehub_url,
};

use super::{Flake, Handler, Input, Project};

Expand All @@ -11,7 +14,11 @@ impl Handler for Rust {
if project.has_file("Cargo.toml") && Prompt::for_language("Rust") {
flake.inputs.insert(
String::from("rust-overlay"),
Input::new("github:oxalica/rust-overlay", Some("nixpkgs")),
Input::new(
flakehub_url!(FLAKEHUB_WEB_ROOT, "f", "oxalica", "rust-overlay", "0.1.*")
.as_str(),
Some("nixpkgs"),
),
);

flake
Expand Down
10 changes: 5 additions & 5 deletions src/cli/cmd/init/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ use self::{
use super::CommandExecute;

// Nixpkgs references
const NIXPKGS_LATEST: &str = "latest stable (currently 24.05)";
const NIXPKGS_24_05: &str = "24.05";
const NIXPKGS_LATEST: &str = "latest stable (currently 24.11)";
const NIXPKGS_24_11: &str = "24.11";
const NIXPKGS_UNSTABLE: &str = "unstable";
const NIXPKGS_SPECIFIC: &str = "select a specific release (not recommended in most cases)";

Expand Down Expand Up @@ -85,7 +85,7 @@ impl CommandExecute for InitSubcommand {
"Which Nixpkgs version would you like to include?",
&[
NIXPKGS_LATEST,
NIXPKGS_24_05,
NIXPKGS_24_11,
NIXPKGS_UNSTABLE,
NIXPKGS_SPECIFIC,
],
Expand All @@ -94,8 +94,8 @@ impl CommandExecute for InitSubcommand {
{
// MAYBE: find an enum-based approach to this
NIXPKGS_LATEST => flakehub_url!(FLAKEHUB_WEB_ROOT, "f", "NixOS", "nixpkgs", "*"),
NIXPKGS_24_05 => {
flakehub_url!(FLAKEHUB_WEB_ROOT, "f", "NixOS", "nixpkgs", "0.2405.*")
NIXPKGS_24_11 => {
flakehub_url!(FLAKEHUB_WEB_ROOT, "f", "NixOS", "nixpkgs", "0.2411.*")
}
NIXPKGS_UNSTABLE => {
flakehub_url!(FLAKEHUB_WEB_ROOT, "f", "NixOS", "nixpkgs", "0.1.*")
Expand Down

0 comments on commit ae41466

Please sign in to comment.