gogh: init at 361 (#423177)

authored by Fernando Rodrigues and committed by GitHub 0f428013 1f488030

+100
+100
pkgs/by-name/go/gogh/package.nix
··· 1 + { 2 + lib, 3 + stdenvNoCC, 4 + fetchFromGitHub, 5 + makeWrapper, 6 + ncurses, 7 + bashNonInteractive, 8 + python3, 9 + rustpython, 10 + nix-update-script, 11 + }: 12 + 13 + let 14 + pythonEnv = python3.withPackages ( 15 + ps: with ps; [ 16 + ruamel-yaml 17 + unidecode 18 + pyyaml 19 + tomli 20 + tomli-w 21 + configobj 22 + ] 23 + ); 24 + in 25 + stdenvNoCC.mkDerivation (finalAttrs: { 26 + pname = "gogh"; 27 + version = "361"; 28 + 29 + src = fetchFromGitHub { 30 + owner = "Gogh-Co"; 31 + repo = "Gogh"; 32 + tag = "v${finalAttrs.version}"; 33 + hash = "sha256-kzJiI1w8CYVYMcHo8mMqLseyFsU/PekjMkkk0gG+RH4="; 34 + }; 35 + 36 + postPatch = '' 37 + # Remove the `SCRIPT_PATH` variable definition from `gogh.sh`, 38 + # see `makeWrapperArgs`: `--set SCRIPT_PATH "$out/lib"` in `postInstall` 39 + sed -i '/^SCRIPT_PATH=/d' gogh.sh 40 + 41 + patchShebangs . 42 + 43 + substituteInPlace {gogh.sh,installs/*.sh} \ 44 + --replace-fail 'bash ' '${lib.getExe bashNonInteractive} ' 45 + 46 + substituteInPlace apply-colors.sh \ 47 + --replace-fail 'python3' '${lib.getExe' rustpython "rustpython"}' 48 + ''; 49 + 50 + strictDeps = true; 51 + 52 + nativeBuildInputs = [ makeWrapper ]; 53 + 54 + installPhase = '' 55 + runHook preInstall 56 + 57 + mkdir --parents $out/lib 58 + cp --recursive {*.py,apply-colors.sh,installs,themes} $out/lib 59 + install -Dm755 gogh.sh $out/bin/${finalAttrs.meta.mainProgram} 60 + 61 + runHook postInstall 62 + ''; 63 + 64 + postInstall = '' 65 + wrapProgram $out/bin/${finalAttrs.meta.mainProgram} \ 66 + --set SCRIPT_PATH "$out/lib" \ 67 + --prefix PATH : "${lib.getBin bashNonInteractive}/bin" \ 68 + --prefix PATH : "${lib.getBin rustpython}/bin" \ 69 + --prefix PATH : "${lib.getBin ncurses}/bin" \ 70 + --prefix PATH : "${pythonEnv}/bin" \ 71 + --prefix PYTHONPATH : "${pythonEnv}/${pythonEnv.sitePackages}" 72 + ''; 73 + 74 + passthru.updateScript = nix-update-script { }; 75 + 76 + meta = { 77 + description = "Collection of color schemes for terminal emulators"; 78 + longDescription = '' 79 + Gogh is a collection of color schemes for various terminal 80 + emulators, including Gnome Terminal, Pantheon Terminal, Tilix 81 + and XFCE4 Terminal. These schemes are designed to make your 82 + terminal more visually appealing and improve your productivity 83 + by providing a better contrast and color differentiation. (This 84 + fork of Gogh includes a color scheme named "Vaombe".) 85 + 86 + The inspiration for Gogh came from the clean and minimalistic 87 + design of Elementary OS, but the project has since grown to 88 + include a variety of unique and beautiful options. Not only does 89 + Gogh work on Linux systems, but it's also compatible with iTerm 90 + on macOS, providing a consistent and visually appealing 91 + experience across platforms. 92 + ''; 93 + homepage = "https://github.com/Gogh-Co/Gogh"; 94 + changelog = "https://github.com/Gogh-Co/Gogh/releases/tag/${finalAttrs.src.tag}"; 95 + license = lib.licenses.mit; 96 + maintainers = with lib.maintainers; [ yiyu ]; 97 + mainProgram = "gogh"; 98 + platforms = lib.platforms.all; 99 + }; 100 + })