mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-10-02 21:10:08 +00:00
To avoid confusion and spurious newlines in the output. Found by searching for a backslash followed by a newline, some indentation, and then the end of multi-line string marker, using the following extended regex: ```regex \\\n +''; ```
45 lines
885 B
Nix
45 lines
885 B
Nix
{
|
|
lib,
|
|
stdenv,
|
|
fetchurl,
|
|
makeWrapper,
|
|
libiconv,
|
|
ncurses,
|
|
perl,
|
|
fortune,
|
|
}:
|
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
pname = "gtypist";
|
|
version = "2.10.1";
|
|
|
|
src = fetchurl {
|
|
url = "mirror://gnu/gtypist/gtypist-${finalAttrs.version}.tar.xz";
|
|
hash = "sha256-ymGAVOkfHtXvBD/MQ1ALutcByVnDGETUaI/yKEmsJS0=";
|
|
};
|
|
|
|
env.CFLAGS = "-std=gnu99";
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
buildInputs = [
|
|
ncurses
|
|
perl
|
|
fortune
|
|
]
|
|
++ lib.optional stdenv.hostPlatform.isDarwin libiconv;
|
|
|
|
preFixup = ''
|
|
wrapProgram "$out/bin/typefortune" \
|
|
--prefix PATH : "${fortune}/bin"
|
|
'';
|
|
|
|
meta = {
|
|
homepage = "https://www.gnu.org/software/gtypist";
|
|
description = "Universal typing tutor";
|
|
license = lib.licenses.gpl3Plus;
|
|
platforms = lib.platforms.linux ++ lib.platforms.darwin;
|
|
maintainers = with lib.maintainers; [ pSub ];
|
|
};
|
|
})
|