Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

less: adopt and rewrite #347958

Open
wants to merge 1 commit into
base: staging
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 28 additions & 14 deletions pkgs/by-name/le/less/package.nix
Original file line number Diff line number Diff line change
@@ -1,17 +1,22 @@
{ lib
, stdenv
, fetchurl
, ncurses
, pcre2
, withSecure ? false
{
lib,
fetchurl,
ncurses,
pcre2,
stdenv,
# Boolean options
withSecure ? false,
}:

stdenv.mkDerivation (finalAttrs: {
pname = "less";
version = "661";

# Only tarballs on the website are valid releases,
# other versions, e.g. git tags are considered snapshots.
# `less` is provided by the following sources:
# - meta.homepage
# - GitHub: https://github.com/gwsw/less/
# The releases recommended for general consumption are only those from
# homepage, and only those not marked as beta.
src = fetchurl {
url = "https://www.greenwoodsoftware.com/less/less-${finalAttrs.version}.tar.gz";
hash = "sha256-K18BZyFuPvD/ywwxw3Tih+sDXk4iPV2uMVwng7bnOO0=";
Expand All @@ -22,21 +27,30 @@ stdenv.mkDerivation (finalAttrs: {
pcre2
];

outputs = [ "out" "man" ];
outputs = [
"out"
"man"
];

configureFlags = [
# Look for 'sysless' in /etc.
"--sysconfdir=/etc"
"--with-regex=pcre2"
] ++ lib.optional withSecure "--with-secure";
"--sysconfdir=/etc" # Look for 'sysless' in /etc
(lib.withFeatureAs true "regex" "pcre2")
(lib.withFeature withSecure "secure")
];

strictDeps = true;

meta = {
homepage = "https://www.greenwoodsoftware.com/less/";
description = "More advanced file pager than 'more'";
changelog = "https://www.greenwoodsoftware.com/less/news.${finalAttrs.version}.html";
license = lib.licenses.gpl3Plus;
mainProgram = "less";
maintainers = with lib.maintainers; [ dtzWill ];
maintainers = with lib.maintainers; [
AndersonTorres
# not active
dtzWill
];
platforms = lib.platforms.unix;
};
})