From d5564db46a2596b4feeb61046fa3b4fdb7f30d2c Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Thu, 10 Jun 2021 12:57:49 +0000 Subject: [PATCH 1/3] cvs-fast-export: rename from cvs_fast_export cvs-fast-export is the canonical name of the software that users would expect the package to be called in Nixpkgs. --- pkgs/top-level/aliases.nix | 1 + pkgs/top-level/all-packages.nix | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index 3eb72cefa122..3e5dfc51cfa8 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -158,6 +158,7 @@ mapAliases ({ cups-googlecloudprint = throw "Google Cloudprint is officially discontinued since Jan 2021, more info https://support.google.com/chrome/a/answer/9633006"; cquery = throw "cquery has been removed because it is abandoned by upstream. Consider switching to clangd or ccls instead."; # added 2020-06-15 cv = progress; # added 2015-09-06 + cvs_fast_export = cvs-fast-export; # added 2021-06-10 d1x_rebirth = dxx-rebirth; # added 2018-04-25 d2x_rebirth = dxx-rebirth; # added 2018-04-25 dart_dev = throw "Non-stable versions of Dart have been removed."; # added 2020-01-15 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index e794f99b7e5c..ad5474958ba6 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3939,7 +3939,7 @@ in cwebbin = callPackage ../development/tools/misc/cwebbin { }; - cvs_fast_export = callPackage ../applications/version-management/cvs-fast-export { }; + cvs-fast-export = callPackage ../applications/version-management/cvs-fast-export { }; dadadodo = callPackage ../tools/text/dadadodo { }; From db733deeedcf0fdef48d0b425dfb7bd1c942b319 Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Thu, 10 Jun 2021 12:50:44 +0000 Subject: [PATCH 2/3] cvs-fast-export: clean up; fix cross Style was unidiomatic for modern Nixpkgs, there was no nativeBuildInputs/buildInputs separation, and some dependencies were unused. I've removed doCheck here, because the default Nixpkgs checkPhase wasn't actually running the tests (need to cd into tests first), and when I did write a checkPhase to run the tests, they didn't work and I couldn't make them work. A note on RCS: There is code in cvsconvert that calls RCS, but I analyzed it quite carefully, and came to the conclusion that all such code is unreachable, so I removed the RCS dependency. --- .../cvs-fast-export/default.nix | 60 +++++++++---------- 1 file changed, 27 insertions(+), 33 deletions(-) diff --git a/pkgs/applications/version-management/cvs-fast-export/default.nix b/pkgs/applications/version-management/cvs-fast-export/default.nix index ffd583585c0f..3aee0adc6eb6 100644 --- a/pkgs/applications/version-management/cvs-fast-export/default.nix +++ b/pkgs/applications/version-management/cvs-fast-export/default.nix @@ -1,31 +1,23 @@ -{lib, stdenv, fetchurl, makeWrapper, flex, bison, - asciidoc, docbook_xml_dtd_45, docbook_xsl, - libxml2, libxslt, - python3, rcs, cvs, git, - coreutils, rsync}: -with stdenv; with lib; -mkDerivation rec { - name = "cvs-fast-export-${meta.version}"; - meta = { - version = "1.56"; - description = "Export an RCS or CVS history as a fast-import stream"; - license = licenses.gpl2Plus; - maintainers = with maintainers; [ dfoxfranke ]; - homepage = "http://www.catb.org/esr/cvs-fast-export/"; - platforms = platforms.all; - }; +{ lib, stdenv, fetchurl, makeWrapper, asciidoc, docbook_xml_dtd_45, docbook_xsl +, coreutils, cvs, diffutils, findutils, git, python3, rsync +}: + +stdenv.mkDerivation rec { + pname = "cvs-fast-export"; + version = "1.56"; src = fetchurl { - url = "http://www.catb.org/~esr/cvs-fast-export/cvs-fast-export-1.56.tar.gz"; + url = "http://www.catb.org/~esr/cvs-fast-export/cvs-fast-export-${version}.tar.gz"; sha256 = "sha256-TB/m7kd91+PyAkGdFCCgeb9pQh0kacq0QuTZa8f9CxU="; }; - buildInputs = [ - flex bison asciidoc docbook_xml_dtd_45 docbook_xsl libxml2 libxslt - python3 rcs cvs git makeWrapper - ]; + strictDeps = true; + nativeBuildInputs = [ makeWrapper asciidoc ]; + buildInputs = [ python3 ]; - postPatch = "patchShebangs ."; + postPatch = '' + patchShebangs . + ''; preBuild = '' makeFlagsArray=( @@ -35,16 +27,18 @@ mkDerivation rec { ) ''; - doCheck = true; + postInstall = '' + wrapProgram $out/bin/cvssync --prefix PATH : ${lib.makeBinPath [ rsync ]} + wrapProgram $out/bin/cvsconvert --prefix PATH : $out/bin:${lib.makeBinPath [ + coreutils cvs diffutils findutils git + ]} + ''; - postInstall = - let - binpath = makeBinPath [ out rcs cvs git coreutils rsync ]; - in '' - for prog in cvs-fast-export cvsconvert cvssync; do - wrapProgram $out/bin/$prog \ - --prefix PATH : ${binpath} - done - '' - ; + meta = with lib; { + description = "Export an RCS or CVS history as a fast-import stream"; + license = licenses.gpl2Plus; + maintainers = with maintainers; [ dfoxfranke ]; + homepage = "http://www.catb.org/esr/cvs-fast-export/"; + platforms = platforms.unix; + }; } From cf1f499e7e3d4da1365ba052c6fc7a7c936ba4a3 Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Thu, 10 Jun 2021 13:59:58 +0000 Subject: [PATCH 3/3] cvs-fast-export: 1.56 -> 1.57 --- .../version-management/cvs-fast-export/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/version-management/cvs-fast-export/default.nix b/pkgs/applications/version-management/cvs-fast-export/default.nix index 3aee0adc6eb6..a14af17c01c5 100644 --- a/pkgs/applications/version-management/cvs-fast-export/default.nix +++ b/pkgs/applications/version-management/cvs-fast-export/default.nix @@ -4,11 +4,11 @@ stdenv.mkDerivation rec { pname = "cvs-fast-export"; - version = "1.56"; + version = "1.57"; src = fetchurl { url = "http://www.catb.org/~esr/cvs-fast-export/cvs-fast-export-${version}.tar.gz"; - sha256 = "sha256-TB/m7kd91+PyAkGdFCCgeb9pQh0kacq0QuTZa8f9CxU="; + sha256 = "0y1fzsicga19nsarpmn2ms69sq26b2d3d8a1169qbqz1kzr0jji8"; }; strictDeps = true;