emaryn 2025-04-19 01:58:17 +08:00
parent dba7688e8e
commit 30084996f0
2 changed files with 7 additions and 23 deletions

View file

@ -1,14 +0,0 @@
diff --git a/Makefile b/Makefile
index 99065da..2415738 100644
--- a/Makefile
+++ b/Makefile
@@ -16,9 +16,6 @@ endif
ifeq ($(CC), clang)
CFLAGS += $(CLANG_FLAGS)
endif
-ifeq ($(shell uname), Linux)
- CFLAGS += -static
-endif
Target = chsrc

View file

@ -1,33 +1,31 @@
{
lib,
fetchFromGitHub,
stdenv,
fetchFromGitHub,
texinfo,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "chsrc";
version = "0.1.9";
version = "0.2.1";
src = fetchFromGitHub {
owner = "RubyMetric";
repo = "chsrc";
rev = "v${finalAttrs.version}";
hash = "sha256-MwT6SuDisJ2ynxlOqAUA8WjhrTeUcyoAMArehnby8Yw=";
tag = "v${finalAttrs.version}";
hash = "sha256-yZjza4BSgRCOwc719iNdG17WVuLPUBJjZb6Yz4FsTcA=";
};
nativeBuildInputs = [ texinfo ];
patches = [
./disable-static-compiling.patch
];
installPhase = ''
runHook preInstall
install -Dm755 chsrc $out/bin/chsrc
install -Dm644 doc/chsrc.1 -t $out/share/man/man1/
makeinfo doc/chsrc.texi --output=chsrc.info
install -Dm 644 chsrc.info -t $out/share/info/
install -Dm644 chsrc.info -t $out/share/info/
runHook postInstall
'';