Skip to content

Commit a222f29

Browse files
authored
Merge branch 'main' into patch-8
2 parents 9484f8f + 943774b commit a222f29

File tree

12 files changed

+125
-44
lines changed

12 files changed

+125
-44
lines changed

.github/workflows/build-flake-info.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717

1818
steps:
1919
- name: Checking out the repository
20-
uses: actions/checkout@v5
20+
uses: actions/checkout@v6
2121

2222
- name: Setup
2323
uses: ./.github/actions/common-setup

.github/workflows/check-flake-files.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515

1616
steps:
1717
- name: Checking out the repository
18-
uses: actions/checkout@v5
18+
uses: actions/checkout@v6
1919

2020
- name: Setup
2121
uses: ./.github/actions/common-setup
@@ -34,7 +34,7 @@ jobs:
3434
do
3535
echo "::group::Group \"$(basename $flake_group .toml)\""
3636
37-
nix run --accept-flake-config .#flake-info -- --json group "$flake_group" "$(basename "$flake_group" .toml)" --report
37+
nix run --accept-flake-config .#flake-info -- --json group "$flake_group" "$(basename "$flake_group" .toml)" --report --with-gc
3838
3939
if [[ -f "./report.txt" ]]
4040
then

.github/workflows/check-formatting.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212

1313
steps:
1414
- name: Checking out the repository
15-
uses: actions/checkout@v5
15+
uses: actions/checkout@v6
1616

1717
- name: Setup
1818
uses: ./.github/actions/common-setup

.github/workflows/frontend.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919

2020
steps:
2121
- name: Checking out the repository
22-
uses: actions/checkout@v5
22+
uses: actions/checkout@v6
2323

2424
- name: Setup
2525
uses: ./.github/actions/common-setup

.github/workflows/import-to-elasticsearch.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717

1818
steps:
1919
- name: Checking out the repository
20-
uses: actions/checkout@v5
20+
uses: actions/checkout@v6
2121

2222
- name: Setup
2323
uses: ./.github/actions/common-setup
@@ -52,7 +52,7 @@ jobs:
5252

5353
steps:
5454
- name: Checking out the repository
55-
uses: actions/checkout@v5
55+
uses: actions/checkout@v6
5656

5757
- name: Setup
5858
uses: ./.github/actions/common-setup
@@ -109,7 +109,7 @@ jobs:
109109

110110
steps:
111111
- name: Checking out the repository
112-
uses: actions/checkout@v5
112+
uses: actions/checkout@v6
113113

114114
- name: Setup
115115
uses: ./.github/actions/common-setup

.github/workflows/switch-logo.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Switch Logo
2+
3+
on:
4+
schedule:
5+
- cron: "0 0 31 5 *" # Change to pride logo. “At 00:00 on day-of-month 31 in May.”
6+
- cron: "0 0 1 7 *" # Switch back to normal logo. “At 00:00 on day-of-month 1 in July.”
7+
8+
jobs:
9+
swap-logo:
10+
runs-on: ubuntu-latest
11+
permissions:
12+
contents: write
13+
steps:
14+
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
15+
16+
- name: Switch Logo
17+
run: |
18+
TODAY=$(date +'%m-%d')
19+
if [ "$TODAY" == "05-31" ]; then
20+
# Switch to pride logo.
21+
sed --in-place 's|/images/nix-logo\.png|/images/nix-logo-pride.png|g' frontend/src/Main.elm
22+
git_commit_message="chore(logo): use pride logo"
23+
elif [ "$TODAY" == "07-01" ]; then
24+
# Switch back to normal logo.
25+
sed --in-place 's|/images/nix-logo-pride\.png|/images/nix-logo.png|g' frontend/src/Main.elm
26+
git_commit_message="chore(logo): switch back to normal logo"
27+
else
28+
echo "No action needed for logo today."
29+
exit 0
30+
fi
31+
32+
git config --global user.name 'github-actions[bot]'
33+
git config --global user.email '41898282+github-actions[bot]@users.noreply.github.com'
34+
git add frontend/src/Main.elm
35+
git commit --message "$git_commit_message"
36+
git push

.github/workflows/update-flake-lock.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111

1212
steps:
1313
- name: Checkout repository
14-
uses: actions/checkout@v5
14+
uses: actions/checkout@v6
1515

1616
- name: Install Nix
1717
uses: cachix/install-nix-action@v31
@@ -20,4 +20,4 @@ jobs:
2020
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
2121
2222
- name: Update flake.lock
23-
uses: DeterminateSystems/update-flake-lock@v27
23+
uses: DeterminateSystems/update-flake-lock@v28

flake-info/src/commands/nix_check_version.rs

