sindresorhus / pure

Pretty, minimal and fast ZSH prompt
MIT License
13.12k stars 971 forks source link

Installing Pure in nix home manager #625

Closed MatrixManAtYrService closed 2 years ago

MatrixManAtYrService commented 2 years ago

I just did this:

  1. search issues for nix
  2. find nothing showing me how to install it
  3. figure out how to make home-manager install Pure
  4. yay Pure

I'm just creating this issue so that if somebody else does the same thing, they'll be able to skip steps 2 and 3. It's not a PR because home manager (probably?) isn't popular enough to warrant an entry on main readme.

It turns out that you just have to add this to home.nix:

  programs.zsh.plugins = [
    {
      name = "pure";
      src = pkgs.fetchFromGitHub {
        owner = "sindresorhus";
    repo = "pure";
    rev  = "v1.20.1";
    sha256 = "1bxg5i3a0dm5ifj67ari684p89bcr1kjjh6d5gm46yxyiz9f5qla";
      };
    }
  ];

The sha256 came from this command:

nix-prefetch-url --unpack https://github.com/sindresorhus/pure/archive/refs/tags/v1.20.1.tar.gz

And the url above came from the tar.gz link on the github "tags" page for this repo.

MatrixManAtYrService commented 2 years ago

Closing because this isn't really an issue, just an FYI.

cbioley commented 1 year ago

@MatrixManAtYrService I hopped in the Nix train yesterday.

Thanks!

MatrixManAtYrService commented 1 year ago

@cbioley it's not a brief journey, but I've found it to be a rewarding one. Good luck. (And in case you're not lucky after all: the folks in the nixos discourse are very helpful 😉)

cbioley commented 1 year ago

@MatrixManAtYrService Haha, yes, that's what I gathered 🙈

Thank you (for the hint too)!