about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/misc/fet-sh/default.nix
blob: 689eb0395f40a23919576a32123b6cee5b2a0ae8 (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
{ stdenvNoCC, lib, fetchFromGitHub }:

stdenvNoCC.mkDerivation rec {
  pname = "fet-sh";
  version = "1.9";

  src = fetchFromGitHub {
    owner = "6gk";
    repo = "fet.sh";
    rev = "v${version}";
    sha256 = "sha256-xhX2nVteC3T3IjQh++mYlm0btDJQbyQa6b8sGualV0E=";
  };

  postPatch = ''
    patchShebangs fet.sh
  '';

  installPhase = ''
    install -m755 -D fet.sh $out/bin/fet.sh
  '';

  meta = with lib; {
    description = "A fetch written in posix shell without any external commands";
    homepage = "https://github.com/6gk/fet.sh";
    license = licenses.isc;
    platforms = platforms.all;
    maintainers = with maintainers; [ elkowar ];
    mainProgram = "fet.sh";
  };
}