From ac50329e42a7fa86d410b1c18fecb11b99ea42ee Mon Sep 17 00:00:00 2001 From: GetPsyched Date: Tue, 23 Jan 2024 18:31:45 +0530 Subject: [PATCH 1/3] banana-cursor: move to the new by-name convention --- .../default.nix => by-name/ba/banana-cursor/package.nix} | 0 pkgs/top-level/all-packages.nix | 2 -- 2 files changed, 2 deletions(-) rename pkgs/{data/icons/banana-cursor/default.nix => by-name/ba/banana-cursor/package.nix} (100%) diff --git a/pkgs/data/icons/banana-cursor/default.nix b/pkgs/by-name/ba/banana-cursor/package.nix similarity index 100% rename from pkgs/data/icons/banana-cursor/default.nix rename to pkgs/by-name/ba/banana-cursor/package.nix diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 0465b1f328d0..e71d6ea04ed6 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -29053,8 +29053,6 @@ with pkgs; bakoma_ttf = callPackage ../data/fonts/bakoma-ttf { }; - banana-cursor = callPackage ../data/icons/banana-cursor { }; - barlow = callPackage ../data/fonts/barlow { }; base16-schemes = callPackage ../data/themes/base16-schemes { }; From 1eaac5791b383754f65ac848c9eebe5e10996b46 Mon Sep 17 00:00:00 2001 From: GetPsyched Date: Tue, 23 Jan 2024 18:33:46 +0530 Subject: [PATCH 2/3] banana-cursor: refactor to build from source and update meta --- pkgs/by-name/ba/banana-cursor/package.nix | 43 ++++++++++++++++------- 1 file changed, 31 insertions(+), 12 deletions(-) diff --git a/pkgs/by-name/ba/banana-cursor/package.nix b/pkgs/by-name/ba/banana-cursor/package.nix index b89213c6d6fb..8467221c8de3 100644 --- a/pkgs/by-name/ba/banana-cursor/package.nix +++ b/pkgs/by-name/ba/banana-cursor/package.nix @@ -1,31 +1,50 @@ -{ - lib, - stdenvNoCC, - fetchFromGitHub, +{ fetchFromGitHub +, lib +, stdenvNoCC + +, # build deps + clickgen +, python3Packages }: -stdenvNoCC.mkDerivation rec { + +stdenvNoCC.mkDerivation (finalAttrs: { pname = "banana-cursor"; version = "1.0.0"; src = fetchFromGitHub { owner = "ful1e5"; repo = "banana-cursor"; - rev = "v${version}"; + rev = "v${finalAttrs.version}"; sha256 = "sha256-PI7381xf/GctQTnfcE0W3M3z2kqbX4VexMf17C61hT8="; }; - dontBuild = true; + nativeBuildInputs = [ + clickgen + python3Packages.attrs + ]; + + buildPhase = '' + runHook preBuild + + ctgen build.toml -p x11 -o $out + + runHook postBuild + ''; installPhase = '' + runHook preInstall + mkdir -p $out/share/icons - mv themes/Banana $out/share/icons + mv $out/Banana $out/share/icons + + runHook postInstall ''; meta = with lib; { + description = "The Banana Cursor"; homepage = "https://github.com/ful1e5/banana-cursor"; - description = "The banana cursor theme"; - license = licenses.gpl3; - platforms = platforms.linux; + license = licenses.gpl3Plus; maintainers = with maintainers; [ yrd ]; + platforms = platforms.linux; }; -} +}) From 46fa17c90953d4854456d8faaf992f61918d9a6b Mon Sep 17 00:00:00 2001 From: GetPsyched Date: Tue, 23 Jan 2024 19:24:29 +0530 Subject: [PATCH 3/3] banana-cursor: add getpsyched as maintainer --- pkgs/by-name/ba/banana-cursor/package.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/by-name/ba/banana-cursor/package.nix b/pkgs/by-name/ba/banana-cursor/package.nix index 8467221c8de3..c9275d43f54b 100644 --- a/pkgs/by-name/ba/banana-cursor/package.nix +++ b/pkgs/by-name/ba/banana-cursor/package.nix @@ -44,7 +44,7 @@ stdenvNoCC.mkDerivation (finalAttrs: { description = "The Banana Cursor"; homepage = "https://github.com/ful1e5/banana-cursor"; license = licenses.gpl3Plus; - maintainers = with maintainers; [ yrd ]; + maintainers = with maintainers; [ getpsyched yrd ]; platforms = platforms.linux; }; })