nix: No need to pin the hash; git branch HEAD provides it

This commit is contained in:
Sridhar Ratnakumar 2022-05-06 20:27:11 -04:00
parent 14c8d41a6a
commit ac77f14557
3 changed files with 6 additions and 7 deletions

View file

@ -41,7 +41,7 @@ git add . && git commit -m rename
## Tips
- Run `nix flake update` to update all flake inputs. nixpkgs is pinned to a specific a rev in `flake.nix`, which you can advance to the latest rev reported in [status.nixos.org](https://status.nixos.org).
- Run `nix flake update` to update all flake inputs.
- Run `treefmt` in nix shell to autoformat the project. This uses [treefmt](https://github.com/numtide/treefmt), which uses `./treefmt.toml` (where fourmolu and nixpkgs-fmt are specified).
## Alternatives

8
flake.lock generated
View file

@ -33,17 +33,17 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1651634615,
"narHash": "sha256-VtvcS61bLh5mIBm9cV3idUHdlfPRFus/NwdJfaj5s8o=",
"lastModified": 1651804312,
"narHash": "sha256-DJxOGlxwQccuuwXUS0oRRkcNJbW5UP4fpsL5ga9ZwYw=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "abfd31179174133ab8131139d650297bf4da63b7",
"rev": "d59dd43e49f24b58fe8d5ded38cbdf00c3da4dc2",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"rev": "abfd31179174133ab8131139d650297bf4da63b7",
"type": "github"
}
},

View file

@ -1,8 +1,7 @@
{
description = "haskell-template's description";
inputs = {
# To find a suitable nixpkgs hash, pick one from https://status.nixos.org/ (these are cached)
nixpkgs.url = "github:nixos/nixpkgs/abfd31179174133ab8131139d650297bf4da63b7";
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
flake-utils.url = "github:numtide/flake-utils";
flake-utils.inputs.nixpkgs.follows = "nixpkgs";
flake-compat.url = "github:edolstra/flake-compat";