about summary refs log tree commit diff
path: root/nixpkgs/pkgs/by-name/en/endlines/package.nix
blob: b03a0d733535af5f38594b08fa631dde2a241575 (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
{
  lib,
  stdenv,
  fetchFromGitHub,
}:
stdenv.mkDerivation (finalAttrs: {
  pname = "endlines";
  version = "1.9.2";

  src = fetchFromGitHub {
    owner = "mdolidon";
    repo = "endlines";
    rev = finalAttrs.version;
    hash = "sha256-M0IyY/WXR8qv9/qx5G0pG3EKqMoZAP3fJTZ6sSSMMyQ=";
  };

  postPatch = ''
    substituteInPlace Makefile --replace "/usr/local" "$out"
  '';

  preInstall = ''
    mkdir -p $out/bin
  '';

  meta = {
    homepage = "https://github.com/mdolidon/endlines";
    description = "Easy conversion between new-line conventions";
    license = lib.licenses.asl20;
    maintainers = with lib.maintainers; [ zedseven ];
    mainProgram = "endlines";
    platforms = lib.platforms.unix;
  };
})