ragnarwm: init at 1.3.1
This commit is contained in:
parent
e936aa35a7
commit
0482394fe0
6 changed files with 142 additions and 0 deletions
|
@ -35,6 +35,7 @@ in
|
|||
./openbox.nix
|
||||
./pekwm.nix
|
||||
./notion.nix
|
||||
./ragnarwm.nix
|
||||
./ratpoison.nix
|
||||
./sawfish.nix
|
||||
./smallwm.nix
|
||||
|
|
33
nixos/modules/services/x11/window-managers/ragnarwm.nix
Normal file
33
nixos/modules/services/x11/window-managers/ragnarwm.nix
Normal file
|
@ -0,0 +1,33 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.services.xserver.windowManager.ragnarwm;
|
||||
in
|
||||
{
|
||||
###### interface
|
||||
|
||||
options = {
|
||||
services.xserver.windowManager.ragnarwm = {
|
||||
enable = mkEnableOption (lib.mdDoc "ragnarwm");
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.ragnarwm;
|
||||
defaultText = literalExpression "pkgs.ragnarwm";
|
||||
description = lib.mdDoc ''
|
||||
The ragnar package to use.
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
###### implementation
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
services.xserver.displayManager.sessionPackages = [ cfg.package ];
|
||||
environment.systemPackages = [ cfg.package ];
|
||||
};
|
||||
|
||||
meta.maintainers = with lib.maintainers; [ sigmanificient ];
|
||||
}
|
|
@ -667,6 +667,7 @@ in {
|
|||
rabbitmq = handleTest ./rabbitmq.nix {};
|
||||
radarr = handleTest ./radarr.nix {};
|
||||
radicale = handleTest ./radicale.nix {};
|
||||
ragnarwm = handleTest ./ragnarwm.nix {};
|
||||
rasdaemon = handleTest ./rasdaemon.nix {};
|
||||
readarr = handleTest ./readarr.nix {};
|
||||
redis = handleTest ./redis.nix {};
|
||||
|
|
32
nixos/tests/ragnarwm.nix
Normal file
32
nixos/tests/ragnarwm.nix
Normal file
|
@ -0,0 +1,32 @@
|
|||
import ./make-test-python.nix ({ lib, ...} : {
|
||||
name = "ragnarwm";
|
||||
|
||||
meta = {
|
||||
maintainers = with lib.maintainers; [ sigmanificient ];
|
||||
};
|
||||
|
||||
nodes.machine = { pkgs, lib, ... }: {
|
||||
imports = [ ./common/x11.nix ./common/user-account.nix ];
|
||||
test-support.displayManager.auto.user = "alice";
|
||||
services.xserver.displayManager.defaultSession = lib.mkForce "ragnar";
|
||||
services.xserver.windowManager.ragnarwm.enable = true;
|
||||
|
||||
# Setup the default terminal of Ragnar
|
||||
environment.systemPackages = [ pkgs.alacritty ];
|
||||
};
|
||||
|
||||
testScript = ''
|
||||
with subtest("ensure x starts"):
|
||||
machine.wait_for_x()
|
||||
machine.wait_for_file("/home/alice/.Xauthority")
|
||||
machine.succeed("xauth merge ~alice/.Xauthority")
|
||||
|
||||
with subtest("ensure we can open a new terminal"):
|
||||
# Sleeping a bit before the test, as it may help for sending keys
|
||||
machine.sleep(2)
|
||||
machine.send_key("meta_l-ret")
|
||||
machine.wait_for_window(r"alice.*?machine")
|
||||
machine.sleep(2)
|
||||
machine.screenshot("terminal")
|
||||
'';
|
||||
})
|
73
pkgs/applications/window-managers/ragnarwm/default.nix
Normal file
73
pkgs/applications/window-managers/ragnarwm/default.nix
Normal file
|
@ -0,0 +1,73 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, fetchFromGitHub
|
||||
, writeText
|
||||
, fontconfig
|
||||
, libX11
|
||||
, libXft
|
||||
, libXcursor
|
||||
, libXcomposite
|
||||
, conf ? null
|
||||
, nixosTests
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "ragnarwm";
|
||||
version = "1.3.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "cococry";
|
||||
repo = "Ragnar";
|
||||
rev = finalAttrs.version;
|
||||
hash = "sha256-SZWhmFNmS2oLdO9BnPzimoind1452v/EEQzadc5A+bI";
|
||||
};
|
||||
|
||||
prePatch = ''
|
||||
substituteInPlace Makefile \
|
||||
--replace '/usr/bin' "$out/bin" \
|
||||
--replace '/usr/share' "$out/share"
|
||||
'';
|
||||
|
||||
postPatch =
|
||||
let
|
||||
configFile =
|
||||
if lib.isDerivation conf || builtins.isPath conf
|
||||
then conf else writeText "config.h" conf;
|
||||
in
|
||||
lib.optionalString (conf != null) "cp ${configFile} config.h";
|
||||
|
||||
buildInputs = [
|
||||
fontconfig
|
||||
libX11
|
||||
libXft
|
||||
libXcursor
|
||||
libXcomposite
|
||||
];
|
||||
|
||||
makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" ];
|
||||
enableParallelBuilding = true;
|
||||
|
||||
preInstall = ''
|
||||
mkdir -p $out/bin
|
||||
mkdir -p $out/share/applications
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
install -Dm644 $out/share/applications/ragnar.desktop $out/share/xsessions/ragnar.desktop
|
||||
'';
|
||||
|
||||
passthru = {
|
||||
tests.ragnarwm = nixosTests.ragnarwm;
|
||||
providedSessions = [ "ragnar" ];
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
description = "Minimal, flexible & user-friendly X tiling window manager";
|
||||
homepage = "https://ragnar-website.vercel.app";
|
||||
changelog = "https://github.com/cococry/Ragnar/releases/tag/${finalAttrs.version}";
|
||||
license = licenses.gpl3Only;
|
||||
maintainers = with maintainers; [ sigmanificient ];
|
||||
mainProgram = "ragnar";
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
})
|
|
@ -33926,6 +33926,8 @@ with pkgs;
|
|||
|
||||
qemacs = callPackage ../applications/editors/qemacs { };
|
||||
|
||||
ragnarwm = callPackage ../applications/window-managers/ragnarwm {};
|
||||
|
||||
rime-cli = callPackage ../applications/office/rime-cli { };
|
||||
|
||||
roxctl = callPackage ../applications/networking/cluster/roxctl {
|
||||
|
|
Loading…
Reference in a new issue