Update nixpkgs

This commit is contained in:
Sridhar Ratnakumar 2022-01-16 19:10:56 -05:00
parent e9479b8034
commit 5a6d57f61d
3 changed files with 10 additions and 9 deletions

View file

@ -33,7 +33,7 @@ cd .. && mv haskell-template ${NAME} && cd ${NAME}
## Tips ## Tips
- Run `nix flake update` to update all flake inputs. nixpkgs is pinned to a specific a rev, 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. 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).
## Alternatives ## Alternatives

View file

@ -33,17 +33,17 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1642069818, "lastModified": 1642104392,
"narHash": "sha256-666w6j8wl/bojfgpp0k58/UJ5rbrdYFbI2RFT2BXbSQ=", "narHash": "sha256-m71b7MgMh9FDv4MnI5sg9MiBVW6DhE1zq+d/KlLWSC8=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "46821ea01c8f54d2a20f5a503809abfc605269d7", "rev": "5aaed40d22f0d9376330b6fa413223435ad6fee5",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "46821ea01c8f54d2a20f5a503809abfc605269d7", "rev": "5aaed40d22f0d9376330b6fa413223435ad6fee5",
"type": "github" "type": "github"
} }
}, },

View file

@ -1,7 +1,7 @@
{ {
description = "haskell-template's description"; description = "haskell-template's description";
inputs = { inputs = {
nixpkgs.url = "github:nixos/nixpkgs/46821ea01c8f54d2a20f5a503809abfc605269d7"; nixpkgs.url = "github:nixos/nixpkgs/5aaed40d22f0d9376330b6fa413223435ad6fee5";
flake-utils.url = "github:numtide/flake-utils"; flake-utils.url = "github:numtide/flake-utils";
flake-compat = { flake-compat = {
url = "github:edolstra/flake-compat"; url = "github:edolstra/flake-compat";
@ -14,9 +14,10 @@
overlays = [ ]; overlays = [ ];
pkgs = pkgs =
import nixpkgs { inherit system overlays; config.allowBroken = true; }; import nixpkgs { inherit system overlays; config.allowBroken = true; };
hp = pkgs.haskellPackages; # pkgs.haskell.packages.ghc921;
# https://github.com/NixOS/nixpkgs/issues/140774#issuecomment-976899227 # https://github.com/NixOS/nixpkgs/issues/140774#issuecomment-976899227
m1MacHsBuildTools = m1MacHsBuildTools =
pkgs.haskellPackages.override { hp.override {
overrides = self: super: overrides = self: super:
let let
workaround140774 = hpkg: with pkgs.haskell.lib; workaround140774 = hpkg: with pkgs.haskell.lib;
@ -30,7 +31,7 @@
}; };
}; };
project = returnShellEnv: project = returnShellEnv:
pkgs.haskellPackages.developPackage { hp.developPackage {
inherit returnShellEnv; inherit returnShellEnv;
name = "haskell-template"; name = "haskell-template";
root = ./.; root = ./.;
@ -46,7 +47,7 @@
pkgs.haskell.lib.addBuildTools drv pkgs.haskell.lib.addBuildTools drv
(with (if system == "aarch64-darwin" (with (if system == "aarch64-darwin"
then m1MacHsBuildTools then m1MacHsBuildTools
else pkgs.haskellPackages); [ else hp); [
# Specify your build/dev dependencies here. # Specify your build/dev dependencies here.
cabal-fmt cabal-fmt
cabal-install cabal-install