https://github.com/snowfallorg/thaw
Semantic Versioning for Nix Flakes
https://github.com/snowfallorg/thaw
Last synced: about 1 year ago
JSON representation
Semantic Versioning for Nix Flakes
- Host: GitHub
- URL: https://github.com/snowfallorg/thaw
- Owner: snowfallorg
- License: other
- Created: 2023-10-30T01:57:46.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-05-25T22:24:10.000Z (about 2 years ago)
- Last Synced: 2025-03-29T12:05:46.615Z (over 1 year ago)
- Language: TypeScript
- Size: 43 KB
- Stars: 43
- Watchers: 3
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Snowfall Thaw
> Semantic Versioning for Nix Flakes.
## Features
Thaw works by operating directly on the `ref` specified for your flake's inputs. If a ref exists
on the input and is a valid SemVer version, thaw will attempt to upgrade it to the latest version.
Both url querey param and object configuration syntax are supported.
By default, non-major upgrades are allowed, but this can be changed with the `--major` flag. No
additional tools or components are required.
Supported flake input types:
- [x] GitHub
- [ ] GitLab
- [ ] Gitea
- [ ] SourceHut
Need one of these supported? Open an issue or submit a pull request!
## Installation
### Nix Profile
You can install this package imperatively with the following command.
```bash
nix profile install github:snowfallorg/thaw
```
### Nix Configuration
You can install this package by adding it as an input to your Nix Flake.
```nix
{
description = "My system thaw";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.05";
# Snowfall Lib is not required, but will make configuration easier for you.
snowfall-lib = {
url = "github:snowfallorg/lib";
inputs.nixpkgs.follows = "nixpkgs";
};
snowfall-thaw = {
url = "github:snowfallorg/thaw";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = inputs:
inputs.snowfall-lib.mkFlake {
inherit inputs;
src = ./.;
overlays = with inputs; [
# Use the overlay provided by this thaw.
snowfall-thaw.overlays.default
# There is also a named overlay, though the output is the same.
snowfall-thaw.overlays."package/thaw"
];
};
}
```
If you've added the overlay from this flake, then in your system configuration you
can add the `snowfallorg.thaw` package.
```nix
{ pkgs }:
{
environment.systemPackages = with pkgs; [
snowfallorg.thaw
];
}
```
## Usage
```
thaw
DESCRIPTION
Upgrade Nix Flake inputs using SemVer.
USAGE
$ thaw [options] [...inputs]
OPTIONS
--flake, -f Choose a flake other than the current directory
--major, -M Allow major version upgrades
--init, -i Initialize inputs to the latest version
--dry-run, -d Show available upgrades without applying them
--help, -h Show this help message
--verbose Increase logging verbosity, up to 3 times
```