From 896813431f304440e4d92a3ead4f4291c77c05f0 Mon Sep 17 00:00:00 2001 From: Cryo Date: Fri, 6 Dec 2024 17:50:09 +0800 Subject: [PATCH 1/2] maintainers: add cryo --- maintainers/maintainer-list.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index 367ff308844a..35559aef1530 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -4668,6 +4668,13 @@ name = "Carl Richard Theodor Schneider"; keys = [ { fingerprint = "2017 E152 BB81 5C16 955C E612 45BC C1E2 709B 1788"; } ]; }; + cryo = { + email = "cryo@disroot.org"; + github = "cry0ice"; + githubId = 176274027; + name = "Cryo"; + keys = [ { fingerprint = "2CF7 F8E8 2258 5751 2591 F97F 4B12 E34A 25A9 AB35"; } ]; + }; Cryolitia = { name = "Cryolitia PukNgae"; email = "Cryolitia@gmail.com"; From ff1502b97d8902e4b4f0bd21b8ba024fbcbec9d0 Mon Sep 17 00:00:00 2001 From: Cryo Date: Sat, 7 Dec 2024 07:13:34 +0800 Subject: [PATCH 2/2] chsrc: init at 0.1.9 --- .../ch/chsrc/disable-static-compiling.patch | 14 ++++++ pkgs/by-name/ch/chsrc/package.nix | 46 +++++++++++++++++++ 2 files changed, 60 insertions(+) create mode 100644 pkgs/by-name/ch/chsrc/disable-static-compiling.patch create mode 100644 pkgs/by-name/ch/chsrc/package.nix diff --git a/pkgs/by-name/ch/chsrc/disable-static-compiling.patch b/pkgs/by-name/ch/chsrc/disable-static-compiling.patch new file mode 100644 index 000000000000..470deb32e9c9 --- /dev/null +++ b/pkgs/by-name/ch/chsrc/disable-static-compiling.patch @@ -0,0 +1,14 @@ +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 + diff --git a/pkgs/by-name/ch/chsrc/package.nix b/pkgs/by-name/ch/chsrc/package.nix new file mode 100644 index 000000000000..d59c2823ee20 --- /dev/null +++ b/pkgs/by-name/ch/chsrc/package.nix @@ -0,0 +1,46 @@ +{ + lib, + fetchFromGitHub, + stdenv, + texinfo, +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "chsrc"; + version = "0.1.9"; + + src = fetchFromGitHub { + owner = "RubyMetric"; + repo = finalAttrs.pname; + rev = "v${finalAttrs.version}"; + hash = "sha256-MwT6SuDisJ2ynxlOqAUA8WjhrTeUcyoAMArehnby8Yw="; + }; + + 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/ + runHook postInstall + ''; + + meta = { + description = "Change Source everywhere for every software"; + homepage = "https://chsrc.run/"; + changelog = "https://github.com/RubyMetric/chsrc/releases/tag/v${finalAttrs.version}"; + license = with lib.licenses; [ + gpl3Plus + mit + ]; + maintainers = with lib.maintainers; [ cryo ]; + platforms = lib.platforms.all; + mainProgram = "chsrc"; + }; +})