Re: IntelliJ IDEA - Community Edition

2021-05-09 Thread Julien Lepiller
It looks like the ant script is simply calling gradle, which comes bundled most 
of the time, in the form of a gradlew script. Gradle is not yet packaged in 
guix, and there is no gradle-build-system yet, so it's going to be a very 
difficult journey. If you are motivated, I can provide help and guidance.

Note that Kotlin doesn't depend on Scala, but gradle does. Kotlin is written in 
Kotlin, and building it in a bootstrapped way remains an open problem.

I have a few pointers for Scala, Kotlin and Gradle if you're interested.

Le 9 mai 2021 15:27:00 GMT-04:00, "Björn Höfling" 
 a écrit :
>On Sun, 9 May 2021 15:00:32 -0400
>Raghav Gururajan  wrote:
>
>> Hello Guix,
>> 
>> I am trying to package IDEA, which is an IDE for JVM.
>> 
>> This is the first time I am dealing with java and ant-build-system.
>> 
>> I was able to do some tinkering to get the build phase started, but
>> it fails at the beginning with the following error:
>> "Exception in thread "main" java.lang.RuntimeException: Could not
>> create parent directory for lock file 
>>
>/.gradle/wrapper/dists/gradle-5.5-all/66q2j3qadt42ygj9lkubqor18/gradle-5.5-all.zip.lck".
>> 
>> I have attached the diff file with this email.
>> 
>> Thoughts?
>
>Not sure exactly what's the problem here. If you like to get more
>infos, you can also try to build it with ant options -verbose or
>-debug. Either in the Guix build or from the command line in a Guix
>Container.
>
>In any ways, IntelliJ will be hard to impossible to get it into Guix
>proper, because it will download many dependencies as binaries. You
>will first need to find out how to build them from source. It will use
>Kotlin, and Kotlin at some point will use Scala. Scala needs a
>Scala-compiler...
>
>Björn


Re: guix system docker-image: nix not found

2021-05-09 Thread stuebinm

On Sun, May 09, 2021 at 08:58:59PM +0200, stuebinm wrote:

When trying with dummy values (taken from my own system config),
`guix system docker-image system.scm` fails to build the
guix-docker-image.tar.gz.drv, and the build log contains

   /gnu/store/...bash-5.0.16/bin/bash: nix: command not found


It would help if you sent the entire log file as an attachment.


nevermind; I thought that /was/ the entire logfile, but it turns out 
that I had the emacs nix-mode installed, which recognised the logfile as 
a derivation and tried to call nix to parse it, and apparently its 
failure mode (since I don't have nix installed) was to write its own 
stderr into the buffer without giving any indication that wasn't the 
real content of the file …


The actual logfile is of the vm running out of memory, which is a known 
issue [1]; I'll look into how to solve that.


Sorry for the unnecessary message, but thanks anyways for responding :)

~stuebinm

[1] https://issues.guix.gnu.org/48178



OpenPGP_signature
Description: OpenPGP digital signature


Re: guix system docker-image: nix not found

2021-05-09 Thread Leo Famulari
On Sun, May 09, 2021 at 09:59:06PM +0200, stuebinm wrote:
> The actual logfile is of the vm running out of memory, which is a known
> issue [1]; I'll look into how to solve that.

Oh... we need to fix that. Sorry for the roadblock.



Re: guix system docker-image: nix not found

2021-05-09 Thread Leo Famulari
On Sun, May 09, 2021 at 08:58:59PM +0200, stuebinm wrote:
> When trying with dummy values (taken from my own system config),
> `guix system docker-image system.scm` fails to build the
> guix-docker-image.tar.gz.drv, and the build log contains
> 
>   /gnu/store/...bash-5.0.16/bin/bash: nix: command not found

It would help if you sent the entire log file as an attachment.



Re: IntelliJ IDEA - Community Edition

2021-05-09 Thread Björn Höfling
On Sun, 9 May 2021 15:00:32 -0400
Raghav Gururajan  wrote:

> Hello Guix,
> 
> I am trying to package IDEA, which is an IDE for JVM.
> 
> This is the first time I am dealing with java and ant-build-system.
> 
> I was able to do some tinkering to get the build phase started, but
> it fails at the beginning with the following error:
> "Exception in thread "main" java.lang.RuntimeException: Could not
> create parent directory for lock file 
> /.gradle/wrapper/dists/gradle-5.5-all/66q2j3qadt42ygj9lkubqor18/gradle-5.5-all.zip.lck".
> 
> I have attached the diff file with this email.
> 
> Thoughts?

Not sure exactly what's the problem here. If you like to get more
infos, you can also try to build it with ant options -verbose or
-debug. Either in the Guix build or from the command line in a Guix
Container.

