nix: data in nix/deps/gradle should be JSON
Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
parent
6746b7d932
commit
5607540ac1
|
@ -3,11 +3,11 @@
|
|||
let
|
||||
inherit (lib)
|
||||
removeSuffix optionalString splitString concatMapStrings
|
||||
attrByPath attrValues last makeOverridable;
|
||||
attrByPath attrValues last makeOverridable importJSON;
|
||||
|
||||
inherit (pkgs) aapt2;
|
||||
|
||||
deps = import ./deps.nix;
|
||||
deps = importJSON ./deps.json;
|
||||
|
||||
# some .jar files have an `-aot` suffix that doesn't work for .pom files
|
||||
getPOM = jarUrl: "${removeSuffix "-aot" jarUrl}.pom";
|
||||
|
@ -53,7 +53,7 @@ let
|
|||
echo "${jar.sha1}" > "${dep.path}.${dep.type}.sha1"
|
||||
''}
|
||||
'')
|
||||
(attrValues deps)));
|
||||
deps));
|
||||
|
||||
in makeOverridable stdenv.mkDerivation {
|
||||
name = "status-react-maven-deps";
|
||||
|
|
File diff suppressed because it is too large
Load Diff
27063
nix/deps/gradle/deps.nix
27063
nix/deps/gradle/deps.nix
File diff suppressed because it is too large
Load Diff
|
@ -478,7 +478,6 @@ https://repo.maven.apache.org/maven2/com/googlecode/jmockit/jmockit/1.6/jmockit-
|
|||
https://repo.maven.apache.org/maven2/com/googlecode/json-simple/json-simple/1.1/json-simple-1.1
|
||||
https://repo.maven.apache.org/maven2/com/googlecode/juniversalchardet/juniversalchardet/1.0.3/juniversalchardet-1.0.3
|
||||
https://repo.maven.apache.org/maven2/com/googlecode/maven-download-plugin/download-maven-plugin/1.2.0/download-maven-plugin-1.2.0
|
||||
https://repo.maven.apache.org/maven2/com/google/android/android/4.1.1.4/android-4.1.1.4
|
||||
https://repo.maven.apache.org/maven2/com/google/auto/auto-common/0.3/auto-common-0.3
|
||||
https://repo.maven.apache.org/maven2/com/google/auto/auto-parent/2/auto-parent-2
|
||||
https://repo.maven.apache.org/maven2/com/google/auto/auto-parent/3/auto-parent-3
|
||||
|
@ -588,9 +587,6 @@ https://repo.maven.apache.org/maven2/com/simpligility/maven/plugins/android-mave
|
|||
https://repo.maven.apache.org/maven2/com/simpligility/maven/progressive-organization-pom/6.0.0/progressive-organization-pom-6.0.0
|
||||
https://repo.maven.apache.org/maven2/com/squareup/javapoet/1.8.0/javapoet-1.8.0
|
||||
https://repo.maven.apache.org/maven2/com/squareup/javawriter/2.5.0/javawriter-2.5.0
|
||||
https://repo.maven.apache.org/maven2/com/squareup/okhttp3/mockwebserver/3.12.1/mockwebserver-3.12.1
|
||||
https://repo.maven.apache.org/maven2/com/squareup/okhttp3/okhttp-testing-support/3.12.1/okhttp-testing-support-3.12.1
|
||||
https://repo.maven.apache.org/maven2/com/squareup/okhttp3/okhttp-tls/3.12.1/okhttp-tls-3.12.1
|
||||
https://repo.maven.apache.org/maven2/com/squareup/okhttp3/okhttp-urlconnection/3.12.1/okhttp-urlconnection-3.12.1
|
||||
https://repo.maven.apache.org/maven2/com/squareup/okhttp3/okhttp/3.12.1/okhttp-3.12.1
|
||||
https://repo.maven.apache.org/maven2/com/squareup/okhttp3/okhttp/3.14.1/okhttp-3.14.1
|
||||
|
@ -803,7 +799,6 @@ https://repo.maven.apache.org/maven2/org/apache/felix/maven-bundle-plugin/4.1.0/
|
|||
https://repo.maven.apache.org/maven2/org/apache/felix/maven-bundle-plugin/4.2.1/maven-bundle-plugin-4.2.1
|
||||
https://repo.maven.apache.org/maven2/org/apache/felix/org.apache.felix.bundlerepository/1.6.6/org.apache.felix.bundlerepository-1.6.6
|
||||
https://repo.maven.apache.org/maven2/org/apache/felix/org.apache.felix.utils/1.6.0/org.apache.felix.utils-1.6.0
|
||||
https://repo.maven.apache.org/maven2/org/apache/httpcomponents/httpclient/4.0.1/httpclient-4.0.1
|
||||
https://repo.maven.apache.org/maven2/org/apache/httpcomponents/httpclient/4.0.2/httpclient-4.0.2
|
||||
https://repo.maven.apache.org/maven2/org/apache/httpcomponents/httpclient/4.1.1/httpclient-4.1.1
|
||||
https://repo.maven.apache.org/maven2/org/apache/httpcomponents/httpclient/4.1.3/httpclient-4.1.3
|
||||
|
@ -812,7 +807,6 @@ https://repo.maven.apache.org/maven2/org/apache/httpcomponents/httpclient/4.3.5/
|
|||
https://repo.maven.apache.org/maven2/org/apache/httpcomponents/httpclient/4.5.2/httpclient-4.5.2
|
||||
https://repo.maven.apache.org/maven2/org/apache/httpcomponents/httpclient/4.5.3/httpclient-4.5.3
|
||||
https://repo.maven.apache.org/maven2/org/apache/httpcomponents/httpclient/4.5.6/httpclient-4.5.6
|
||||
https://repo.maven.apache.org/maven2/org/apache/httpcomponents/httpcomponents-client/4.0.1/httpcomponents-client-4.0.1
|
||||
https://repo.maven.apache.org/maven2/org/apache/httpcomponents/httpcomponents-client/4.0.2/httpcomponents-client-4.0.2
|
||||
https://repo.maven.apache.org/maven2/org/apache/httpcomponents/httpcomponents-client/4.1.1/httpcomponents-client-4.1.1
|
||||
https://repo.maven.apache.org/maven2/org/apache/httpcomponents/httpcomponents-client/4.1.3/httpcomponents-client-4.1.3
|
||||
|
@ -1167,7 +1161,6 @@ https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-javadoc-plug
|
|||
https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-javadoc-plugin/2.10/maven-javadoc-plugin-2.10
|
||||
https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-javadoc-plugin/3.0.0-M1/maven-javadoc-plugin-3.0.0-M1
|
||||
https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-javadoc-plugin/3.0.0/maven-javadoc-plugin-3.0.0
|
||||
https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-javadoc-plugin/3.0.1/maven-javadoc-plugin-3.0.1
|
||||
https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-javadoc-plugin/3.2.0/maven-javadoc-plugin-3.2.0
|
||||
https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-plugins/1/maven-plugins-1
|
||||
https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-plugins/3/maven-plugins-3
|
||||
|
@ -1251,7 +1244,6 @@ https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-surefire-plu
|
|||
https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-surefire-plugin/2.20.1/maven-surefire-plugin-2.20.1
|
||||
https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-surefire-plugin/2.21.0/maven-surefire-plugin-2.21.0
|
||||
https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-surefire-plugin/2.22.0/maven-surefire-plugin-2.22.0
|
||||
https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-surefire-plugin/2.22.1/maven-surefire-plugin-2.22.1
|
||||
https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-surefire-plugin/3.0.0-M3/maven-surefire-plugin-3.0.0-M3
|
||||
https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-surefire-plugin/3.0.0-M4/maven-surefire-plugin-3.0.0-M4
|
||||
https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-war-plugin/3.2.1/maven-war-plugin-3.2.1
|
||||
|
@ -1357,7 +1349,6 @@ https://repo.maven.apache.org/maven2/org/apache/maven/surefire/surefire/2.19.1/s
|
|||
https://repo.maven.apache.org/maven2/org/apache/maven/surefire/surefire/2.20.1/surefire-2.20.1
|
||||
https://repo.maven.apache.org/maven2/org/apache/maven/surefire/surefire/2.21.0/surefire-2.21.0
|
||||
https://repo.maven.apache.org/maven2/org/apache/maven/surefire/surefire/2.22.0/surefire-2.22.0
|
||||
https://repo.maven.apache.org/maven2/org/apache/maven/surefire/surefire/2.22.1/surefire-2.22.1
|
||||
https://repo.maven.apache.org/maven2/org/apache/maven/surefire/surefire/3.0.0-M3/surefire-3.0.0-M3
|
||||
https://repo.maven.apache.org/maven2/org/apache/maven/surefire/surefire/3.0.0-M4/surefire-3.0.0-M4
|
||||
https://repo.maven.apache.org/maven2/org/apache/maven/wagon/wagon-http-shared/2.7/wagon-http-shared-2.7
|
||||
|
@ -1425,20 +1416,17 @@ https://repo.maven.apache.org/maven2/org/codehaus/jackson/jackson-xc/1.9.2/jacks
|
|||
https://repo.maven.apache.org/maven2/org/codehaus/jsr166-mirror/jsr166y/1.7.0/jsr166y-1.7.0
|
||||
https://repo.maven.apache.org/maven2/org/codehaus/mojo/animal-sniffer-annotations/1.10/animal-sniffer-annotations-1.10
|
||||
https://repo.maven.apache.org/maven2/org/codehaus/mojo/animal-sniffer-annotations/1.14/animal-sniffer-annotations-1.14
|
||||
https://repo.maven.apache.org/maven2/org/codehaus/mojo/animal-sniffer-annotations/1.15/animal-sniffer-annotations-1.15
|
||||
https://repo.maven.apache.org/maven2/org/codehaus/mojo/animal-sniffer-annotations/1.17/animal-sniffer-annotations-1.17
|
||||
https://repo.maven.apache.org/maven2/org/codehaus/mojo/animal-sniffer-maven-plugin/1.10/animal-sniffer-maven-plugin-1.10
|
||||
https://repo.maven.apache.org/maven2/org/codehaus/mojo/animal-sniffer-maven-plugin/1.11/animal-sniffer-maven-plugin-1.11
|
||||
https://repo.maven.apache.org/maven2/org/codehaus/mojo/animal-sniffer-maven-plugin/1.13/animal-sniffer-maven-plugin-1.13
|
||||
https://repo.maven.apache.org/maven2/org/codehaus/mojo/animal-sniffer-maven-plugin/1.14/animal-sniffer-maven-plugin-1.14
|
||||
https://repo.maven.apache.org/maven2/org/codehaus/mojo/animal-sniffer-maven-plugin/1.15/animal-sniffer-maven-plugin-1.15
|
||||
https://repo.maven.apache.org/maven2/org/codehaus/mojo/animal-sniffer-maven-plugin/1.16/animal-sniffer-maven-plugin-1.16
|
||||
https://repo.maven.apache.org/maven2/org/codehaus/mojo/animal-sniffer-maven-plugin/1.17/animal-sniffer-maven-plugin-1.17
|
||||
https://repo.maven.apache.org/maven2/org/codehaus/mojo/animal-sniffer-parent/1.10/animal-sniffer-parent-1.10
|
||||
https://repo.maven.apache.org/maven2/org/codehaus/mojo/animal-sniffer-parent/1.11/animal-sniffer-parent-1.11
|
||||
https://repo.maven.apache.org/maven2/org/codehaus/mojo/animal-sniffer-parent/1.13/animal-sniffer-parent-1.13
|
||||
https://repo.maven.apache.org/maven2/org/codehaus/mojo/animal-sniffer-parent/1.14/animal-sniffer-parent-1.14
|
||||
https://repo.maven.apache.org/maven2/org/codehaus/mojo/animal-sniffer-parent/1.15/animal-sniffer-parent-1.15
|
||||
https://repo.maven.apache.org/maven2/org/codehaus/mojo/animal-sniffer-parent/1.16/animal-sniffer-parent-1.16
|
||||
https://repo.maven.apache.org/maven2/org/codehaus/mojo/animal-sniffer-parent/1.17/animal-sniffer-parent-1.17
|
||||
https://repo.maven.apache.org/maven2/org/codehaus/mojo/buildnumber-maven-plugin/1.0/buildnumber-maven-plugin-1.0
|
||||
|
@ -1474,7 +1462,6 @@ https://repo.maven.apache.org/maven2/org/codehaus/mojo/mojo-parent/38/mojo-paren
|
|||
https://repo.maven.apache.org/maven2/org/codehaus/mojo/mojo-parent/40/mojo-parent-40
|
||||
https://repo.maven.apache.org/maven2/org/codehaus/mojo/mojo/7/mojo-7
|
||||
https://repo.maven.apache.org/maven2/org/codehaus/mojo/mojo/17/mojo-17
|
||||
https://repo.maven.apache.org/maven2/org/codehaus/mojo/templating-maven-plugin/1.0-alpha-3/templating-maven-plugin-1.0-alpha-3
|
||||
https://repo.maven.apache.org/maven2/org/codehaus/mojo/templating-maven-plugin/1.0.0/templating-maven-plugin-1.0.0
|
||||
https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-archiver/1.0-alpha-7/plexus-archiver-1.0-alpha-7
|
||||
https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-archiver/1.0-alpha-12/plexus-archiver-1.0-alpha-12
|
||||
|
@ -1588,8 +1575,6 @@ https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus/3.3/plexus-3.3
|
|||
https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus/4.0/plexus-4.0
|
||||
https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus/5.0/plexus-5.0
|
||||
https://repo.maven.apache.org/maven2/org/conscrypt/conscrypt-android/2.0.0/conscrypt-android-2.0.0
|
||||
https://repo.maven.apache.org/maven2/org/conscrypt/conscrypt-openjdk-uber/1.4.0/conscrypt-openjdk-uber-1.4.0
|
||||
https://repo.maven.apache.org/maven2/org/conscrypt/conscrypt-openjdk-uber/2.0.0/conscrypt-openjdk-uber-2.0.0
|
||||
https://repo.maven.apache.org/maven2/org/easymock/easymockclassextension/2.2.1/easymockclassextension-2.2.1
|
||||
https://repo.maven.apache.org/maven2/org/easymock/easymock-parent/3.2/easymock-parent-3.2
|
||||
https://repo.maven.apache.org/maven2/org/easymock/easymock-parent/3.3/easymock-parent-3.3
|
||||
|
@ -1716,7 +1701,6 @@ https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-test/1.2.71/kot
|
|||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-test/1.3.20/kotlin-test-1.3.20
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-test/1.3.50/kotlin-test-1.3.50
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-util-io/1.3.50/kotlin-util-io-1.3.50
|
||||
https://repo.maven.apache.org/maven2/org/json/json/20080701/json-20080701
|
||||
https://repo.maven.apache.org/maven2/org/jsoup/jsoup/1.6.3/jsoup-1.6.3
|
||||
https://repo.maven.apache.org/maven2/org/jsoup/jsoup/1.7.2/jsoup-1.7.2
|
||||
https://repo.maven.apache.org/maven2/org/junit-pioneer/junit-pioneer/0.3.0/junit-pioneer-0.3.0
|
||||
|
@ -1738,7 +1722,6 @@ https://repo.maven.apache.org/maven2/org/junit/platform/junit-platform-suite-api
|
|||
https://repo.maven.apache.org/maven2/org/junit/vintage/junit-vintage-engine/5.2.0/junit-vintage-engine-5.2.0
|
||||
https://repo.maven.apache.org/maven2/org/jvnet/staxex/stax-ex/1.7.7/stax-ex-1.7.7
|
||||
https://repo.maven.apache.org/maven2/org/kathrynhuxtable/maven/wagon/wagon-gitsite/0.3.1/wagon-gitsite-0.3.1
|
||||
https://repo.maven.apache.org/maven2/org/khronos/opengl-api/gl1.1-android-2.1_r1/opengl-api-gl1.1-android-2.1_r1
|
||||
https://repo.maven.apache.org/maven2/org/littleshoot/littleproxy/1.1.0-beta2/littleproxy-1.1.0-beta2
|
||||
https://repo.maven.apache.org/maven2/org/mockito/mockito-core/1.8.5/mockito-core-1.8.5
|
||||
https://repo.maven.apache.org/maven2/org/mockito/mockito-core/1.10.16/mockito-core-1.10.16
|
||||
|
@ -1936,11 +1919,9 @@ https://repo.maven.apache.org/maven2/xalan/serializer/2.7.2/serializer-2.7.2
|
|||
https://repo.maven.apache.org/maven2/xalan/xalan/2.7.2/xalan-2.7.2
|
||||
https://repo.maven.apache.org/maven2/xerces/xercesImpl/2.9.1/xercesImpl-2.9.1
|
||||
https://repo.maven.apache.org/maven2/xerces/xercesImpl/2.11.0/xercesImpl-2.11.0
|
||||
https://repo.maven.apache.org/maven2/xerces/xmlParserAPIs/2.6.2/xmlParserAPIs-2.6.2
|
||||
https://repo.maven.apache.org/maven2/xmlpull/xmlpull/1.1.3.1/xmlpull-1.1.3.1
|
||||
https://repo.maven.apache.org/maven2/xml-apis/xml-apis/1.0.b2/xml-apis-1.0.b2
|
||||
https://repo.maven.apache.org/maven2/xml-apis/xml-apis/1.3.04/xml-apis-1.3.04
|
||||
https://repo.maven.apache.org/maven2/xml-apis/xml-apis/1.4.01/xml-apis-1.4.01
|
||||
https://repo.maven.apache.org/maven2/xml-apis/xml-apis/2.0.2/xml-apis-2.0.2
|
||||
https://repo.maven.apache.org/maven2/xpp3/xpp3/1.1.4c/xpp3-1.1.4c
|
||||
https://repo.maven.apache.org/maven2/xpp3/xpp3_min/1.1.4c/xpp3_min-1.1.4c
|
||||
|
|
|
@ -17,7 +17,7 @@ source "${GIT_ROOT}/scripts/colors.sh"
|
|||
PROJ_LIST="${CUR_DIR}/proj.list"
|
||||
DEPS_LIST="${CUR_DIR}/deps.list"
|
||||
DEPS_URLS="${CUR_DIR}/deps.urls"
|
||||
DEPS_NIX="${CUR_DIR}/deps.nix"
|
||||
DEPS_JSON="${CUR_DIR}/deps.json"
|
||||
|
||||
# Raise limit of file descriptors
|
||||
ulimit -n 16384
|
||||
|
@ -65,17 +65,20 @@ parallel --will-cite \
|
|||
echo -e "\033[2KFound ${GRN}$(wc -l < ${DEPS_URLS})${RST} dependency URLs..."
|
||||
|
||||
# Open the Nix attribute set --------------------------------------------------
|
||||
echo -e "# Generated by ${THIS_SCRIPT}\n{" > ${DEPS_NIX}
|
||||
echo -n "[" > ${DEPS_JSON}
|
||||
|
||||
# Format URLs into a Nix consumable file.
|
||||
URLS=$(cat ${DEPS_URLS})
|
||||
parallel --will-cite --keep-order \
|
||||
"${CUR_DIR}/url2nix.sh" \
|
||||
"${CUR_DIR}/url2json.sh" \
|
||||
::: ${URLS} \
|
||||
>> ${DEPS_NIX}
|
||||
>> ${DEPS_JSON}
|
||||
|
||||
# Drop tailing comma on last object, stupid JSON
|
||||
sed -i '$ s/},/}/' ${DEPS_JSON}
|
||||
|
||||
# Close the Nix attribute set
|
||||
echo "}" >> ${DEPS_NIX}
|
||||
echo "]" >> ${DEPS_JSON}
|
||||
|
||||
echo -e "\033[2KGenerated Nix deps file: ${DEPS_NIX}"
|
||||
echo -e "\033[2KGenerated Nix deps file: ${DEPS_JSON}"
|
||||
echo -e "${GRN}Done${RST}"
|
||||
|
|
|
@ -15,17 +15,9 @@ function nix_fetch() {
|
|||
nix-prefetch-url --print-path --type sha256 "${1}" 2>/dev/null
|
||||
}
|
||||
|
||||
function get_nix_path() {
|
||||
nix_fetch "${1}" | tail -n1
|
||||
}
|
||||
|
||||
function get_nix_sha() {
|
||||
nix_fetch "${1}" | head -n1
|
||||
}
|
||||
|
||||
function get_sha1() {
|
||||
sha1sum "${1}" | cut -d' ' -f1
|
||||
}
|
||||
function get_nix_path() { echo "${1}" | tail -n1; }
|
||||
function get_nix_sha() { echo "${1}" | head -n1; }
|
||||
function get_sha1() { sha1sum "${1}" | cut -d' ' -f1; }
|
||||
|
||||
# Assumes REPOS from repos.sh is available
|
||||
function match_repo_url() {
|
||||
|
@ -56,52 +48,54 @@ fi
|
|||
# Get the relative path without full URL
|
||||
OBJ_REL_NAME="${OBJ_REL_URL#${REPO_URL}/}"
|
||||
|
||||
OBJ_NIX_FETCH_OUT=$(nix_fetch "${OBJ_REL_URL}.jar")
|
||||
# Dependency might be a JAR or an AAR
|
||||
if nix_fetch "${OBJ_REL_URL}.jar" &>/dev/null; then
|
||||
if [[ ${?} -eq 0 ]]; then
|
||||
# Some deps have only a POM, nor JAR or AAR
|
||||
OBJ_TYPE="jar"
|
||||
elif nix_fetch "${OBJ_REL_URL}.aar" &>/dev/null; then
|
||||
OBJ_TYPE="aar"
|
||||
else
|
||||
OBJ_TYPE="pom"
|
||||
fi
|
||||
|
||||
# Some deps have only a POM, nor JAR or AAR
|
||||
if [[ "${OBJ_TYPE}" != "pom" ]]; then
|
||||
OBJ_PATH=$(get_nix_path "${OBJ_REL_URL}.${OBJ_TYPE}")
|
||||
OBJ_SHA256=$(get_nix_sha "${OBJ_REL_URL}.${OBJ_TYPE}")
|
||||
OBJ_PATH=$(get_nix_path "${OBJ_NIX_FETCH_OUT}")
|
||||
OBJ_SHA256=$(get_nix_sha "${OBJ_NIX_FETCH_OUT}")
|
||||
OBJ_SHA1=$(get_sha1 "${OBJ_PATH}")
|
||||
else
|
||||
OBJ_NIX_FETCH_OUT=$(nix_fetch "${OBJ_REL_URL}.aar")
|
||||
if [[ ${?} -eq 0 ]]; then
|
||||
OBJ_TYPE="aar"
|
||||
OBJ_PATH=$(get_nix_path "${OBJ_NIX_FETCH_OUT}")
|
||||
OBJ_SHA256=$(get_nix_sha "${OBJ_NIX_FETCH_OUT}")
|
||||
OBJ_SHA1=$(get_sha1 "${OBJ_PATH}")
|
||||
else
|
||||
OBJ_TYPE="pom"
|
||||
fi
|
||||
fi
|
||||
|
||||
POM_PATH=$(get_nix_path "${OBJ_REL_URL}.pom")
|
||||
# Both JARs and AARs have a POM
|
||||
POM_NIX_FETCH_OUT=$(nix_fetch "${OBJ_REL_URL}.pom")
|
||||
POM_PATH=$(get_nix_path "${POM_NIX_FETCH_OUT}")
|
||||
if [[ -z "${POM_PATH}" ]]; then
|
||||
echo " ! Failed to fetch: ${OBJ_REL_URL}.pom" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
POM_SHA256=$(get_nix_sha "${OBJ_REL_URL}.pom")
|
||||
POM_SHA256=$(get_nix_sha "${POM_NIX_FETCH_OUT}")
|
||||
POM_SHA1=$(get_sha1 "${POM_PATH}")
|
||||
|
||||
# Format into a Nix attrset entry
|
||||
echo -n "
|
||||
\"${OBJ_REL_NAME}\" =
|
||||
echo -ne "
|
||||
{
|
||||
host = \"${REPO_URL}\";
|
||||
path = \"${OBJ_REL_NAME}\";
|
||||
type = \"${OBJ_TYPE}\";"
|
||||
\"path\": \"${OBJ_REL_NAME}\",
|
||||
\"host\": \"${REPO_URL}\",
|
||||
\"type\": \"${OBJ_TYPE}\","
|
||||
if [[ -n "${POM_SHA256}" ]]; then
|
||||
echo -n "
|
||||
pom = {
|
||||
sha1 = \"${POM_SHA1}\";
|
||||
sha256 = \"${POM_SHA256}\";
|
||||
};"
|
||||
\"pom\": {
|
||||
\"sha1\": \"${POM_SHA1}\",
|
||||
\"sha256\": \"${POM_SHA256}\"
|
||||
}";[[ -n "${OBJ_SHA256}" ]] && echo -n ","
|
||||
fi
|
||||
if [[ -n "${OBJ_SHA256}" ]]; then
|
||||
echo -n "
|
||||
jar = {
|
||||
sha1 = \"${OBJ_SHA1}\";
|
||||
sha256 = \"${OBJ_SHA256}\";
|
||||
};"
|
||||
\"jar\": {
|
||||
\"sha1\": \"${OBJ_SHA1}\",
|
||||
\"sha256\": \"${OBJ_SHA256}\"
|
||||
}"
|
||||
fi
|
||||
echo -n "
|
||||
};
|
||||
"
|
||||
echo -e "\n },"
|
Loading…
Reference in New Issue