2023-01-11 07:51:40 +00:00
|
|
|
{ stdenv, lib, fetchFromGitHub }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "zimfw";
|
2023-02-09 11:40:11 +00:00
|
|
|
version = "1.11.1";
|
2023-01-11 07:51:40 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "zimfw";
|
|
|
|
repo = "zimfw";
|
|
|
|
rev = "v${version}";
|
|
|
|
## zim only needs this one file to be installed.
|
|
|
|
sparseCheckout = [ "zimfw.zsh" ];
|
2023-02-09 11:40:11 +00:00
|
|
|
sha256 = "sha256-ZL/x5FNklRa5JnZ5UUofnIcW4dCInaEvTLBQfMJDWIM=";
|
2023-01-11 07:51:40 +00:00
|
|
|
};
|
|
|
|
strictDeps = true;
|
|
|
|
dontConfigure = true;
|
|
|
|
dontBuild = true;
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
|
|
|
|
mkdir -p $out
|
|
|
|
cp -r $src/zimfw.zsh $out/
|
|
|
|
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
|
|
|
## zim automates the downloading of any plugins you specify in the `.zimrc`
|
|
|
|
## file. To do that with Nix, you'll need $ZIM_HOME to be writable.
|
|
|
|
## `~/.cache/zim` is a good place for that. The problem is that zim also
|
|
|
|
## looks for `zimfw.zsh` there, so we're going to tell it here to look for
|
|
|
|
## the `zimfw.zsh` where we currently are.
|
|
|
|
postFixup = ''
|
|
|
|
substituteInPlace $out/zimfw.zsh \
|
|
|
|
--replace "\''${ZIM_HOME}/zimfw.zsh" "$out/zimfw.zsh"
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description =
|
|
|
|
"The Zsh configuration framework with blazing speed and modular extensions";
|
|
|
|
homepage = "https://zimfw.sh";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = [ maintainers.joedevivo ];
|
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
}
|