Skip to content

Commit

Permalink
ananicy_cpp-rules -> ananicy-rules-cachyos_git: move to gitOverride
Browse files Browse the repository at this point in the history
It's packaged in nixpkgs, so we could just use an override.
This is a breaking change.
  • Loading branch information
JohnRTitor committed Oct 31, 2024
1 parent 40388a7 commit d32e7c1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 39 deletions.
2 changes: 1 addition & 1 deletion overlays/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ in

alacritty_git = callOverride ../pkgs/alacritty-git { };

ananicy-cpp-rules = final.callPackage ../pkgs/ananicy-cpp-rules { };
ananicy-rules-cachyos_git = callOverride ../pkgs/ananicy-cpp-rules { };

applet-window-title = final.callPackage ../pkgs/applet-window-title { };

Expand Down
47 changes: 9 additions & 38 deletions pkgs/ananicy-cpp-rules/default.nix
Original file line number Diff line number Diff line change
@@ -1,43 +1,14 @@
{ lib
, stdenvNoCC
, callPackage
, fetchFromGitHub
, ...
}:
let
current = lib.trivial.importJSON ./version.json;
in
stdenvNoCC.mkDerivation rec {
pname = "ananicy-cpp-rules";
inherit (current) version;
{ prev, gitOverride, ... }:

src = fetchFromGitHub {
inherit (current) rev hash;
gitOverride {
nyxKey = "ananicy-rules-cachyos";
prev = prev.ananicy-rules-cachyos;

versionNyxPath = "pkgs/ananicy-cpp-rules/version.json";
fetcher = "fetchFromGitHub";
fetcherData = {
owner = "CachyOS";
repo = "ananicy-rules";
};

installPhase = ''
runHook preInstall
mkdir -p $out/etc/ananicy.d
rm README.md LICENSE
cp -r * $out/etc/ananicy.d
runHook postInstall
'';

passthru.updateScript = callPackage ../../shared/git-update.nix {
inherit pname;
nyxKey = "ananicy-cpp-rules";
versionPath = "pkgs/ananicy-cpp-rules/version.json";
fetchLatestRev = callPackage ../../shared/github-rev-fetcher.nix { } "master" src;
gitUrl = src.gitRepoUrl;
};

meta = with lib; {
description = "CachyOS' ananicy-rules meant to be used with ananicy-cpp";
homepage = "https://github.com/CachyOS/ananicy-rules";
license = licenses.gpl3;
maintainers = [ maintainers.dr460nf1r3 ];
platforms = platforms.all;
};
ref = "master";
}

0 comments on commit d32e7c1

Please sign in to comment.