Sourcehut packaging in 2023
Hi, This mail is there to give an overview of what packages are we missing and how to build a sourcehut service. A sourcehut service is a mix of python/golang/js and static assets. Python: We have almost everything except 2 packages, python-pam and another one that I forgot. Js: It's actually alright, the js that are there are standalone, no npm nightmare, there was minify a npm package, but Mr.Devault replaced it by a golang package with the same name. Golang: This is where the pain is at, a lot of them are missing we will need to package ~sircmpwn/core-go this contains a lot of golang code shared by all services. Now a short guide on how to build a sourcehut service. - core.sr.ht: I'm focusing on this service first because it is needed by all other services. It contains python dependencies, icons/js/scss and static assets. It also has bootstrap as a git submodule, now the good news is that we don't need to package the entirety of bootstrap, basically it only needs the scss directory of bootstrap. In order to build core.sr.ht you will need to run setup.py. Note that (this apply to all services) it will call git to get which version it is on, so we probably need to patch that. It will package the srht folder containing the aforementioned dependencies and a Makefile. This Makefile is very important as it will be included in the Makefile of all other services, so that they can build their static assets. - *.sr.ht Now the generic build method for all other sourcehut services. You run setup.py in the root directory, it contains a call to a Makefile in that same directory and this Makefile will include the Makefile from core.sr.ht so that it can build its assets. Then this changes per service but it will usually build the golang code in the api directory. -- Thomas Ieong
Re: Sourcehut packaging
> On 04/09/2021 11:45 PM Ron Nazarov wrote: > By sourcehut packages, do you mean node packages? > Because I don't think there are any sourcehut packages in Guix yet. > I mean packages with source url's on sr.ht, for example: guix refresh scdoc doesnt have an updater
Re: Sourcehut packaging
On Thu, 2021-04-08 at 13:35 +0200, Brendan Tildesley wrote: > Since your working on sourchut, would you also mind taking on adding > an update for sourcehut packages, so that guix refresh works for > them. There are many of them but no updater currently. By sourcehut packages, do you mean node packages? Because I don't think there are any sourcehut packages in Guix yet. -- Ron Nazarov signature.asc Description: This is a digitally signed message part
Re: Sourcehut packaging
It looks like the Makefile is the only place where csslint is called (atleast, from a quick glance at the source code) so it might work to substitute a different css minifier like one of the ones I mentioned previously and not use the npm deps at all. What do you think? We should test it. -- jgart April 8, 2021 5:11 PM, "jgart" wrote: > We have esbuild. Can esbuild replace clean-css? > > or maybe go-github-com-tdewolff-minify 🤔 > > https://github.com/tdewolff/minify > > What are your thoughts? I'm just thinking out loud here. > > all the best, > > jgart
Re: Sourcehut packaging
We have esbuild. Can esbuild replace clean-css? or maybe go-github-com-tdewolff-minify 🤔 https://github.com/tdewolff/minify What are your thoughts? I'm just thinking out loud here. all the best, jgart
Re: Sourcehut packaging
Since your working on sourchut, would you also mind taking on adding an update for sourcehut packages, so that guix refresh works for them. There are many of them but no updater currently.
Re: Sourcehut packaging
Ron Nazarov writes: > All Python dependencies of core.sr.ht (which is required by all Python > components of Sourcehut) are now packaged, but it also has 2 npm > dependencies (clean-css and clean-css-cli), these are not yet packaged, > they have the following dependencies (flattened): > * balanced-match > * brace-expansion > * clean-css > * clean-css-cli > * commander > * concat-map > * fs.realpath > * glob > * inflight > * inherits > * minimatch > * once > * path-is-absolute > * source-map > * wrappy (packaged as node-wrappy) That's awesome! How cool would it be to have a Sourcehut service in guix system !? > > This is not very many dependencies compared to jQuery. > > I have not looked at other sourcehut packages yet. -- 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
Sourcehut packaging
Hello, All Python dependencies of core.sr.ht (which is required by all Python components of Sourcehut) are now packaged, but it also has 2 npm dependencies (clean-css and clean-css-cli), these are not yet packaged, they have the following dependencies (flattened): * balanced-match * brace-expansion * clean-css * clean-css-cli * commander * concat-map * fs.realpath * glob * inflight * inherits * minimatch * once * path-is-absolute * source-map * wrappy (packaged as node-wrappy) This is not very many dependencies compared to jQuery. I have not looked at other sourcehut packages yet. -- Ron Nazarov signature.asc Description: This is a digitally signed message part