Hello Björn, Björn Höfling ezt írta (időpont: 2019. ápr. 15., H 8:03): > Hi Guix, > > I have a problem combining ".jar" sources with patches. > > Here is my sources definition: > > (define-public java-ecj > (package (inherit java-ecj-3) > (version "4.6.3") > (source (origin > (method url-fetch) > (uri (string-append " > http://archive.eclipse.org/eclipse/downloads/drops4/R-" > version > "-201703010400/ecjsrc-" > version > ".jar")) > (patches > (search-patches > "java-ecj-buildxml-fix-manifest.patch" > "java-ecj-include-props.patch")) > (sha256 > (base32 > > "11cfgsdgznja1pvlxkjbqykxd7pcd5655vkm7s44xmahmap15gpl")))) > [...] > > This worked pretty well until I added the patches: > > ./pre-inst-env guix build java-ecj -K > ;;; note: source file /home/bjoern/guix/wt/qt/gnu/packages/java.scm > ;;; newer than compiled /home/bjoern/guix/wt/qt/gnu/packages/java.go > building > /gnu/store/wppz7bix1r4mhddjz6k4alfnxkm919gq-ecjsrc-4.6.3.tar.xz.drv... > /gnu/store/bl3pxxj6frg0dww8pj5dvh2d1akwvj47-tar-1.30/bin/tar: This does > not look like a tar archive > /gnu/store/bl3pxxj6frg0dww8pj5dvh2d1akwvj47-tar-1.30/bin/tar: Skipping to > next header > /gnu/store/bl3pxxj6frg0dww8pj5dvh2d1akwvj47-tar-1.30/bin/tar: Exiting with > failure status due to previous errors > Backtrace: > 2 (primitive-load "/gnu/store/lg0dlhwf4mfz82697bvfdwi7d86?") > In ice-9/eval.scm: > 619:8 1 (_ #f) > In guix/build/utils.scm: > 616:6 0 (invoke _ . _) > > guix/build/utils.scm:616:6: In procedure invoke: > Throw to key `srfi-34' with args `(# "/gnu/store/bl3pxxj6frg0dww8pj5dvh2d1akwvj47-tar-1.30/bin/tar" arguments: > ("xvf" "/gnu/store/1vf8lxrnkgxw0zl8i2m8rf7jxcjg9f5b-ecjsrc-4.6.3.jar") > exit-status: 2 term-signal: #f stop-signal: #f] 56dd40>)'. > note: keeping build directory `/tmp/guix-build-ecjsrc-4.6.3.tar.xz.drv-1' > builder for > `/gnu/store/wppz7bix1r4mhddjz6k4alfnxkm919gq-ecjsrc-4.6.3.tar.xz.drv' > failed with exit code 1 > build of > /gnu/store/wppz7bix1r4mhddjz6k4alfnxkm919gq-ecjsrc-4.6.3.tar.xz.drv failed > > > It looks like guix now wants to extract the jar-sources with "tar", no > longer with "jar". How can I tell Guix this is a jar-file to extract > from? Do I need to do that manually in a snippet? Any examples? > I have not actually done this, as jar files are usually not sources. Do we have the source this file was generated from? Also what we do in the build system is use zip and unzip for extracting jar files. > > Thanks, > > Björn > Best regards, g_bor >