bug#50597: different fixed-output when using ’--with-source’ transformation

2021-10-13 Thread zimoun
Hi,

On Wed, 22 Sep 2021 at 12:25, Ludovic Courtès  wrote:

> However it’s not enough to get the same derivation: we’d also need
>  to return a fixed-output derivation rather than a
> plain store file name.  (See also
> .)

Thanks for the explanations and the pointer.  Indeed, to be continued…


> diff --git a/guix/transformations.scm b/guix/transformations.scm
> index 5ae1977cb2..e0f5579c28 100644
> --- a/guix/transformations.scm
> +++ b/guix/transformations.scm
> @@ -46,6 +46,7 @@
>#:use-module (srfi srfi-37)
>#:use-module (ice-9 match)
>#:use-module (ice-9 vlist)
> +  #:autoload   (web uri) (string->uri uri-scheme uri-path)
>#:export (options->transformation
>  manifest-entry-with-transformations
>  
> @@ -106,15 +107,25 @@ extensions."
>  (define* (package-with-source p uri #:optional version)
>"Return a package based on P but with its source taken from URI.  Extract
>  the new package's version number from URI."
> -  (let ((base (tarball-base-name (basename uri
> +  (let ((base (tarball-base-name (basename uri)))
> +(file (match (string->uri uri)
> +(#f uri)
> +(uri (and (eq? 'file (uri-scheme uri))
> +  (uri-path uri))
>  (let-values (((_ version*)
>(hyphen-package-name->name+version base)))
>(package (inherit p)
> (version (or version version*
>  (package-version p)))
>  
> -   ;; Use #:recursive? #t to allow for directories.
> -   (source (downloaded-file uri #t))
> +   ;; Default to #:recursive? #f to match what 'url-fetch' does,
> +   ;; but use #t when URI denotes a directory.
> +   (source (let ((recursive?
> +  (and file
> +   (match (stat file #f)
> + (#f #t)
> + (st (eq? 'directory (stat:type st)))
> + (downloaded-file uri recursive?)))

LGTM!

Cheers,
simon





bug#51170: tlp fullcharge

2021-10-13 Thread Nicolas Goaziou
Hello,

Attila Lendvai  writes:

> as of latest master, tlp fails for me with this error message:
>
> # tlp fullcharge
> /gnu/store/68mpiffl51mcrss7zy26dnqfx3d5v2vv-tlp-1.4.0/share/tlp/tlp-func-base:
>  line 528: /usr/share/tlp/bat.d/[0-9][0-9]*[a-z]: No such file or directory
>
> this used to work not so long ago.

This was fixed in commit e7b899008c34c3d420b2017b8d41e13b33d5a93c
applied on October, 8th. I cannot reproduce it.

You may not be running a recent enough guix. Could you double-check the
output of "guix describe"?

Regards,
-- 
Nicolas Goaziou





bug#51183: lagrange: fribidi and harfbuzz dependencies?

2021-10-13 Thread Christopher Howard
Hi, I like the lagrange gemini client, but I have struggled with some
font display issues since I do a publishing with mixed English and
Hebrew words. Lagrange does display Hebrew unicode characters, if you
switch to the selectable "Tinos" font in the preferences, but on my
system, the Hebrew script is displayed in the wrong direction (left-to-
right, instead of right-to-left).

According to the Lagrange github README, Lagrange should be able to
utilize the fribidi and harfbuzz software to properly display these
sorts of scripts, but it does not seem to be doing this in Guix, even
though these packages are available.

I attempted running lagrange inside "guix environment --ad-hoc fribidi
harfbuzz" but the scripts are still displaying backwards, suggesting
that something needs to be modified in the package definition itself to
utilize this software.

Here is a simple gemini test page (contain just a single Hebrew word):

gemini://gem.librehacker.com/gemlog/your-word/test.gmi

On my system, it displays the letters as "bet resh alef" from left to
right, rather than from right to left.

https://en.wikipedia.org/wiki/Hebrew_alphabet#Alphabet

-- 
Christopher Howard
Gemini capsule: gemini://gem.librehacker.com
Web version: https://portal.mozz.us/gemini/gem.librehacker.com







bug#51183: lagrange: fribidi and harfbuzz dependencies?

2021-10-13 Thread Liliana Marie Prikler
Hi,

Am Mittwoch, den 13.10.2021, 07:22 -0800 schrieb Christopher Howard:
> [...]
> 
> According to the Lagrange github README, Lagrange should be able to
> utilize the fribidi and harfbuzz software to properly display these
> sorts of scripts, but it does not seem to be doing this in Guix, even
> though these packages are available.
> 
> I attempted running lagrange inside "guix environment --ad-hoc
> fribidi harfbuzz" 
That's not how any of this works.  Even if Lagrange were to mystically
pick up packages from your environment, which more likely than not it
doesn't, you would still have to include it in said environment for it
to make a difference.

> but the scripts are still displaying backwards, suggesting that
> something needs to be modified in the package definition itself to
> utilize this software.
I suggest trying a variant of lagrange that has harfbuzz to verify that
it indeed does make a difference.  You can construct one by editing
Guix source or by using the following with the right (use-modules ...)
clause on top:

(package
  (inherit lagrange)
  (inputs 
   `(("harfbuzz" ,harfbuzz)
 ,@(package-inputs lagrange

Alternatively, someone else might try given the file you've provided,
just putting this out there if you want to experiment on your own :)

Regards,
Liliana






bug#51183: lagrange: fribidi and harfbuzz dependencies?

2021-10-13 Thread Christopher Howard
Hello, the following did NOT work:

```
(use-modules (guix packages))
(use-modules (gnu packages web-browsers))
(use-modules (gnu packages gtk))
(use-modules (gnu packages fribidi))

(packages->manifest
 (list
  (package
   (inherit lagrange)
   (inputs 
`(("harfbuzz" ,harfbuzz)
  ("fribidi" , fribidi)
  ,@(package-inputs lagrange))
```

The package does build, but the problem remains with the script being
displayed in the wrong direction.

I'm am greatly curious if there are more configure time options that
need to be set in relation to this. This paragraph indicates there are
related configure options:

https://github.com/skyjake/lagrange#unicode-text-rendering






bug#51183: lagrange: fribidi and harfbuzz dependencies?

2021-10-13 Thread Liliana Marie Prikler
Hi,

Am Mittwoch, den 13.10.2021, 15:40 -0800 schrieb Christopher Howard:
> Hello, the following did NOT work:
> 
> ```
> (use-modules (guix packages))
> (use-modules (gnu packages web-browsers))
> (use-modules (gnu packages gtk))
> (use-modules (gnu packages fribidi))
> 
> (packages->manifest
>  (list
>   (package
>(inherit lagrange)
>(inputs 
> `(("harfbuzz" ,harfbuzz)
>   ("fribidi" , fribidi)
>   ,@(package-inputs lagrange))
> ```
> 
> The package does build, but the problem remains with the script being
> displayed in the wrong direction.
> 
> I'm am greatly curious if there are more configure time options that
> need to be set in relation to this. This paragraph indicates there
> are related configure options:
> 
> https://github.com/skyjake/lagrange#unicode-text-rendering
By default, Lagrange should have ENABLE_FRIBIDI and ENABLE_HARFBUZZ be
ON, whereas ENABLE_FRIBIDI_BUILD and ENABLE_HARFBUZZ_MINIMAL are set
OFF, just as the script states.  It would seem to be a bug elsewhere
then.

Try to check the build log to see whether or not harfbuzz and fribidi
respectively get correctly detected by CMake.  It ought to use pkg-
config to do so, but I don't trust CMake on a fundamental level.  If it
does, there might be a problem with how Lagrange uses them?