jahnf / Projecteur

Linux Desktop Application for the Logitech Spotlight device (and similar devices) - Digital Laser Pointer
MIT License
374 stars 33 forks source link

GUIX package for Projecteur #176

Closed gyps closed 10 months ago

gyps commented 2 years ago

Dear all,

I'm currently trying to build a GUIX package for Projecteur and so far I succeeded in making it compile. Only the udev-rule creation in the end seems to need a different handling in the GUIX install process. Is there a flag (compile/config-option) that I'm maybe overlooking, to disable this step of the install process?

Cheers, Alex

PS: I hope it is OK if I build a package to use projecteur in GUIX (and if it works out make available under GPL or MIT license?).

jahnf commented 2 years ago

Hello @gyps what exactly is going wrong with the udev rules?

As a result of the build configuration step with CMake (basically the first cmake call) you should have a file created by CMake called 55-projecteur.rules within the build directory.

And, yes your are free to package Projecteur for GUIX as I released it under the MIT license.

gyps commented 2 years ago

Hello @jahnf

what exactly is going wrong with the udev rules? there is nothing wrong with them. It's just that GUIX uses a functional declearative package/system management approach and does not use an FSH structured filesystem. Therefore udev rules need to reside in the installation dir of the package (which I now managed by providing (string-append "-DCMAKE_INSTALL_UDEVRULESDIR=" %output "/lib/udev/rules.d") to the package file.) The operating-system will now find the udev rules and install them by providing (udev-rules-service 'projecteur projecteur) to the services declaration (with projecteur being the name of the projecteur module).

It now works on GUIX-system on my system.

One more thing. For the package to work it needs to have a reference to the source. Currently this is:

   (version "0.9.2")
   (source
    (origin
     (method url-fetch)
     (uri (string-append "https://github.com/jahnf/Projecteur/releases/download/v" version "/projecteur-" version "_source.tar.gz"))
     (sha256 (base32 "178wl0akpznsvybmi18fsxxw366jwh3j4bi94fjl3ssxxksga919"))
     )
    )

This relies on

  1. the 0.9.2 version of projecteur being available from this URL (also after new releases are published) and
  2. the source of this tarball not changing, because it is verified by a hash (all guix packages are)

Are these assumptions valid?

Cheers, Alex

jahnf commented 2 years ago

This relies on

  1. the 0.9.2 version of projecteur being available from this URL (also after new releases are published) and
  2. the source of this tarball not changing, because it is verified by a hash (all guix packages are)

Are these assumptions valid?

Yes a released version won't change - and should always be available, as long as Github does not change their access URIs.

jahnf commented 11 months ago

@gyps can this be closed? - (also : I plan to release a 0.10.0 in a few weeks)

olifre commented 11 months ago

@gyps Concerning byte-by-byte stability of the source tarballs from GitHub, you may want to take note of: https://github.blog/2023-02-21-update-on-the-future-stability-of-source-code-archives-and-hashes/

jahnf commented 10 months ago

Closing stale issue, @gyps please reopen if necessary.