Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

After deleting the bash completion stuff and replacing the verbose description with Guix's, it cut the package from 63 lines down to 36. Deleting the blank lines cut it down to a further 27. For comparison the Guix package (which had no blank lines to begin with) is 35 lines.

Here's the trimmed Nix derivation:

  { stdenv, fetchFromGitHub, autoreconfHook, ncurses, libevent, pkgconfig, makeWrapper }:
  stdenv.mkDerivation rec {
    pname = "tmux";
    version = "2.9a";
    outputs = [ "out" "man" ];
    src = fetchFromGitHub {
      owner = pname;
      repo = pname;
      rev = version;
      sha256 = "040plbgxlz14q5p0p3wapr576jbirwripmsjyq3g1nxh76jh1ipg";
    };
    nativeBuildInputs = [ pkgconfig autoreconfHook ];
    buildInputs = [ ncurses libevent makeWrapper ];
    meta = {
      homepage = http://tmux.github.io/;
      description = "Terminal multiplexer";
      longDescription =
        '' tmux is a terminal multiplexer: it enables a number of terminals (or
  windows), each running a separate program, to be created, accessed, and
  controlled from a single screen.  tmux may be detached from a screen and
  continue running in the background, then later reattached.
        '';
      license = stdenv.lib.licenses.bsd3;
      platforms = stdenv.lib.platforms.unix;
      maintainers = with stdenv.lib.maintainers; [ thammers fpletz ];
    };
  }


Nice! I find this a lot more readable than the Scheme, and it certainly contains many fewer tokens; what do you think?


That looks almost identical to the Scheme one with the only real difference being foo=bar; vs (foo bar). Hardly enough of a difference to change anything "a lot" either way.


Guix package definitions were unreadable to me initially, as I had never used Scheme/Lisp before.

I've written a couple of them now and the definition above is extremely easy to read. Big part is just formatting & parentheses, I think my eyes just needed a little bit of adjustment time.


It’s absolutely more readable.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: