1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 texinfo,
6}:
7
8stdenv.mkDerivation (finalAttrs: {
9 pname = "chsrc";
10 version = "0.2.1";
11
12 src = fetchFromGitHub {
13 owner = "RubyMetric";
14 repo = "chsrc";
15 tag = "v${finalAttrs.version}";
16 hash = "sha256-yZjza4BSgRCOwc719iNdG17WVuLPUBJjZb6Yz4FsTcA=";
17 };
18
19 nativeBuildInputs = [ texinfo ];
20
21 installPhase = ''
22 runHook preInstall
23
24 install -Dm755 chsrc $out/bin/chsrc
25 install -Dm644 doc/chsrc.1 -t $out/share/man/man1/
26 makeinfo doc/chsrc.texi --output=chsrc.info
27 install -Dm644 chsrc.info -t $out/share/info/
28
29 runHook postInstall
30 '';
31
32 meta = {
33 description = "Change Source everywhere for every software";
34 homepage = "https://chsrc.run/";
35 changelog = "https://github.com/RubyMetric/chsrc/releases/tag/v${finalAttrs.version}";
36 license = with lib.licenses; [
37 gpl3Plus
38 mit
39 ];
40 maintainers = with lib.maintainers; [ ];
41 platforms = lib.platforms.all;
42 mainProgram = "chsrc";
43 };
44})