about summary refs log tree commit diff
path: root/pkgs/by-name/sr/src/package.nix
blob: cd86eba4180782f6f1d1e5bfe2f3c66c106b75b0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
{ lib
, stdenv
, asciidoc
, fetchFromGitLab
, git
, makeWrapper
, python3
, rcs
}:

stdenv.mkDerivation (finalAttrs: {
  pname = "src";
  version = "1.33";

  src = fetchFromGitLab {
    owner = "esr";
    repo = "src";
    rev = finalAttrs.version;
    hash = "sha256-xyKJcM9dWsFGhe+ISR6S1f67jkYlS9heZe0TFXY8DgQ=";
  };

  nativeBuildInputs = [
    asciidoc
    makeWrapper
  ];

  buildInputs = [
    git
    python3
    rcs
  ];

  strictDeps = true;

  preConfigure = ''
    patchShebangs .
  '';

  makeFlags = [
    "prefix=${placeholder "out"}"
  ];

  postInstall = ''
    wrapProgram $out/bin/src \
      --suffix PATH ":" "${rcs}/bin"
  '';

  meta = with lib; {
    homepage = "http://www.catb.org/esr/src/";
    description = "Simple single-file revision control";
    longDescription = ''
      SRC, acronym of Simple Revision Control, is RCS/SCCS reloaded with a
      modern UI, designed to manage single-file solo projects kept more than one
      to a directory. Use it for FAQs, ~/bin directories, config files, and the
      like. Features integer sequential revision numbers, a command set that
      will seem familiar to Subversion/Git/hg users, and no binary blobs
      anywhere.
    '';
    changelog = "https://gitlab.com/esr/src/-/raw/${finalAttrs.version}/NEWS.adoc";
    license = licenses.bsd2;
    mainProgram = "src";
    maintainers = with maintainers; [ AndersonTorres ];
    inherit (python3.meta) platforms;
  };
})