In any ways, IntelliJ will be hard to impossible to get it into Guix
proper, because it will download many dependencies as binaries. You
will first need to find out how to build them from source. It will use
Kotlin, and Kotlin at some point will use Scala. Scala needs a
Scala-compiler...

Björn


pgphtxskDTeUY.pgp
Description: OpenPGP digital signature


guix system docker-image: nix not found

2021-05-09 Thread stuebinm

Hi all,

I've been playing around with docker containers and guix (both to 
package software, and to eventually fit "building guix packages" into a 
docker-based CI pipeline).


The guix manual mentions that apart from `guix pack`, `guix system` can 
also build docker images of whole system configs, which seemed fitting, 
but it lacks an example, and I'm a bit unclear on some points. In 
particular, I don't know what to set for the bootloader and file-systems 
options in the system config, as neither really applies to a docker 
container (I tried not setting them at all, but guix doesn't allow that).


When trying with dummy values (taken from my own system config),
`guix system docker-image system.scm` fails to build the
guix-docker-image.tar.gz.drv, and the build log contains

  /gnu/store/...bash-5.0.16/bin/bash: nix: command not found

which doesn't really help.

I'm on a current guix system, i.e. `guix describe` gives:

  guix 069399e
repository URL: https://git.savannah.gnu.org/git/guix.git
branch: master
commit: 069399ee9dbf75b7c89583f03346a63b2cfe4ac6

Thanks!

~stuebinm

[1] https://guix.gnu.org/manual/en/html_node/Invoking-guix-system.html



OpenPGP_signature
Description: OpenPGP digital signature


IntelliJ IDEA - Community Edition

2021-05-09 Thread Raghav Gururajan

Hello Guix,

I am trying to package IDEA, which is an IDE for JVM.

This is the first time I am dealing with java and ant-build-system.

I was able to do some tinkering to get the build phase started, but it 
fails at the beginning with the following error:
"Exception in thread "main" java.lang.RuntimeException: Could not create 
parent directory for lock file 
/.gradle/wrapper/dists/gradle-5.5-all/66q2j3qadt42ygj9lkubqor18/gradle-5.5-all.zip.lck".


I have attached the diff file with this email.

Thoughts?

Regards,
RG.
diff --git a/gnu/local.mk b/gnu/local.mk
index 37166bb2fc..7f6a9f9340 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -304,6 +304,7 @@ GNU_SYSTEM_MODULES =\
   %D%/packages/java-maths.scm			\
   %D%/packages/javascript.scm			\
   %D%/packages/jemalloc.scm			\
+  %D%/packages/jetbrains.scm \
   %D%/packages/jrnl.scm\
   %D%/packages/jose.scm\
   %D%/packages/julia.scm			\
diff --git a/gnu/packages/jetbrains.scm b/gnu/packages/jetbrains.scm
new file mode 100644
index 00..da86780406
--- /dev/null
+++ b/gnu/packages/jetbrains.scm
@@ -0,0 +1,65 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2021 Raghav Gururajan 
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix.  If not, see .
+
+(define-module (gnu packages jetbrains)
+  #:use-module (gnu packages)
+  #:use-module (gnu packages java)
+  #:use-module (gnu packages perl)
+  #:use-module (gnu packages python)
+  #:use-module (gnu packages ruby)
+  #:use-module ((guix licenses) #:prefix license:)
+  #:use-module (guix packages)
+  #:use-module (guix git-download)
+  #:use-module (guix build utils)
+  #:use-module (guix build-system ant))
+
+(define-public idea
+  (package
+(name "idea")
+(version "211.7142.45")
+(source
+ (origin
+   (method git-fetch)
+   (uri
+(git-reference
+ (url "https://github.com/JetBrains/intellij-community";)
+ (commit (string-append "idea/" version
+   (file-name
+(git-file-name name version))
+   (sha256
+(base32 "02y754c45pw1lr0x0pw459ng7s582c8yffpmmah66h4ipd95z5n0"
+(build-system ant-build-system)
+(arguments
+ `(#:jdk ,openjdk11
+   #:source-dir "."
+   #:build-target "build"
+   #:test-target "test"))
+(native-inputs
+ `(("perl" ,perl)
+   ("python" ,python-wrapper)
+   ("ruby" ,ruby)))
+(inputs
+ `())
+(propagated-inputs
+ `())
+(home-page "https://www.jetbrains.com/idea/";)
+(synopsis "Capable and Ergonomic IDE for JVM")
+(description "IDEA is an Integrated Development Environment (IDE) for JVM
+languages.  It does the routine and repetitive tasks for you by providing code
+completion, static code analysis, and refactorings.")
+(license license:asl2.0)))


OpenPGP_signature
Description: OpenPGP digital signature