nixpkgs/pkgs/shells/zsh/grml-zsh-config/default.nix
Profpatsch 4a7f99d55d treewide: with stdenv.lib; in meta -> with lib;
Part of: https://github.com/NixOS/nixpkgs/issues/108938

meta = with stdenv.lib;

is a widely used pattern. We want to slowly remove
the `stdenv.lib` indirection and encourage people
to use `lib` directly. Thus let’s start with the meta
field.

This used a rewriting script to mostly automatically
replace all occurances of this pattern, and add the
`lib` argument to the package header if it doesn’t
exist yet.

The script in its current form is available at
https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
2021-01-11 10:38:22 +01:00

42 lines
996 B
Nix

{ stdenv, fetchFromGitHub, lib
, zsh, coreutils, inetutils, procps, txt2tags }:
with lib;
stdenv.mkDerivation rec {
pname = "grml-zsh-config";
version = "0.17.4";
src = fetchFromGitHub {
owner = "grml";
repo = "grml-etc-core";
rev = "v${version}";
sha256 = "09c3f7s2r0cb8g9kgh3xhc8dhr1656g1q9s9i3s5imvknwqii6as";
};
buildInputs = [ zsh coreutils txt2tags procps ]
++ optional stdenv.isLinux inetutils;
buildPhase = ''
cd doc
make
cd ..
'';
installPhase = ''
install -D -m644 etc/zsh/keephack $out/etc/zsh/keephack
install -D -m644 etc/zsh/zshrc $out/etc/zsh/zshrc
install -D -m644 doc/grmlzshrc.5 $out/share/man/man5/grmlzshrc.5
ln -s grmlzshrc.5.gz $out/share/man/man5/grml-zsh-config.5.gz
'';
meta = with lib; {
description = "grml's zsh setup";
homepage = "https://grml.org/zsh/";
license = licenses.gpl2;
platforms = platforms.unix;
maintainers = with maintainers; [ msteen rvolosatovs ];
};
}