Re: Guix in Debian!

2021-01-23 Thread Taylan Kammer

On 24.01.2021 05:04, Vagrant Cascadian wrote:

Now on Debian you should be able to:

   apt install guix
   guix install dpkg
   guix environment --ad-hoc dpkg -- dpkg -i ./guix_1.2.0-3_amd64.deb

It is almost like symmetry!


That is... pretty awesome! :D

Thanks for this, I can see myself using Guix-on-Debian in some server 
environments in the future, especially where VPS providers don't make it 
easy to run your own distro.


- Taylan



Re: Guix in Debian!

2021-01-23 Thread Joshua Branson


Awesome!  Congrats!

-- 
Joshua Branson (joshuaBPMan in #guix)
Sent from Emacs and Gnus
  https://gnucode.me
  https://video.hardlimit.com/accounts/joshua_branson/video-channels
  https://propernaming.org
  "You can have whatever you want, as long as you help
enough other people get what they want." - Zig Ziglar
  



Guix in Debian!

2021-01-23 Thread Vagrant Cascadian
So, a while back I mentioned that Guix was present in Debian
"experimental":

  https://lists.gnu.org/archive/html/guix-devel/2020-11/msg00254.html

And it was useable for a brief window of time, but was broken due to
some issues with guile-gnutls and guile-3.0:

  https://bugs.debian.org/964284

Somewhat deterred, I back-burnered it for a while while I focused on
other things...


Just a few days ago, I decided to attempt to get Guix into Debian's next
release, and went with the fallback plan of building it against
guile-2.2, and a few disabled tests later...

  https://tracker.debian.org/guix


If all goes well, it should migrate to "bullseye" in a few
days. Hopefully in a few months "bullseye" will become Debian's stable
release shipping with guix! Presumeably Guix will also eventually find
itself in Ubuntu and other Debian derivatives...


Now on Debian you should be able to:

  apt install guix
  guix install dpkg
  guix environment --ad-hoc dpkg -- dpkg -i ./guix_1.2.0-3_amd64.deb

It is almost like symmetry!


Thanks for all the help and encouragement along the way, everyone!


live well,
  vagrant


signature.asc
Description: PGP signature


[PATCH] WIP snapper fixes and snapperd service

2021-01-23 Thread raingloom
Hi!

I have a technically working but still only lightly tested and not very
user friendly patch set for making Snapper work!

Included is Pierre Neidhardt's original patch, followed by my patches.

How to try it:
Everything needs sudo for now, sorry about that. This could probably be
changed so that users could administrate configs pertaining only to
their home dirs, but it looks like ading new configs will require sudo
no matter what.

0. Have a BTRFS file system mounted somewhere. You may have heard that
other setups (like ext4 or thin LVM) also works, but based on issue
tracker activity, it looks very much like they don't, or aren't
maintained and can break at any time.

```
# Create new subvolume
btrfs subvolume create
# Attempt to create a new config without understanding what you're
getting into:
sudo snapper -c my-config-name create-config path/to/subvolume
# This will show informative messages like `Failure (error.something).`
# Obviously this is because you haven't populated the relevant parts of
# /etc. Duh. So do this, and think about how fun it must have been to
# track down the sources of these messages.
sudo cp -r $(./pre-inst-env guix build snapper)/etc/snapper /etc/snapper
sudo install -D -m 644 $(./pre-inst-env guix build --source 
snapper)/data/sysconfig.snapper /etc/sysconfig/snapper
# Add snapper-service-type to an operating-system. I assume you know how to do 
it on your own.
# If anything breaks:
sudo herd status snapperd
# It sometimes stops for some reason? Just enable it and restart.
# Anyways, now you can create a configuration. :D
sudo snapper -c my-config-name create-config path/to/subvolume
```

Now just continue trying stuff from one of the many Snapper tutorials
around the net, like the Arch Wiki one.

Yay! Was that unnecessarily hard? It was. That's why this is a WIP
patchset and why I need some tips on making it work better.

* Should snapper be configured to use something other than
  /etc/sysconfig? The sysconfig subdirectory doesn't really make sense
  on Guix, but maybe it's not worth bikeshedding.
* (How) should homes be converted to BTRFS subvolumes?
* Snapshot scheduling is still TODO.
* Should /etc/snapper even be mutable? How to handle the configuration
  data type?

TLDR: I have some ideas on how to proceed, but would welcome some input
from people who have some experience setting up backups and
snapshotting, either on Guix, or Nix, or some traditional distro.
>From d36491046c1ab0eeab517fd153da319dc0793451 Mon Sep 17 00:00:00 2001
From: Pierre Neidhardt 
Date: Sat, 26 Jan 2019 17:52:35 +0100
Subject: [PATCH 1/3] gnu: Add snapper.

* gnu/packages/linux.scm (snapper): New variable.
---
 gnu/packages/linux.scm | 107 +
 1 file changed, 107 insertions(+)

diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 2497e0dea9..6bc3f1e52a 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -5081,6 +5081,113 @@ uncompressed size will not match the number given by @command{tar} or
 obviously it can be shared with files outside our set).")
 (license license:gpl2+)))
 
