From 8c05e036ea485166c474f39d46e6f4441baeda0e Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Thu, 16 Jul 2020 19:53:31 +0000 Subject: [PATCH] gitAndTools.git-remote-hg: use buildPythonApplication This is much cleaner than constructing PYTHONPATH using interpolated subshells. --- .../git-and-tools/git-remote-hg/default.nix | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/pkgs/applications/version-management/git-and-tools/git-remote-hg/default.nix b/pkgs/applications/version-management/git-and-tools/git-remote-hg/default.nix index 58d9bf80fb3a..dd4e6e011a6e 100644 --- a/pkgs/applications/version-management/git-and-tools/git-remote-hg/default.nix +++ b/pkgs/applications/version-management/git-and-tools/git-remote-hg/default.nix @@ -1,8 +1,8 @@ -{ stdenv, lib, fetchFromGitHub, mercurial, makeWrapper +{ stdenv, lib, fetchFromGitHub, python3Packages , asciidoc, xmlto, docbook_xsl, docbook_xml_dtd_45, libxslt, libxml2 }: -stdenv.mkDerivation rec { +python3Packages.buildPythonApplication rec { pname = "git-remote-hg"; version = "unstable-2020-06-12"; @@ -13,17 +13,13 @@ stdenv.mkDerivation rec { sha256 = "0dw48vbnk7pp0w6fzgl29mq8fyn52pacbya2w14z9c6jfvh5sha1"; }; - buildInputs = [ mercurial.python mercurial makeWrapper + nativeBuildInputs = [ asciidoc xmlto docbook_xsl docbook_xml_dtd_45 libxslt libxml2 ]; - - doCheck = false; - - installFlags = [ "HOME=\${out}" "install-doc" ]; + propagatedBuildInputs = with python3Packages; [ mercurial ]; postInstall = '' - wrapProgram $out/bin/git-remote-hg \ - --prefix PYTHONPATH : "$(echo ${mercurial}/lib/python*/site-packages):$(echo ${mercurial.python}/lib/python*/site-packages)${stdenv.lib.concatMapStrings (x: ":$(echo ${x}/lib/python*/site-packages)") mercurial.pythonPackages or []}" + make install-doc prefix=$out ''; meta = with lib; {