From 0b91e7133907be85efe63cc2548c3fac4981428e Mon Sep 17 00:00:00 2001 From: patka Date: Sat, 17 May 2025 15:04:54 +0200 Subject: [PATCH] sloccount: drop code is from 2004 and unmaintained both upstream and in nixpkgs. 'loccount' is a maintained reimplementation in golang and a good alternative --- pkgs/by-name/sl/sloccount/package.nix | 82 --------------------------- pkgs/top-level/aliases.nix | 1 + 2 files changed, 1 insertion(+), 82 deletions(-) delete mode 100644 pkgs/by-name/sl/sloccount/package.nix diff --git a/pkgs/by-name/sl/sloccount/package.nix b/pkgs/by-name/sl/sloccount/package.nix deleted file mode 100644 index 0761d0d50227..000000000000 --- a/pkgs/by-name/sl/sloccount/package.nix +++ /dev/null @@ -1,82 +0,0 @@ -{ - fetchurl, - lib, - stdenv, - perl, - makeWrapper, -}: - -stdenv.mkDerivation rec { - pname = "sloccount"; - version = "2.26"; - - src = fetchurl { - url = "https://www.dwheeler.com/${pname}/${pname}-${version}.tar.gz"; - sha256 = "0ayiwfjdh1946asah861ah9269s5xkc8p5fv1wnxs9znyaxs4zzs"; - }; - - nativeBuildInputs = [ makeWrapper ]; - buildInputs = [ perl ]; - - # Make sure the Flex-generated files are newer than the `.l' files, so that - # Flex isn't needed to recompile them. - patchPhase = '' - for file in * - do - if grep -q /usr/bin/perl "$file" - then - echo "patching \`$file'..." - substituteInPlace "$file" --replace \ - "/usr/bin/perl" "${perl}/bin/perl" - fi - done - - for file in *.l - do - touch "$(echo $file | sed -es'/\.l$/.c/g')" - done - ''; - - makeFlags = [ - "PREFIX=$(out)" - "CC=${stdenv.cc.targetPrefix}cc" - ]; - - doCheck = true; - checkPhase = ''HOME="$TMPDIR" PATH="$PWD:$PATH" make test''; - - preInstall = '' - mkdir -p "$out/bin" - mkdir -p "$out/share/man/man1" - mkdir -p "$out/share/doc" - ''; - - postInstall = '' - for w in "$out/bin"/*; do - isScript "$w" || continue - wrapProgram "$w" --prefix PATH : "$out/bin" - done - ''; - - meta = { - description = "Set of tools for counting physical Source Lines of Code (SLOC)"; - - longDescription = '' - This is the home page of "SLOCCount", a set of tools for - counting physical Source Lines of Code (SLOC) in a large number - of languages of a potentially large set of programs. This suite - of tools was used in my papers More than a Gigabuck: Estimating - GNU/Linux's Size and Estimating Linux's Size to measure the SLOC - of entire GNU/Linux distributions, and my essay Linux Kernel - 2.6: It's Worth More! Others have measured Debian GNU/Linux and - the Perl CPAN library using this tool suite. - ''; - - license = lib.licenses.gpl2Plus; - - homepage = "https://www.dwheeler.com/sloccount/"; - - maintainers = [ ]; - platforms = lib.platforms.all; - }; -} diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index 73f376d1881a..44efebf760e9 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -1698,6 +1698,7 @@ mapAliases { skypeforlinux = throw "Skype has been shut down in May 2025"; # Added 2025-05-05 slack-dark = throw "'slack-dark' has been renamed to/replaced by 'slack'"; # Converted to throw 2024-10-17 slimerjs = throw "slimerjs does not work with any version of Firefox newer than 59; upstream ended the project in 2021. "; # added 2025-01-06 + sloccount = throw "'sloccount' has been removed because it is unmaintained. Consider migrating to 'loccount'"; # added 2025-05-17 slurm-llnl = slurm; # renamed July 2017 sm64ex-coop = throw "'sm64ex-coop' was removed as it was archived upstream. Consider migrating to 'sm64coopdx'"; # added 2024-11-23 smartgithg = smartgit; # renamed March 2025