New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
allure: init at 2.7.0 #47376
allure: init at 2.7.0 #47376
Conversation
src = fetchurl { | ||
url = "https://dl.bintray.com/qameta/generic/io/qameta/allure/${pname}/${version}/${pname}-${version}.tgz"; | ||
sha256 = "181996wayplpmss5x4kiilpr4wg1mnbzbv88kr8kv3j22gwygx0g"; | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this is an open source project and the source code is available, we generally prefer to build from source instead of downloading and re-distributing binaries.
https://github.com/allure-framework/allure-java
There ought to be a handful of other gradle built projects floating around, but IIRC the Java toolchain in Nix could use some love and improvement to bring it up to speed with the other languages. (There's also maven2nix for maven project generation.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You picked the wrong project, that was the java integration/listener for allure. Here's the one for this PR: https://github.com/allure-framework/allure2.
However as there are no clear build from source instruction, I'm not sure it is worth the time finding a way to build this and most likely other java packages bundled with it. If you just take a look at the lib folder:
allure-2.7.0/lib]$ find .
.
./slf4j-log4j12-1.7.25.jar
./flexmark-0.34.8.jar
./jackson-module-jaxb-annotations-2.9.6.jar
./allure-commandline-2.7.0.jar
./jcommander-1.72.jar
./tika-core-1.18.jar
./jetty-http-9.4.11.v20180605.jar
./commons-codec-1.10.jar
./commons-beanutils-1.9.3.jar
./jackson-core-2.9.6.jar
./jackson-databind-2.9.6.jar
./slf4j-api-1.7.25.jar
./commons-io-2.6.jar
./jackson-dataformat-xml-2.9.6.jar
./javax.servlet-api-3.1.0.jar
./woodstox-core-5.0.3.jar
./allure2-model-api-1.0.0.jar
./jackson-dataformat-yaml-2.9.6.jar
./commons-logging-1.2.jar
./allure1-model-1.0.jar
./allure-plugin-api-2.7.0.jar
./stax2-api-3.1.4.jar
./properties-2.0.RC5.jar
./commons-collections-3.2.2.jar
./allure-generator-2.7.0.jar
./snakeyaml-1.18.jar
./httpcore-4.4.10.jar
./jetty-server-9.4.11.v20180605.jar
./jaxb-utils-1.0.jar
./jackson-annotations-2.9.0.jar
./log4j-1.2.17.jar
./jaxb-api-2.3.0.jar
./allure2-model-jackson-1.0.0.jar
./flexmark-util-0.34.8.jar
./commons-lang3-3.7.jar
./jetty-util-9.4.11.v20180605.jar
./commons-collections4-4.1.jar
./commons-text-1.4.jar
./freemarker-2.3.28.jar
./opencsv-4.2.jar
./jetty-io-9.4.11.v20180605.jar
./config
./config/jetty-logging.properties
./config/log4j.properties
./httpclient-4.5.6.jar
./allure2-model-pojo-1.0.0.jar
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm just attempting a build and can see the build process depends on nodejs as well as yarn + it download tons of packages during this step. I'm not sure even where to being nixifying all these. Unless there is some tools like pypi2nix, I do not know even where to begin.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The build step ($ nix-shell -p gradle -p jdk -p nodejs --run './gradlew build'
) however succeed after all the downloads. I'm struggling with the $ nix-shell -p gradle -p jdk -p nodejs --run './gradlew release'
step now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems the release steps requires to operate on an actual git repository. I git init && git add . && git commit -m Init
and then $ nix-shell -p gradle -p jdk -p nodejs --run './gradlew release -Prelease.useAutomaticVersion=true -Prelease.releaseVersion=2.7.0 -Prelease.newVersion=2.7.0'
. The thing finished with success.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now, nothing looks like the finished *.tar.gz
content I packaged. Any idea?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Found it, you can list the tasks using gradle tasks
. Is is possible to generate a tarbar which seem pretty much identical to what I have as a source using $ nix-shell -p gradle -p jdk -p nodejs --run './gradlew distTar'
which ends under allure-commandline/build/distributions/allure-2.7.0.tgz
and there is an installDist
command as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now, there is the bunch of about 250 java packages which get downloaded to a ~/.gradle
cache:
# ...
Download https://jcenter.bintray.com/net/researchgate/gradle-release/2.6.0/gradle-release-2.6.0.pom
Download https://jcenter.bintray.com/com/jfrog/bintray/gradle/gradle-bintray-plugin/1.8.0/gradle-bintray-plugin-1.8.0.pom
Download https://jcenter.bintray.com/io/spring/gradle/dependency-management-plugin/1.0.5.RELEASE/dependency-management-plugin-1.0.5.RELEASE.pom
Download https://jcenter.bintray.com/ru/vyarus/gradle-quality-plugin/3.1.0/gradle-quality-plugin-3.1.0.pom
Download https://jcenter.bintray.com/com/bmuschko/gradle-docker-plugin/3.2.4/gradle-docker-plugin-3.2.4.pom
# ...
and the yarn package which are downloaded somewhere:
# ...
> Task :allure-generator:yarn
yarn install v0.24.6
[1/4] Resolving packages...
[2/4] Fetching packages...
warning fsevents@1.1.3: The platform "linux" is incompatible with this module.
info "fsevents@1.1.3" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
[4/4] Building fresh packages...
Done in 10.19s.
> Task :allure-generator:buildWeb
yarn run v0.24.6
$ webpack --optimize-minimize
Node#moveTo was deprecated. Use Container#append.
Hash: b014d3d4d9822dab681e
Version: webpack 3.11.0
Time: 15875ms
# ...
That seems like quite a lot of impurities to address, unless this can be automated. Any idea?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#17342 : Seems to be related to this (that is, if we really want to go with the sources approach).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The source approach would depends on a yet to be developed gradle2nix
tool. So for the time being, I believe the jar route is the way forward.
Are there any updates on this pull request, please? |
Thank you for your contributions.
|
Still important to me. |
|
||
#url = https://dl.bintray.com/qameta/generic/io/qameta/allure/allure/2.7.0/allure-2.7.0.tgz; | ||
{ lib, stdenv, makeWrapper, fetchurl, jre }: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#url = https://dl.bintray.com/qameta/generic/io/qameta/allure/allure/2.7.0/allure-2.7.0.tgz; | |
{ lib, stdenv, makeWrapper, fetchurl, jre }: | |
{ lib, stdenv, makeWrapper, fetchurl, jre }: |
stdenv.mkDerivation rec { | ||
version = "2.7.0"; | ||
pname = "allure"; | ||
name = "${pname}-${version}"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
name = "${pname}-${version}"; |
version = "2.7.0"; | ||
pname = "allure"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
version = "2.7.0"; | |
pname = "allure"; | |
pname = "allure"; | |
version = "2.7.0"; |
version = "2.7.0"; | ||
pname = "allure"; | ||
name = "${pname}-${version}"; | ||
share-app-dir = name; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is this?
meta = with lib; { | ||
homepage = "https://docs.qameta.io/allure/"; | ||
description = '' | ||
A flexible lightweight multi-language test report tool |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is to long for description.
No longer need this package. |
I'm interested in this. I don't think I'll be able to compile from source, I still think it's a valuable addition to nixpkgs. I do hope that someone with java experience can improve it down the line. Will have a go at it tomorrow. |
added in #165011 |
@happysalada : Excellent, happy you took it on you to update and test, this is effectively a nice piece of software. |
Motivation for this change
Missing package.
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)nix path-info -S
before and after)