Nixpkgs: Package request: Cockpit

Created on 31 Mar 2018  路  12Comments  路  Source: NixOS/nixpkgs

Cockpit is a server manager that makes it easy to administer your GNU/Linux servers via a web browser.

Website: http://cockpit-project.org/
Upstream: https://github.com/cockpit-project/cockpit/
License: LGPL2.1
Arch Linux package: https://aur.archlinux.org/packages/cockpit/

image

package (new)

All 12 comments

Could be a lot of effort to port: https://github.com/cockpit-project/cockpit/search?p=2&q=%2Fusr%2Fbin&type=&utf8=%E2%9C%93
...

I have not looked at the code how many assumption it makes about the system, but in terms of system configuration nixos is a special snow flake.

Probably only a subset will work. But I think there is some stuff in cockpit that is helpful even on NixOS:

  • View journald logs and systemd services
  • Manage virtual machines via libvirt
  • Get a shell terminal from the Web UI
  • Some general system information like disk usage etc.

It's mostly read only stuff but I'm not sure how easy it is to only use parts of cockpit that would work.

+1, would love to have this

Probably only a subset will work. But I think there is some stuff in cockpit that is helpful even on NixOS:

* View journald logs and systemd services

* Manage virtual machines via libvirt

* Get a shell terminal from the  Web UI

* Some general system information like disk usage etc.

It's mostly read only stuff but I'm not sure how easy it is to only use parts of cockpit that would work.

Given that NixOS is pitched as a server os first, this would be very helpful. I already tried to package this myself but got stuck because it requires a few npm packages

@thefenriswolf try with https://github.com/moretea/yarn2nix?

Thank you for your contributions.
This has been automatically marked as stale because it has had no activity for 180 days.
If this is still important to you, we ask that you leave a comment below. Your comment can be as simple as "still important to me". This lets people see that at least one person still cares about this. Someone will have to do this at most twice a year if there is no other activity.
Here are suggestions that might help resolve this more quickly:

  1. Search for maintainers and people that previously touched the
    related code and @ mention them in a comment.
  2. Ask on the NixOS Discourse. 3. Ask on the #nixos channel on
    irc.freenode.net.

I still think it would be good to have this in NixOS.

Well as @Mic92 pointed out, there will be quite a lot of patching up paths to do, as well as the NPM packages that need installing (try yarn2nix or npm2nix for that)

Seeing as it's non-trivial, it will have to be packaged by someone with real interest in getting it, and we can assist (make a draft PR and tag us on questions)

node is only required for the dev environment
I have made some progress packaging cockpit, it still fails to compile tho
Any help would be greatly appreciated

build flags: SHELL=/nix/store/5hplxs3kprdp6v62qk3di6a1m1s1paiq-bash-4.4-p23/bin/bash
  GEN      src/ws/mock-dbus-tests.h
Traceback (most recent call last):
  File "/nix/store/5zajbm8674d93nix4h8b0hxgglj2pbir-glib-2.64.3-dev/bin/gdbus-codegen", line 53, in <module>
    from codegen import codegen_main
  File "/nix/store/5zajbm8674d93nix4h8b0hxgglj2pbir-glib-2.64.3-dev/share/glib-2.0/codegen/codegen_main.py", line 24, in <module>
    import argparse
  File "/nix/store/jli50q24fvik6pfsnjs1jd90g3dy4p6y-python3-3.8.3/lib/python3.8/argparse.py", line 88, in <module>
    import re as _re
  File "/nix/store/jli50q24fvik6pfsnjs1jd90g3dy4p6y-python3-3.8.3/lib/python3.8/re.py", line 145, in <module>
    class RegexFlag(enum.IntFlag):
AttributeError: module 'enum' has no attribute 'IntFlag'
make: *** [Makefile:10639: src/ws/mock-dbus-tests.h] Error 1
error: --- Error ------------------------------------------------------------------------------------------ nix-build
error: --- Error --- nix-daemon
builder for '/nix/store/mdiihwskfp862y17wp70skdy74kh33v5-cockpit-222.1.drv' failed with exit code 2; last 10 log lines:
    File "/nix/store/5zajbm8674d93nix4h8b0hxgglj2pbir-glib-2.64.3-dev/bin/gdbus-codegen", line 53, in <module>
      from codegen import codegen_main
    File "/nix/store/5zajbm8674d93nix4h8b0hxgglj2pbir-glib-2.64.3-dev/share/glib-2.0/codegen/codegen_main.py", line 24, in <module>
      import argparse
    File "/nix/store/jli50q24fvik6pfsnjs1jd90g3dy4p6y-python3-3.8.3/lib/python3.8/argparse.py", line 88, in <module>
      import re as _re
    File "/nix/store/jli50q24fvik6pfsnjs1jd90g3dy4p6y-python3-3.8.3/lib/python3.8/re.py", line 145, in <module>
      class RegexFlag(enum.IntFlag):
  AttributeError: module 'enum' has no attribute 'IntFlag'
  make: *** [Makefile:10639: src/ws/mock-dbus-tests.h] Error 1

Seems like an error in the package itself.

The enum thing is due to a stray enum34 dependency in python38Packages.pyscss - enum34 is a backport of the enum module, and breaks things if it's installed on Python >= 3.4. You'll need to look at why pyscss is pulling in enum34 - it's not immediately obvious to me from pyscss's default.nix, it looks correct.

A pthread link error happens if that's fixed or if Python is removed from the deps entirely. That pthread link error is, I believe, a problem with the Cockpit makefiles; I made https://github.com/cockpit-project/cockpit/pull/14480 to fix it.

With that change applied, I get

  WEBPACK  apps
webpack-make: Cannot find module 'stdio'
Require stack:
- /home/sbaugh/.local/src/nixpkgs/cockpitsrc/tools/webpack-make
WARNING: './tools/webpack-make' is missing on your system.

I don't know anything about the Javascript packaging, so no idea how to progress from here. Good luck!

It compiles but gets stuck writing it's systemd.service files. I don't have much experience packaging applications which hook into systemd
https://gist.github.com/thefenriswolf/baaadf92a1b9511b49666ce83fabac8f

Was this page helpful?
0 / 5 - 0 ratings