sapling: remove intermediate package

The build for the sapling package happens in three steps:

1. build sapling-isl
2. build sapling-main, copying files from sapling-isl
3. build sapling, copying files from sapling-main

I don't see a reason for splitting sapling-main and sapling. The problem
with splitting is that it makes it hard to use a package override to
patch sapling-main.

Merge sapling-main and sapling so I can easily apply patches with my
nixpkgs/config.nix.
This commit is contained in:
Matthew "strager" Glazar 2023-01-14 17:20:58 -08:00 committed by Austin Seipp
parent fd1f4d7c53
commit af57670e59

View file

@ -88,10 +88,10 @@ let
runHook postInstall
'';
};
# Builds the main `sl` binary and its Python extensions
sapling = python3Packages.buildPythonPackage {
pname = "sapling-main";
in
# Builds the main `sl` binary and its Python extensions
python3Packages.buildPythonApplication {
pname = "sapling";
inherit src version;
sourceRoot = "source/eden/scm";
@ -164,35 +164,17 @@ let
Security
];
doCheck = false;
HGNAME = "sl";
SAPLING_OSS_BUILD = "true";
SAPLING_VERSION = version;
SAPLING_VERSION_HASH = versionHash;
};
in
stdenv.mkDerivation {
pname = "sapling";
inherit version;
dontUnpack = true;
installPhase = ''
runHook preInstall
mkdir -p $out
cp -r ${sapling}/* $out
runHook postInstall
'';
# just a simple check phase, until we have a running test suite. this should
# help catch issues like lack of a LOCALE_ARCHIVE setting (see GH PR #202760)
doCheck = true;
checkPhase = ''
installCheckPhase = ''
echo -n "testing sapling version; should be \"${version}\"... "
${sapling}/bin/sl version | grep -qw "${version}"
$out/bin/sl version | grep -qw "${version}"
echo "OK!"
'';