Skip to content

Conversation

@JamyGolden
Copy link
Member

@JamyGolden JamyGolden commented Feb 3, 2026

Depends on jamy/feature/dev-flake branch

  • Add ability to install tinty via the tinty nix flake
  • Add step to the release workflow which updates the nix flake with the latest binary information

@JamyGolden JamyGolden requested a review from a team as a code owner February 3, 2026 13:28
@JamyGolden JamyGolden requested review from bezhermoso and removed request for a team February 3, 2026 13:28
@JamyGolden
Copy link
Member Author

@screwyprof pinging you to review too, since we discussed nix in tinty before. The next PR I will create adds home-manager integration lightly discussed in #83

asset="${ASSETS[$system]}"
url="https://github.com/$REPO/releases/download/v$VERSION/$asset"
echo "Fetching hash for $asset..."
hash=$(nix-prefetch-url "$url" 2>/dev/null)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If nix-prefetch-url fails, you'll get an empty hash
Maybe better to fail explicitly or validate the hash isn't empty

If a release is missing an asset for a platform, the script will still try to update it could result in a broken package.nix

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, added a conditional below which throws if it's empty


for system in "${!HASHES[@]}"; do
# Update hash for each system (matches the line after the system name)
sed -i "/$system/,/hash =/{s|hash = \".*\";|hash = \"${HASHES[$system]}\";|}" "$PACKAGE_FILE"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I might be wrong, but -/$system/,/hash =/{s|hash = \".*\";|...} assumes hash is always on the line after system. If file structure changes, this breaks or may accidentally replace wrong hashes

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It matches from system up to (and including) the hash property line (currently name property is before hash), then it does the replacement of hash using those lines as input, so as long as a single hash follows system, it will be ok.

Copy link

@screwyprof screwyprof left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just a few minor comments

@screwyprof
Copy link

@screwyprof pinging you to review too, since we discussed nix in tinty before. The next PR I will create adds home-manager integration lightly discussed in #83

Hey @JamyGolden. The dev environment via .direnv works as expected on aarch64-darwin.
direnv bootstrapped Rust toolchain with deps and tooling, just runs linters, builds the app, and runs the tests, which pass successfully.

A few things I've noticed. Docker doesn't use any caching for Rust, meaning that every run will download all Cargo deps every time. I don't know the intention behind using Docker in the project vs running tests on the host, but if it's used as part of development, running it every time would be pretty time-consuming.

@screwyprof
Copy link

nix run github:tinted-theming/tinty/jamy/feature/nix-package -- --version
tinty 0.30.0

Running a package works. It's it in main, the full branch path could be omitted, so nix run github:tinted-theming/tinty should work.

@JamyGolden JamyGolden force-pushed the jamy/feature/nix-package branch from e090b6f to 88b4e03 Compare February 4, 2026 11:00
@JamyGolden JamyGolden force-pushed the jamy/feature/dev-flake branch from b6ed825 to 62d0d52 Compare February 4, 2026 11:03
@JamyGolden
Copy link
Member Author

JamyGolden commented Feb 4, 2026

Added caching for the test_docker just command. It's there because a few of the tests check ~/.local/share/tinted-theming/tintyand do some changes and it's annoying to have your local env be changed with passing or failing tests :sweat_smile: usually I just run targetted tests withcargo test`. Most of the tests have custom data paths, but we need to also test that the xdg paths work correctly.

Thanks for the review @screwyprof 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants