Skip to content

Commit ff1502b

Browse files
author
Cryo
committed
chsrc: init at 0.1.9
1 parent 8968134 commit ff1502b

File tree

2 files changed

+60
-0
lines changed

2 files changed

+60
-0
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
diff --git a/Makefile b/Makefile
2+
index 99065da..2415738 100644
3+
--- a/Makefile
4+
+++ b/Makefile
5+
@@ -16,9 +16,6 @@ endif
6+
ifeq ($(CC), clang)
7+
CFLAGS += $(CLANG_FLAGS)
8+
endif
9+
-ifeq ($(shell uname), Linux)
10+
- CFLAGS += -static
11+
-endif
12+
13+
Target = chsrc
14+

pkgs/by-name/ch/chsrc/package.nix

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

0 commit comments

Comments
 (0)