Unverified Commit 5c37ba84 authored by Emily's avatar Emily Committed by GitHub
Browse files

[Backport release-24.11] lyra-cursors: init at 0-unstable-2021-12-04 (#357952)

parents 7861e6ce 0a99469b
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -12720,6 +12720,14 @@
    githubId = 5624721;
    name = "Ben Wolsieffer";
  };
  lordmzte = {
    name = "Moritz Thomae";
    email = "lord@mzte.de";
    matrix = "@lordmzte:mzte.de";
    github = "LordMZTE";
    githubId = 28735087;
    keys = [ { fingerprint = "AB47 3D70 53D2 74CA DC2C  230C B648 02DC 33A6 4FF6"; } ];
  };
  lord-valen = {
    name = "Lord Valen";
    matrix = "@lord-valen:matrix.org";
+82 −0
Original line number Diff line number Diff line
{
  lib,
  stdenvNoCC,
  inkscape,
  xcursorgen,
  fetchFromGitHub,
  fetchpatch2,
}:
let
  styles = [
    "LyraB"
    "LyraF"
    "LyraG"
    "LyraP"
    "LyraQ"
    "LyraR"
    "LyraS"
    "LyraX"
    "LyraY"
  ];

  # This is a patch from a fork of the upstream repository which addresses several issues with the
  # build script such as the fact that the style to build isn't hardcoded. We don't simply use this
  # fork as source, as the upstream repository is what we want to track.
  buildScriptPatch = fetchpatch2 {
    name = "use-more-flexible-build-script.patch";
    url = "https://github.com/KiranWells/Lyra-Cursors/commit/2735acb37a51792388497c666cc28370660217cb.patch?full_index=1";
    hash = "sha256-KCT4zNdep1TB7Oa4qrPw374ahT30o9/QrNTEgobp8zM=";
  };
in
stdenvNoCC.mkDerivation {
  pname = "lyra-cursors";
  version = "0-unstable-2021-12-04";

  src = fetchFromGitHub {
    owner = "yeyushengfan258";
    repo = "Lyra-Cursors";
    rev = "c096c54034f95bd35699b3226250e5c5ec015d9a";
    hash = "sha256-lfaX8ouE0JaQwVBpAGsrLIExQZ2rCSFKPs3cch17eYg=";
  };

  nativeBuildInputs = [
    inkscape
    xcursorgen
  ];

  patches = [ buildScriptPatch ];

  dontConfigure = true;

  postPatch = ''
    patchShebangs build.sh
  '';

  buildPhase = ''
    runHook preBuild

    rm -r dist
    for THEME in ${lib.escapeShellArgs styles}; do
      ./build.sh "$THEME"
    done

    runHook postBuild
  '';

  installPhase = ''
    runHook preInstall

    mkdir -p $out/share/icons
    mv dist/*-cursors $out/share/icons

    runHook postInstall
  '';

  meta = {
    description = "A cursor theme inspired by macOS and based on capitaine-cursors";
    homepage = "https://github.com/yeyushengfan258/Lyra-Cursors";
    license = lib.licenses.gpl3Only;
    platforms = lib.platforms.all;
    maintainers = with lib.maintainers; [ lordmzte ];
  };
}