releaseTools: no-op expression cleanup

No functional change, was just reading through these and cleaning/sanitizing
them a bit while I'm here.
This commit is contained in:
Benjamin Hipple 2020-03-21 20:15:09 -04:00
parent b0c75e811a
commit 79d875ae77
5 changed files with 30 additions and 35 deletions

View file

@ -51,29 +51,24 @@ stdenv.mkDerivation (
configureFlags="--prefix=$prefix $configureFlags"
dontAddPrefix=1
prefix=$TMPDIR/inst$prefix
''; # */
'';
doDist = true;
distPhase =
''
mkdir -p $out/tarballs
tar cvfj $out/tarballs/''${releaseName:-binary-dist}.tar.bz2 -C $TMPDIR/inst .
'';
distPhase = ''
mkdir -p $out/tarballs
tar cvfj $out/tarballs/''${releaseName:-binary-dist}.tar.bz2 -C $TMPDIR/inst .
'';
finalPhase = ''
for i in $out/tarballs/*; do
echo "file binary-dist $i" >> $out/nix-support/hydra-build-products
done
finalPhase =
''
for i in $out/tarballs/*; do
echo "file binary-dist $i" >> $out/nix-support/hydra-build-products
done
# Propagate the release name of the source tarball. This is
# to get nice package names in channels.
test -n "$releaseName" && (echo "$releaseName" >> $out/nix-support/hydra-release-name)
'';
# Propagate the release name of the source tarball. This is
# to get nice package names in channels.
test -n "$releaseName" && (echo "$releaseName" >> $out/nix-support/hydra-release-name)
'';
meta = (if args ? meta then args.meta else {}) // {
description = "Build of a generic binary distribution";

View file

@ -88,7 +88,7 @@ vmTools.runInLinuxImage (stdenv.mkDerivation (
done
eval "$postInstall"
''; # */
'';
meta = (if args ? meta then args.meta else {}) // {
description = "Deb package for ${diskImage.fullName}";

View file

@ -1,4 +1,4 @@
{pkgs}:
{ pkgs }:
with pkgs;
@ -77,7 +77,7 @@ rec {
its contituents. Channel jobs are a special type of jobs that are
listed in the channel tab of Hydra and that can be suscribed.
A tarball of the src attribute is distributed via the channel.
- constituents: a list of derivations on which the channel success depends.
- name: the channel name that will be used in the hydra interface.
- src: should point to the root folder of the nix-expressions used by the
@ -88,7 +88,7 @@ rec {
name = "my-channel";
src = ./.;
};
*/
channel =
{ name, src, constituents ? [], meta ? {}, isNixOS ? true, ... }@args:

View file

@ -11,12 +11,12 @@
, ...
} @ args :
let
let
mvnFlags = "-Dmaven.repo.local=$M2_REPO ${if doTest then "" else "-Dmaven.test.skip.exec=true"} ${extraMvnFlags}";
in
stdenv.mkDerivation ( {
inherit name src;
inherit name src;
phases = "setupPhase unpackPhase patchPhase mvnCompile ${if doTestCompile then "mvnTestCompile mvnTestJar" else ""} ${if doTest then "mvnTest" else ""} ${if doJavadoc then "mvnJavadoc" else ""} ${if doCheckstyle then "mvnCheckstyle" else ""} mvnJar mvnAssembly mvnRelease finalPhase";
setupPhase = ''
@ -32,15 +32,15 @@ stdenv.mkDerivation ( {
mvnCompile = ''
mvn compile ${mvnFlags}
'';
'';
mvnTestCompile = ''
mvn test-compile ${mvnFlags}
'';
'';
mvnTestJar = ''
mvn jar:test-jar ${mvnFlags}
'';
'';
mvnTest = ''
mvn test ${mvnFlags}
@ -53,21 +53,21 @@ stdenv.mkDerivation ( {
mvn surefire-report:report-only
echo "report coverage $out/site/surefire-report.html" >> $out/nix-support/hydra-build-products
fi
'';
'';
mvnJavadoc = ''
mvn javadoc:javadoc ${mvnFlags}
echo "report javadoc $out/site/apidocs" >> $out/nix-support/hydra-build-products
'';
'';
mvnCheckstyle = ''
mvn checkstyle:checkstyle ${mvnFlags}
echo "report checkstyle $out/site/checkstyle.html" >> $out/nix-support/hydra-build-products
'';
'';
mvnJar = ''
mvn jar:jar ${mvnFlags}
'';
'';
mvnAssembly = ''
mvn assembly:assembly -Dmaven.test.skip=true ${mvnFlags}
@ -80,13 +80,13 @@ stdenv.mkDerivation ( {
releaseName=$(basename $zip .zip)
releaseName="$releaseName-r${toString src.rev or "0"}"
cp $zip $out/release/$releaseName.zip
echo "$releaseName" > $out/nix-support/hydra-release-name
${if doRelease then ''
echo "file zip $out/release/$releaseName.zip" >> $out/nix-support/hydra-build-products
'' else ""}
'';
'';
finalPhase = ''
if [ -d target/site ] ; then
@ -94,5 +94,5 @@ stdenv.mkDerivation ( {
echo "report site $out/site" >> $out/nix-support/hydra-build-products
fi
'';
} // args
} // args
)

View file

@ -44,7 +44,7 @@ vmTools.buildRPM (
for rpmdir in $extraRPMs ; do
echo "file rpm-extra $(ls $rpmdir/rpms/*/*.rpm | grep -v 'src\.rpm' | sort | head -1)" >> $out/nix-support/hydra-build-products
done
''; # */
'';
meta = (if args ? meta then args.meta else {}) // {
description = "RPM package for ${diskImage.fullName}";