unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: Martin Castillo <castilma@uni-bremen.de>
To: Gottfried <gottfried@posteo.de>
Cc: help-guix@gnu.org
Subject: Re: Help-Guix Digest, Vol 88, Issue 36
Date: Sun, 19 Mar 2023 16:06:09 +0100	[thread overview]
Message-ID: <67319315-bc3e-1b1b-ee08-7e72eb185bbd@uni-bremen.de> (raw)
In-Reply-To: <895e7b31-2df7-026b-1345-11e53dddfff9@posteo.de>

Hi,

Am 19.03.23 um 13:15 schrieb Gottfried:
> Hi,
> 
> thanks for trying...
> 
> I copied the
> "Commit 6a54715988aee884bbb5f81e1b718a27ff771ec4"
> into my musik.scm:
> ..................................................................
> ;; Manifest Musik Programme
> (use-modules (gnu packages music)
>               (guix packages))
> 
> (define musescore-3.6.2
>    (package
>      (inherit musescore)
>      (version "3.6.2")
>      (Commit 6a54715988aee884bbb5f81e1b718a27ff771ec4)))
> 
> ;; combine both manifest lists:
> (concatenate-manifests
>    (list
>      (packages->manifest (list musescore-3.6.2))
> (specifications->manifest '("ardour" "audacious" "audacity" "obs" "vlc"))))
> 
> .........................................................................
> and I had a go
> I got this message:
> 
> gfp@Tuxedo ~$ guix package -p /home/gfp/Projekte/Musik/guix-profil -m 
> /home/gfp/Projekte/Musik/musik.scm
> /home/gfp/Projekte/Musik/musik.scm:6:2: Fehler: (package (inherit 
> musescore) (version "3.6.2") (Commit 
> #{6a54715988aee884bbb5f81e1b718a27ff771ec4}#)): extraneous field 
> initializers (Commit)
> 
> .....................................................................
> So I have to add it somewhere else...

The commits I mentioned are from guix, not from the musescore project. 
You put it in the musescore definition, so guix downloaded musescore and 
tried to switch to that commit/version of musescore. But it is not a 
commit of musecore, so that is indeed the wrong place.

(And the (commit ) field belongs inside an (origin ) field...)

So my original suggestion was to copy the musescore package definition 
from one of those commits from the guix project
http://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/music.scm?id=6a54715988aee884bbb5f81e1b718a27ff771ec4#n4860

and hope that all dependencies of that package definition are still 
valid and compatible in the current guix. You might need to copy some of 
the use-modules lines at the top of the linked file into your manifest.

But I just had another idea: We want to install software from an older 
guix version: That's what guix time-machine is for!
guix time-machine --commit=6a54715988aee884bbb5f81e1b718a27ff771ec4 -- 
package -m manifest.scm -p /Pfad/zu/Musik/Musik
or to test it first:
guix time-machine --commit=6a54715988aee884bbb5f81e1b718a27ff771ec4 -- 
shell musescore

I tried it with the newer commit 
ced3be2b562866b82f97a530cd66610c84c381f7 to get musescore with newer 
dependencies. (That commit is the parent of 
9f93bcd1862c76d7ff30da6f712c9bd2912b8346, which changed to musescore 4.0.):
guix time-machine --commit=ced3be2b562866b82f97a530cd66610c84c381f7 -- 
shell musescore

The first time time-machine failed to build the older version of guix. 
It used up to much ram and was killed by the OOM-killer. (I'm using it 
inside a vm.) Otherwise it should work.

A downside of this approach is that you cannot mix the older musescore 
with the newer versions of vlc etc in the same profile.



Martin
> 
> kind regards
> 
> Gottfried
> 
> 
>> Date: Sat, 18 Mar 2023 13:44:08 +0100
>> From: Martin Castillo <castilma@uni-bremen.de>
>> To: help-guix@gnu.org
>> Subject: Re: creating a manifest
>> Message-ID: <a9fc4dc2-d1a1-4dc7-5da4-aa24837f2d21@uni-bremen.de>
>> Content-Type: text/plain; charset=UTF-8; format=flowed
>>
>> I noticed an error.
>>
>>>
>>> For that you need to instead create a new package definition for
>>> musescore version 3.6.2. The info page gives you an example, which you
>>> just adjust. Using guix edit musescore you see how musescore is defined.
>>> You can notice, there is a version field. So lets create a new package
>>> with adjusted version:
>>>
>>> (define musescore-3.6.2
>>>     (package
>>>       (inherit musescore)
>>>       (version "3.6.2")))
>>>
>>> ;; We create this manifest from a _package_, and not from a
>>> ;; _specification_ (which is just something like a string "musescore")
>>> (packages->manifest (list musescore-3.6.2))
>>>
>>
>> While building guix says it's downloading musescore-4.0.1. Maybe it
>> switches to the respective branch before building.
>>
>> I even tried explicitly writing the origin entry of
>> (define musescore-3.6.2
>>     (package
>>
>>       (inherit musescore)
>>
>>       (version "3.6.2")
>>       (source
>>        (origin
>>          (method git-fetch)
>>          (uri (git-reference
>>                (url "https://github.com/musescore/MuseScore")
>>                (commit (string-append "v" "3.6.2"))))
>>          (file-name (git-file-name "musescore" "3.6.2"))
>>          (sha256
>>           (base32 
>> "0x2aahpbvss3sjydcq6xdh198fmslgypixmd2gckfwjqzady662y"))
>>          (modules '((guix build utils)))
>>          (snippet
>>           '(begin
>>              ;; Remove unused libraries...
>>              (for-each delete-file-recursively
>>                        '("thirdparty/freetype"))
>>              ;; ... and precompiled binaries.
>>              (delete-file-recursively "src/diagnostics/crashpad_handler")
>>              (substitute* "src/diagnostics/CMakeLists.txt"
>>                (("install") "#install"))))))))
>>
>> guix shell -m manifest.scm still says 4.0.1 and executing mscore fails:
>> [env]$ mscore --version
>> QEventLoop: Cannot be used without QApplication
>> QEventLoop: Cannot be used without QApplication
>> qt.qpa.xcb: could not connect to display
>> qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even
>> though it was found.
>> This application failed to start because no Qt platform plugin could be
>> initialized. Reinstalling the application may fix this problem.
>>
>> Available platform plugins are: eglfs, linuxfb, minimal, minimalegl,
>> offscreen, vnc, xcb.
>>
>> Abgebrochen
>>
>> So seems like in this case it's not so easy. (Well the current guix
>> packaged version is 4.0.1 so a major version change happened.)
>>
>> One could try using the older package definition, which is available in
>> the git history of guix. Commit 6a54715988aee884bbb5f81e1b718a27ff771ec4
>> is the newest change to musescore with 3.6.2.
>> 9f93bcd1862c76d7ff30da6f712c9bd2912b8346 switched to 4.0. So it's parent
>> commit should have the newest dependencies which might work with current
>> guix.
>> I don't have time right now, but you might want to copy such an older
>> package definition into your manifest.scm
>>
>> Martin
> 


       reply	other threads:[~2023-03-19 15:06 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.3374.1679153302.28265.help-guix@gnu.org>
     [not found] ` <895e7b31-2df7-026b-1345-11e53dddfff9@posteo.de>
2023-03-19 15:06   ` Martin Castillo [this message]
2023-03-19 16:57     ` Help-Guix Digest, Vol 88, Issue 36 Gottfried
2023-03-19 18:25       ` Martin Castillo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=67319315-bc3e-1b1b-ee08-7e72eb185bbd@uni-bremen.de \
    --to=castilma@uni-bremen.de \
    --cc=gottfried@posteo.de \
    --cc=help-guix@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).