Unverified Commit d7eb1c60 authored by Sandro Jäckel's avatar Sandro Jäckel Committed by GitHub
Browse files

ly: cleanup (#483770)

parents 02522128 c00f9638
Loading
Loading
Loading
Loading
+24 −10
Original line number Diff line number Diff line
{
  stdenv,
  lib,
  callPackage,
  fetchFromGitea,
  linux-pam,
  lib,
  libxcb,
  linux-pam,
  makeBinaryWrapper,
  zig_0_15,
  callPackage,
  nixosTests,
  stdenv,
  versionCheckHook,
  x11Support ? true,
  zig_0_15,
}:

let
  zig = zig_0_15;
in
stdenv.mkDerivation (finalAttrs: {
  pname = "ly";
  version = "1.3.1";
@@ -25,8 +29,9 @@ stdenv.mkDerivation (finalAttrs: {

  nativeBuildInputs = [
    makeBinaryWrapper
    zig_0_15
    zig
  ];

  buildInputs = [
    linux-pam
  ]
@@ -35,22 +40,31 @@ stdenv.mkDerivation (finalAttrs: {
  postPatch = ''
    ln -s ${
      callPackage ./deps.nix {
        zig = zig_0_15;
        inherit zig;
      }
    } $ZIG_GLOBAL_CACHE_DIR/p
  '';

  zigBuildFlags = [
    "-Denable_x11_support=${lib.boolToString x11Support}"
  ];

  doInstallCheck = true;
  nativeInstallCheckInputs = [ versionCheckHook ];

  passthru.tests = { inherit (nixosTests) ly; };

  meta = {
    description = "TUI display manager";
    license = lib.licenses.wtfpl;
    longDescription = ''
      Ly is a lightweight TUI (ncurses-like) display manager for Linux
      and BSD, designed with portability in mind (e.g. it does not
      require systemd to run).
    '';
    homepage = "https://codeberg.org/fairyglade/ly";
    maintainers = [ ];
    platforms = lib.platforms.linux;
    license = lib.licenses.wtfpl;
    mainProgram = "ly";
    maintainers = with lib.maintainers; [ yiyu ];
    platforms = lib.platforms.unix;
  };
})