git.iko.soy/typeable/nixpkgs
on master help sign in
releaseTools: no-op expression cleanup

No functional change, was just reading through these and cleaning/sanitizing them a bit while I'm here.

commit79d875ae7757af9a43248d89f746bc92947284dc authorBenjamin Hipple <bhipple@protonmail.com> dateSat 21 Mar 2020, 20:15 (7 years ago) parentb0c75e8
5 files changed+30−35
pkgs/build-support/release/binary-tarball.nix+13−18 pkgs/build-support/release/debian-build.nix+1−1 pkgs/build-support/release/default.nix+3−3 pkgs/build-support/release/maven-build.nix+12−12 pkgs/build-support/release/rpm-build.nix+1−1
pkgs/build-support/release/binary-tarball.nix+13−18
@@ -51,29 +51,24 @@ stdenv.mkDerivation (
5151 configureFlags="--prefix=$prefix $configureFlags"
5252 dontAddPrefix=1
5353 prefix=$TMPDIR/inst$prefix
54− ''; # */
55−
54+ '';
5655
5756 doDist = true;
5857
59− distPhase =
60− ''
61− mkdir -p $out/tarballs
62− tar cvfj $out/tarballs/''${releaseName:-binary-dist}.tar.bz2 -C $TMPDIR/inst .
63− '';
64−
65−
66− finalPhase =
67− ''
68− for i in $out/tarballs/*; do
69− echo "file binary-dist $i" >> $out/nix-support/hydra-build-products
70− done
58+ distPhase = ''
59+ mkdir -p $out/tarballs
60+ tar cvfj $out/tarballs/''${releaseName:-binary-dist}.tar.bz2 -C $TMPDIR/inst .
61+ '';
7162
72− # Propagate the release name of the source tarball. This is
73− # to get nice package names in channels.
74− test -n "$releaseName" && (echo "$releaseName" >> $out/nix-support/hydra-release-name)
75− '';
63+ finalPhase = ''
64+ for i in $out/tarballs/*; do
65+ echo "file binary-dist $i" >> $out/nix-support/hydra-build-products
66+ done
7667
68+ # Propagate the release name of the source tarball. This is
69+ # to get nice package names in channels.
70+ test -n "$releaseName" && (echo "$releaseName" >> $out/nix-support/hydra-release-name)
71+ '';
7772
7873 meta = (if args ? meta then args.meta else {}) // {
7974 description = "Build of a generic binary distribution";
pkgs/build-support/release/debian-build.nix+1−1
@@ -88,7 +88,7 @@ vmTools.runInLinuxImage (stdenv.mkDerivation (
8888 done
8989
9090 eval "$postInstall"
91− ''; # */
91+ '';
9292
9393 meta = (if args ? meta then args.meta else {}) // {
9494 description = "Deb package for ${diskImage.fullName}";
pkgs/build-support/release/default.nix+3−3
@@ -1,4 +1,4 @@
1−{pkgs}:
1+{ pkgs }:
22
33with pkgs;
44
@@ -77,7 +77,7 @@ rec {
7777 its contituents. Channel jobs are a special type of jobs that are
7878 listed in the channel tab of Hydra and that can be suscribed.
7979 A tarball of the src attribute is distributed via the channel.
80−
80+
8181 - constituents: a list of derivations on which the channel success depends.
8282 - name: the channel name that will be used in the hydra interface.
8383 - src: should point to the root folder of the nix-expressions used by the
@@ -88,7 +88,7 @@ rec {
8888 name = "my-channel";
8989 src = ./.;
9090 };
91−
91+
9292 */
9393 channel =
9494 { name, src, constituents ? [], meta ? {}, isNixOS ? true, ... }@args:
pkgs/build-support/release/maven-build.nix+12−12
@@ -11,12 +11,12 @@
1111, ...
1212} @ args :
1313
14−let
14+let
1515 mvnFlags = "-Dmaven.repo.local=$M2_REPO ${if doTest then "" else "-Dmaven.test.skip.exec=true"} ${extraMvnFlags}";
1616in
1717
1818stdenv.mkDerivation ( {
19− inherit name src;
19+ inherit name src;
2020 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";
2121
2222 setupPhase = ''
@@ -32,15 +32,15 @@ stdenv.mkDerivation ( {
3232
3333 mvnCompile = ''
3434 mvn compile ${mvnFlags}
35− '';
35+ '';
3636
3737 mvnTestCompile = ''
3838 mvn test-compile ${mvnFlags}
39− '';
39+ '';
4040
4141 mvnTestJar = ''
4242 mvn jar:test-jar ${mvnFlags}
43− '';
43+ '';
4444
4545 mvnTest = ''
4646 mvn test ${mvnFlags}
@@ -53,21 +53,21 @@ stdenv.mkDerivation ( {
5353 mvn surefire-report:report-only
5454 echo "report coverage $out/site/surefire-report.html" >> $out/nix-support/hydra-build-products
5555 fi
56− '';
56+ '';
5757
5858 mvnJavadoc = ''
5959 mvn javadoc:javadoc ${mvnFlags}
6060 echo "report javadoc $out/site/apidocs" >> $out/nix-support/hydra-build-products
61− '';
61+ '';
6262
6363 mvnCheckstyle = ''
6464 mvn checkstyle:checkstyle ${mvnFlags}
6565 echo "report checkstyle $out/site/checkstyle.html" >> $out/nix-support/hydra-build-products
66− '';
66+ '';
6767
6868 mvnJar = ''
6969 mvn jar:jar ${mvnFlags}
70− '';
70+ '';
7171
7272 mvnAssembly = ''
7373 mvn assembly:assembly -Dmaven.test.skip=true ${mvnFlags}
@@ -80,13 +80,13 @@ stdenv.mkDerivation ( {
8080 releaseName=$(basename $zip .zip)
8181 releaseName="$releaseName-r${toString src.rev or "0"}"
8282 cp $zip $out/release/$releaseName.zip
83−
83+
8484 echo "$releaseName" > $out/nix-support/hydra-release-name
8585
8686 ${if doRelease then ''
8787 echo "file zip $out/release/$releaseName.zip" >> $out/nix-support/hydra-build-products
8888 '' else ""}
89− '';
89+ '';
9090
9191 finalPhase = ''
9292 if [ -d target/site ] ; then
@@ -94,5 +94,5 @@ stdenv.mkDerivation ( {
9494 echo "report site $out/site" >> $out/nix-support/hydra-build-products
9595 fi
9696 '';
97−} // args
97+} // args
9898)
pkgs/build-support/release/rpm-build.nix+1−1
@@ -44,7 +44,7 @@ vmTools.buildRPM (
4444 for rpmdir in $extraRPMs ; do
4545 echo "file rpm-extra $(ls $rpmdir/rpms/*/*.rpm | grep -v 'src\.rpm' | sort | head -1)" >> $out/nix-support/hydra-build-products
4646 done
47− ''; # */
47+ '';
4848
4949 meta = (if args ? meta then args.meta else {}) // {
5050 description = "RPM package for ${diskImage.fullName}";