about summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorBobby Rong <rjl931189261@126.com>2023-09-28 21:10:32 +0800
committerGitHub <noreply@github.com>2023-09-28 21:10:32 +0800
commit45825cf7ad0aecfb9517d27a185d49623eaed173 (patch)
tree90945a9091a5c5ca08de1192bf2abc5e052bb594 /pkgs
parent906088897d695c4d5bf78830b214dc68d55ed3e8 (diff)
parent7148877c114fb9c4727724ddd2f07b3efb6efa90 (diff)
downloadnixlib-45825cf7ad0aecfb9517d27a185d49623eaed173.tar
nixlib-45825cf7ad0aecfb9517d27a185d49623eaed173.tar.gz
nixlib-45825cf7ad0aecfb9517d27a185d49623eaed173.tar.bz2
nixlib-45825cf7ad0aecfb9517d27a185d49623eaed173.tar.lz
nixlib-45825cf7ad0aecfb9517d27a185d49623eaed173.tar.xz
nixlib-45825cf7ad0aecfb9517d27a185d49623eaed173.tar.zst
nixlib-45825cf7ad0aecfb9517d27a185d49623eaed173.zip
Merge pull request #257445 from bobby285271/fix/hypnotix
hypnotix: Add missing circles-flags
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/applications/video/hypnotix/default.nix2
-rw-r--r--pkgs/by-name/ci/circle-flags/package.nix36
2 files changed, 38 insertions, 0 deletions
diff --git a/pkgs/applications/video/hypnotix/default.nix b/pkgs/applications/video/hypnotix/default.nix
index b94acdecc54f..74d2389fce7b 100644
--- a/pkgs/applications/video/hypnotix/default.nix
+++ b/pkgs/applications/video/hypnotix/default.nix
@@ -3,6 +3,7 @@
 , fetchFromGitHub
 , substituteAll
 , cinnamon
+, circle-flags
 , gettext
 , gobject-introspection
 , mpv
@@ -31,6 +32,7 @@ stdenv.mkDerivation rec {
   postPatch = ''
     substituteInPlace usr/lib/hypnotix/hypnotix.py \
       --replace __DEB_VERSION__ ${version} \
+      --replace /usr/share/circle-flags-svg ${circle-flags}/share/circle-flags-svg \
       --replace /usr/share/hypnotix $out/share/hypnotix
   '';
 
diff --git a/pkgs/by-name/ci/circle-flags/package.nix b/pkgs/by-name/ci/circle-flags/package.nix
new file mode 100644
index 000000000000..eed82fbdbb47
--- /dev/null
+++ b/pkgs/by-name/ci/circle-flags/package.nix
@@ -0,0 +1,36 @@
+{ stdenvNoCC
+, lib
+, fetchFromGitHub
+, nix-update-script
+}:
+
+stdenvNoCC.mkDerivation (finalAttrs: {
+  pname = "circle-flags";
+  version = "2.7.0";
+
+  src = fetchFromGitHub {
+    owner = "HatScripts";
+    repo = "circle-flags";
+    rev = "v${finalAttrs.version}";
+    hash = "sha256-/+f5MDRW+tRH+jMtl3XuVPBShgy2PlD3NY+74mJa2Qk=";
+  };
+
+  installPhase = ''
+    runHook preInstall
+
+    mkdir -p $out/share
+    mv flags $out/share/circle-flags-svg
+
+    runHook postInstall
+  '';
+
+  passthru.updateScript = nix-update-script { };
+
+  meta = with lib; {
+    homepage = "https://github.com/HatScripts/circle-flags";
+    description = "Collection of 400+ minimal circular SVG country and state flags";
+    license = licenses.mit;
+    maintainers = with maintainers; [ bobby285271 ];
+    platforms = platforms.all;
+  };
+})