+(define-public snapper
+  (package
+(name "snapper")
+(version "0.8.2")
+(source (origin
+  (method url-fetch)
+  (uri (string-append "ftp://ftp.suse.com/pub/projects/snapper/snapper-;
+  version
+  ".tar.bz2"))
+  (sha256
+   (base32
+"0s73x5h0fdggcxxcmjlf1q7pqlwd1ac4pngwsm6ayg8n4gxk3acy"
+(build-system gnu-build-system)
+(arguments
+ `( ;; TODO: 2 tests are failing:
+   ;; unknown location(0): fatal error: in "test_byte_to_humanstring": std::runtime_error: locale::facet::_S_create_c_locale name not valid
+   ;; unknown location(0): fatal error: in "test_big_numbers": std::runtime_error: locale::facet::_S_create_c_locale name not valid
+   ;; unknown location(0): fatal error: in "test1": std::runtime_error: locale::facet::_S_create_c_locale name not valid
+   #:tests? #f
+   #:configure-flags (list
+  (string-append "CPPFLAGS="
+ "-I"
+ (assoc-ref %build-inputs "libxml2")
+ "/include/libxml2")
+  "--disable-zypp")
+   #:phases
+   (modify-phases %standard-phases
+ (add-before 'build 'make-local-docbook-xml
+   (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "doc/html.xsl"
+   (("http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl;)
+(string-append (assoc-ref inputs "docbook-xsl")
+   "/xml/xsl/docbook-xsl-"
+   ,(package-version docbook-xsl)
+   "/xhtml/docbook.xsl")))
+ (substitute* "doc/manpages.xsl"
+   

Re: Staging branch [problem with node-10.22]

2021-01-23 Thread Leo Famulari
On Sat, Jan 23, 2021 at 04:29:54PM -0500, Mark H Weaver wrote:
> Presumably the problem is that you're using a certain 3rd-party channel
> that relies upon the 'node-10.22' variable, which was removed in the
> following commit on the 'ungrafting' branch (later merged into
> 'staging'):
> 
> https://git.sv.gnu.org/cgit/guix.git/commit/?h=staging=18f10c0b12dd369507fd2821dcf748fc9b13053a

This hypothesis was confirmed on the #guix IRC channel.



Re: Staging branch [problem with node-10.22]

2021-01-23 Thread Mark H Weaver
Jonathan Brielmaier  writes:

> I tried to update my desktop system to staging but it already fails in
> `guix pull`:
>
> $ cat
> /var/log/guix/drvs/d2/rd3sv1i0wy6bwibp4chjymz6b4dggl-guix-package-cache.drv.bz2
> | bzip2 -d
> (repl-version 0 1 1)
> Generating package cache for
> '/gnu/store/pn96j52ajgdkbsjv1i1m3jwj2iir91y6-profile'...
> (exception unbound-variable (value #f) (value "Unbound variable: ~S")
> (value (node-10.22)) (value #f))

Presumably the problem is that you're using a certain 3rd-party channel
that relies upon the 'node-10.22' variable, which was removed in the
following commit on the 'ungrafting' branch (later merged into
'staging'):

https://git.sv.gnu.org/cgit/guix.git/commit/?h=staging=18f10c0b12dd369507fd2821dcf748fc9b13053a

  Mark



Re: Staging branch [problem with node-10.22]

2021-01-23 Thread Leo Famulari
On Sat, Jan 23, 2021 at 12:58:29PM +0100, Jonathan Brielmaier wrote:
> I tried to update my desktop system to staging but it already fails in
> `guix pull`:
> 
> $ cat
> /var/log/guix/drvs/d2/rd3sv1i0wy6bwibp4chjymz6b4dggl-guix-package-cache.drv.bz2
> | bzip2 -d
> (repl-version 0 1 1)
> Generating package cache for
> '/gnu/store/pn96j52ajgdkbsjv1i1m3jwj2iir91y6-profile'...
> (exception unbound-variable (value #f) (value "Unbound variable: ~S")
> (value (node-10.22)) (value #f))
> 
> I don't really understand the error. I don't have node in my profile or
> my system config...

Also, if you are using any 3rd-party channels or GUIX_PACKAGE_PATH,
could you try again without them?



Re: Staging branch [problem with node-10.22]

2021-01-23 Thread Leo Famulari
On Sat, Jan 23, 2021 at 12:58:29PM +0100, Jonathan Brielmaier wrote:
> I tried to update my desktop system to staging but it already fails in
> `guix pull`:
> 
> $ cat
> /var/log/guix/drvs/d2/rd3sv1i0wy6bwibp4chjymz6b4dggl-guix-package-cache.drv.bz2
> | bzip2 -d
> (repl-version 0 1 1)
> Generating package cache for
> '/gnu/store/pn96j52ajgdkbsjv1i1m3jwj2iir91y6-profile'...
> (exception unbound-variable (value #f) (value "Unbound variable: ~S")
> (value (node-10.22)) (value #f))

--
$ ./pre-inst-env guix refresh -l node@10.22
Building the following 19 packages would ensure 27 dependent packages are 
rebuilt: cwltool@3.0.20201121085451 
ungoogled-chromium-wayland@87.0.4280.88-0.b78cb92 emacs-nodejs-repl@0.2.2 
gnome@3.34.2 vinagre@3.22.0 virt-viewer@7.0 virt-manager@2.2.1 
icedove-wayland@78.6.0 icedove@78.6.0 geierlein@0.9.13 node-semver@7.2.1 
node-env-variable@0.0.4 node-stack-trace@0.0.10-1.4fd379e 
node-statsd-parser@0.0.4 node-color-name@1.1.3 node-util-deprecate@1.0.2 
node-mersenne@0.0.4 ruby-autoprefixer-rails@9.4.7 vlang@0.1.29
--

Are you using any of those packages?



Re: Questions regarding Python packaging

2021-01-23 Thread Lars-Dominik Braun
Hi Tanguy,

> Done! :-)
> I've eventually succeeded in ("properly") packaging a software managed
> with Poetry. And I've learned quite a lot on the way!
oh, I see. I’ve actually been trying to replace python-build-system with
a python-build based build. Attached is my current work in progress. I
cannot quite build python-build, because I’m lacking support for
python-flit, but I think the general idea is clear: Remove pip and
setuptools from python (saves almost 20MiB from the closure and avoids
weird conflicts between python’s setuptools and python-setuptools) and
turn them into (almost) ordinary packages. Then use setuptools to
bootstrap itself, bootstrap python-build with setuptools and use
python-build to build evrey other packages using python-build-system.

Cheers,
Lars

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index d08e23936c..a9843bd9cb 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -1123,14 +1123,14 @@ other machines, such as over the network.")
 (define-public python-setuptools
   (package
 (name "python-setuptools")
-(version "41.0.1")
+(version "51.3.1")
 (source
  (origin
   (method url-fetch)
-  (uri (pypi-uri "setuptools" version ".zip"))
+  (uri (pypi-uri "setuptools" version))
   (sha256
(base32
-"04sns22y2hhsrwfy1mha2lgslvpjsjsz8xws7h2rh5a7ylkd28m2"))
+"07qk6ykhq1q4k33x1m96r39f9qpfzp2xfl5ly9zww0180gssrvqc"))
   (modules '((guix build utils)))
   (snippet
'(begin
@@ -1143,7 +1143,26 @@ other machines, such as over the network.")
 ;; FIXME: Tests require pytest, which itself relies on setuptools.
 ;; One could bootstrap with an internal untested setuptools.
 (arguments
- `(#:tests? #f))
+ `(#:tests? #f
+   #:need-setuptools #f
+   #:python-build-variant #f
+   #:phases (modify-phases %standard-phases
+  (replace 'build
+   (lambda _
+ (invoke "python" "setup.py" "build")))
+  (replace 'install
+   (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out")))
+ (invoke "python" "setup.py" "install" "--prefix" 
out "--single-version-externally-managed" "--root=/"
+  ;; Use this setuptools’ sources to bootstrap themselves.
+  (add-before 'build 'set-PYTHONPATH
+(lambda _
+  (format #t "current working dir ~s~%" (getcwd))
+  (setenv "PYTHONPATH"
+  (string-append ".:" (getenv "PYTHONPATH")))
+  #t)
+;; Not required when not building a wheel
+;(propagated-inputs `(("python-wheel" ,python-wheel)))
 (home-page "https://pypi.org/project/setuptools/;)
 (synopsis
  "Library designed to facilitate packaging Python projects")
@@ -1822,7 +1841,7 @@ Python file, so it can be easily copied into your 
project.")
   (package
 (inherit python-six)
 (name "python-six-bootstrap")
-(native-inputs `())
+(native-inputs '())
 (arguments `(#:tests? #f
 
 (define-public python2-six-bootstrap
@@ -5675,7 +5694,8 @@ by pycodestyle.")
  ;; NOTE: Any value works, the variable just has to be present.
  (setenv "SKIP_ONLINE" "1")
  #t)
-(native-inputs `(("unzip" ,unzip)))
+(native-inputs
+  `(("unzip" ,unzip)))
 (home-page "https://bitbucket.org/pypa/distlib;)
 (synopsis "Distribution utilities")
 (description "Distlib is a library which implements low-level functions 
that
@@ -15272,7 +15292,7 @@ protocols.")
   (package
 (inherit python-attrs)
 (name "python-attrs-bootstrap")
-(native-inputs `())
+(native-inputs '())
 (arguments `(#:tests? #f
 
 (define-public python2-attrs-bootstrap
@@ -23451,3 +23471,292 @@ Qt applications.")
   "Pivy provides python bindings for Coin, a 3D graphics library with an
 Application Programming Interface based on the Open Inventor 2.1 API.")
 (license license:isc)))
+
+(define-public python-build
+  (package
+(name "python-build")
+(version "0.1.0")
+(source
+  (origin
+(method url-fetch)
+(uri (pypi-uri "build" version))
+(sha256
+  (base32
+"1d6m21lijwm04g50nwgsgj7x3vhblzw7jv05ah8psqgzk20bbch8"
+(build-system python-build-system)
+(arguments `(#:python-build-variant ,python-build-bootstrap))
+(propagated-inputs
+  `(("python-packaging" ,python-packaging)
+("python-pep517" ,python-pep517)
+("python-toml" ,python-toml)
+;; For fallback option.
+("python-setuptools" ,python-setuptools)))
+(native-inputs
+  `(("python-filelock" ,python-filelock)
+("python-pytest" ,python-pytest)
+("python-pytest-cov" ,python-pytest-cov)
+  

Re: Staging branch [problem with node-10.22]

2021-01-23 Thread Jonathan Brielmaier

On 22.01.21 21:46, Leo Famulari wrote:

On Wed, Jan 13, 2021 at 05:30:53PM -0500, Leo Famulari wrote:

Using `guix weather`, we can check substitute availability for the
staging branch:

--
master branch
aarch64: 66%
x86_64: 93%
i686: 85%
armhf: 51%

staging branch
aarch64: 44%
x86_64: 80%
i686: 60%
armhf: 30%
--


I tried to update my desktop system to staging but it already fails in
`guix pull`:

$ cat
/var/log/guix/drvs/d2/rd3sv1i0wy6bwibp4chjymz6b4dggl-guix-package-cache.drv.bz2
| bzip2 -d
(repl-version 0 1 1)
Generating package cache for
'/gnu/store/pn96j52ajgdkbsjv1i1m3jwj2iir91y6-profile'...
(exception unbound-variable (value #f) (value "Unbound variable: ~S")
(value (node-10.22)) (value #f))

I don't really understand the error. I don't have node in my profile or
my system config...