mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-09-21 04:28:40 +03:00
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:
parent
b0c75e811a
commit
79d875ae77
@ -51,29 +51,24 @@ stdenv.mkDerivation (
|
|||||||
configureFlags="--prefix=$prefix $configureFlags"
|
configureFlags="--prefix=$prefix $configureFlags"
|
||||||
dontAddPrefix=1
|
dontAddPrefix=1
|
||||||
prefix=$TMPDIR/inst$prefix
|
prefix=$TMPDIR/inst$prefix
|
||||||
''; # */
|
'';
|
||||||
|
|
||||||
|
|
||||||
doDist = true;
|
doDist = true;
|
||||||
|
|
||||||
distPhase =
|
distPhase = ''
|
||||||
''
|
mkdir -p $out/tarballs
|
||||||
mkdir -p $out/tarballs
|
tar cvfj $out/tarballs/''${releaseName:-binary-dist}.tar.bz2 -C $TMPDIR/inst .
|
||||||
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 =
|
# Propagate the release name of the source tarball. This is
|
||||||
''
|
# to get nice package names in channels.
|
||||||
for i in $out/tarballs/*; do
|
test -n "$releaseName" && (echo "$releaseName" >> $out/nix-support/hydra-release-name)
|
||||||
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)
|
|
||||||
'';
|
|
||||||
|
|
||||||
|
|
||||||
meta = (if args ? meta then args.meta else {}) // {
|
meta = (if args ? meta then args.meta else {}) // {
|
||||||
description = "Build of a generic binary distribution";
|
description = "Build of a generic binary distribution";
|
||||||
|
@ -88,7 +88,7 @@ vmTools.runInLinuxImage (stdenv.mkDerivation (
|
|||||||
done
|
done
|
||||||
|
|
||||||
eval "$postInstall"
|
eval "$postInstall"
|
||||||
''; # */
|
'';
|
||||||
|
|
||||||
meta = (if args ? meta then args.meta else {}) // {
|
meta = (if args ? meta then args.meta else {}) // {
|
||||||
description = "Deb package for ${diskImage.fullName}";
|
description = "Deb package for ${diskImage.fullName}";
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{pkgs}:
|
{ pkgs }:
|
||||||
|
|
||||||
with pkgs;
|
with pkgs;
|
||||||
|
|
||||||
@ -77,7 +77,7 @@ rec {
|
|||||||
its contituents. Channel jobs are a special type of jobs that are
|
its contituents. Channel jobs are a special type of jobs that are
|
||||||
listed in the channel tab of Hydra and that can be suscribed.
|
listed in the channel tab of Hydra and that can be suscribed.
|
||||||
A tarball of the src attribute is distributed via the channel.
|
A tarball of the src attribute is distributed via the channel.
|
||||||
|
|
||||||
- constituents: a list of derivations on which the channel success depends.
|
- constituents: a list of derivations on which the channel success depends.
|
||||||
- name: the channel name that will be used in the hydra interface.
|
- 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
|
- src: should point to the root folder of the nix-expressions used by the
|
||||||
@ -88,7 +88,7 @@ rec {
|
|||||||
name = "my-channel";
|
name = "my-channel";
|
||||||
src = ./.;
|
src = ./.;
|
||||||
};
|
};
|
||||||
|
|
||||||
*/
|
*/
|
||||||
channel =
|
channel =
|
||||||
{ name, src, constituents ? [], meta ? {}, isNixOS ? true, ... }@args:
|
{ name, src, constituents ? [], meta ? {}, isNixOS ? true, ... }@args:
|
||||||
|
@ -11,12 +11,12 @@
|
|||||||
, ...
|
, ...
|
||||||
} @ args :
|
} @ args :
|
||||||
|
|
||||||
let
|
let
|
||||||
mvnFlags = "-Dmaven.repo.local=$M2_REPO ${if doTest then "" else "-Dmaven.test.skip.exec=true"} ${extraMvnFlags}";
|
mvnFlags = "-Dmaven.repo.local=$M2_REPO ${if doTest then "" else "-Dmaven.test.skip.exec=true"} ${extraMvnFlags}";
|
||||||
in
|
in
|
||||||
|
|
||||||
stdenv.mkDerivation ( {
|
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";
|
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 = ''
|
setupPhase = ''
|
||||||
@ -32,15 +32,15 @@ stdenv.mkDerivation ( {
|
|||||||
|
|
||||||
mvnCompile = ''
|
mvnCompile = ''
|
||||||
mvn compile ${mvnFlags}
|
mvn compile ${mvnFlags}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
mvnTestCompile = ''
|
mvnTestCompile = ''
|
||||||
mvn test-compile ${mvnFlags}
|
mvn test-compile ${mvnFlags}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
mvnTestJar = ''
|
mvnTestJar = ''
|
||||||
mvn jar:test-jar ${mvnFlags}
|
mvn jar:test-jar ${mvnFlags}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
mvnTest = ''
|
mvnTest = ''
|
||||||
mvn test ${mvnFlags}
|
mvn test ${mvnFlags}
|
||||||
@ -53,21 +53,21 @@ stdenv.mkDerivation ( {
|
|||||||
mvn surefire-report:report-only
|
mvn surefire-report:report-only
|
||||||
echo "report coverage $out/site/surefire-report.html" >> $out/nix-support/hydra-build-products
|
echo "report coverage $out/site/surefire-report.html" >> $out/nix-support/hydra-build-products
|
||||||
fi
|
fi
|
||||||
'';
|
'';
|
||||||
|
|
||||||
mvnJavadoc = ''
|
mvnJavadoc = ''
|
||||||
mvn javadoc:javadoc ${mvnFlags}
|
mvn javadoc:javadoc ${mvnFlags}
|
||||||
echo "report javadoc $out/site/apidocs" >> $out/nix-support/hydra-build-products
|
echo "report javadoc $out/site/apidocs" >> $out/nix-support/hydra-build-products
|
||||||
'';
|
'';
|
||||||
|
|
||||||
mvnCheckstyle = ''
|
mvnCheckstyle = ''
|
||||||
mvn checkstyle:checkstyle ${mvnFlags}
|
mvn checkstyle:checkstyle ${mvnFlags}
|
||||||
echo "report checkstyle $out/site/checkstyle.html" >> $out/nix-support/hydra-build-products
|
echo "report checkstyle $out/site/checkstyle.html" >> $out/nix-support/hydra-build-products
|
||||||
'';
|
'';
|
||||||
|
|
||||||
mvnJar = ''
|
mvnJar = ''
|
||||||
mvn jar:jar ${mvnFlags}
|
mvn jar:jar ${mvnFlags}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
mvnAssembly = ''
|
mvnAssembly = ''
|
||||||
mvn assembly:assembly -Dmaven.test.skip=true ${mvnFlags}
|
mvn assembly:assembly -Dmaven.test.skip=true ${mvnFlags}
|
||||||
@ -80,13 +80,13 @@ stdenv.mkDerivation ( {
|
|||||||
releaseName=$(basename $zip .zip)
|
releaseName=$(basename $zip .zip)
|
||||||
releaseName="$releaseName-r${toString src.rev or "0"}"
|
releaseName="$releaseName-r${toString src.rev or "0"}"
|
||||||
cp $zip $out/release/$releaseName.zip
|
cp $zip $out/release/$releaseName.zip
|
||||||
|
|
||||||
echo "$releaseName" > $out/nix-support/hydra-release-name
|
echo "$releaseName" > $out/nix-support/hydra-release-name
|
||||||
|
|
||||||
${if doRelease then ''
|
${if doRelease then ''
|
||||||
echo "file zip $out/release/$releaseName.zip" >> $out/nix-support/hydra-build-products
|
echo "file zip $out/release/$releaseName.zip" >> $out/nix-support/hydra-build-products
|
||||||
'' else ""}
|
'' else ""}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
finalPhase = ''
|
finalPhase = ''
|
||||||
if [ -d target/site ] ; then
|
if [ -d target/site ] ; then
|
||||||
@ -94,5 +94,5 @@ stdenv.mkDerivation ( {
|
|||||||
echo "report site $out/site" >> $out/nix-support/hydra-build-products
|
echo "report site $out/site" >> $out/nix-support/hydra-build-products
|
||||||
fi
|
fi
|
||||||
'';
|
'';
|
||||||
} // args
|
} // args
|
||||||
)
|
)
|
||||||
|
@ -44,7 +44,7 @@ vmTools.buildRPM (
|
|||||||
for rpmdir in $extraRPMs ; do
|
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
|
echo "file rpm-extra $(ls $rpmdir/rpms/*/*.rpm | grep -v 'src\.rpm' | sort | head -1)" >> $out/nix-support/hydra-build-products
|
||||||
done
|
done
|
||||||
''; # */
|
'';
|
||||||
|
|
||||||
meta = (if args ? meta then args.meta else {}) // {
|
meta = (if args ? meta then args.meta else {}) // {
|
||||||
description = "RPM package for ${diskImage.fullName}";
|
description = "RPM package for ${diskImage.fullName}";
|
||||||
|
Loading…
Reference in New Issue
Block a user