Lines changed: 32 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,23 +15,17 @@ pub enum NixCheckError {
1515
CommandError(#[from] command_run::Error),
1616
}
1717

18-
pub fn check_nix_version(min_version: &str) -> Result<(), NixCheckError> {
19-
info!("Checking nix version");
20-
18+
fn compare_nix_versions(min_version: &str, actual_version: &str) -> Result<(), NixCheckError> {
2119
let nix_version_requirement = VersionReq::parse(&format!(">={}", min_version))?;
2220

23-
let mut command =
24-
Command::with_args("nix", &["eval", "--raw", "--expr", "builtins.nixVersion"]);
25-
command.log_command = false;
26-
command.enable_capture();
27-
let output = command.run()?;
2821
let nix_version = Version::parse(
29-
output
30-
.stdout_string_lossy()
22+
actual_version
23+
.replace("pre", ".0-pre")
3124
.split(|c: char| c != '.' && !c.is_ascii_digit())
3225
.next()
3326
.unwrap(),
3427
)?;
28+
3529
if !nix_version_requirement.matches(&nix_version) {
3630
return Err(NixCheckError::IncompatibleNixVersion(
3731
nix_version,
@@ -40,3 +34,31 @@ pub fn check_nix_version(min_version: &str) -> Result<(), NixCheckError> {
4034
}
4135
Ok(())
4236
}
37+
38+
pub fn check_nix_version(min_version: &str) -> Result<(), NixCheckError> {
39+
info!("Checking nix version");
40+
41+
let mut command =
42+
Command::with_args("nix", &["eval", "--raw", "--expr", "builtins.nixVersion"]);
43+
command.log_command = false;
44+
command.enable_capture();
45+
let output = command.run()?;
46+
return compare_nix_versions(
47+
min_version,
48+
output.stdout_string_lossy().into_owned().as_str(),
49+
);
50+
}
51+
52+
#[cfg(test)]
53+
mod tests {
54+
use super::*;
55+
56+
#[test]
57+
fn ok() {
58+
assert!(compare_nix_versions("2.4.0", "2.3.0").is_err());
59+
compare_nix_versions("2.4.0", "2.4.0").expect("Exactly matching version");
60+
compare_nix_versions("2.4.0", "2.14.0").expect("Other matching version");
61+
compare_nix_versions("2.4.0", "2.33pre20251107_6a3e3982")
62+
.expect("Matching prerelease version");
63+
}
64+
}

flake.lock

Lines changed: 9 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flakes/manual.toml

Lines changed: 22 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,23 @@ url = "git+https://codeberg.org/alch_emi/embers-nix-packages.git?ref=main"
66
type = "git"
77
url = "git+https://codeberg.org/wolfangaukang/python-trovo?ref=main"
88

9-
[[sources]]
10-
type = "git"
11-
url = "git+https://codeberg.org/wolfangaukang/multifirefox?ref=main"
9+
# wolfangaukang is no longer in 'maintainers'
10+
#[[sources]]
11+
#type = "git"
12+
#url = "git+https://codeberg.org/wolfangaukang/multifirefox?ref=main"
1213

1314
[[sources]]
1415
type = "git"
1516
url = "git+https://github.com/hannesgith/rquickshare?ref=flake"
1617

18+
# missing field 'name'
19+
#[[sources]]
20+
#type = "git"
21+
#url = "git+https://github.com/hannesgith/neohtop?ref=nixify"
22+
1723
[[sources]]
1824
type = "git"
19-
url = "git+https://github.com/hannesgith/neohtop?ref=nixify"
25+
url = "git+https://github.com/raboof/dmake?ref=nix"
2026

2127
[[sources]]
2228
type = "git"
@@ -36,12 +42,13 @@ type = "github"
3642
owner = "anpandey"
3743
repo = "numen-nix"
3844

39-
[[sources]]
40-
# Please open upstream issue when removing:
41-
# https://github.com/astro/microvm.nix/issues/new
42-
type = "github"
43-
owner = "astro"
44-
repo = "microvm.nix"
45+
#[[sources]]
46+
## Please open upstream issue when removing:
47+
## https://github.com/astro/microvm.nix/issues/new
48+
## (issue incoming, https://github.com/NixOS/nixos-search/pull/1115)
49+
#type = "github"
50+
#owner = "astro"
51+
#repo = "microvm.nix"
4552

4653
[[sources]]
4754
type = "github"
@@ -178,10 +185,11 @@ type = "github"
178185
owner = "nix-community"
179186
repo = "autofirma-nix"
180187

181-
[[sources]]
182-
type = "github"
183-
owner = "nix-community"
184-
repo = "fenix"
188+
# error: attribute 'outputName' missing
189+
#[[sources]]
190+
#type = "github"
191+
#owner = "nix-community"
192+
#repo = "fenix"
185193

186194
[[sources]]
187195
type = "github"

0 commit comments

Comments
 (0)