From 35ae6d25b242c049f431be72c5e3e7dbcaa003c7 Mon Sep 17 00:00:00 2001 From: shinya Date: Fri, 10 Oct 2025 08:37:16 +0200 Subject: [PATCH] Basic flake icon and theme --- flake.nix | 20 ++++++++++++++++++++ windows-xp-icons.nix | 44 ++++++++++++++++++++++++++++++++++++++++++++ windows-xp-theme.nix | 29 +++++++++++++++++++++++++++++ 3 files changed, 93 insertions(+) create mode 100644 flake.nix create mode 100644 windows-xp-icons.nix create mode 100644 windows-xp-theme.nix diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..33bd993 --- /dev/null +++ b/flake.nix @@ -0,0 +1,20 @@ +{ + description = "Windows XP Theme flake"; + + inputs = { + nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable"; + }; + + outputs = { self, nixpkgs }: + let + system = "x86_64-linux"; + pkgs = import nixpkgs { inherit system; }; + in { + packages.${system} = { + windows-xp-icons = pkgs.callPackage ./windows-xp-icons.nix { }; + windows-xp-theme = pkgs.callPackage ./windows-xp-theme.nix { }; + default = self.packages.${system}.windows-xp-theme; + }; + }; +} + diff --git a/windows-xp-icons.nix b/windows-xp-icons.nix new file mode 100644 index 0000000..a5e7529 --- /dev/null +++ b/windows-xp-icons.nix @@ -0,0 +1,44 @@ + +{ lib +, stdenvNoCC +, fetchFromGitHub +, gtk3 +, hicolor-icon-theme +}: + +stdenvNoCC.mkDerivation rec { + pname = "Windows-xp-icon-theme"; + version = "2025-07-10"; + + src = fetchFromGitHub { + owner = "foglar"; + repo = "Windows-XP"; + rev = "master"; + hash = "sha256-BM/pWQKJ8cOBrYkJ5+tu4BW7WQjCeNuzDng/cILV5tI="; + #domain = "gitea.homework.zip"; + #owner = "shinya"; + #repo = "WinXP-Icons"; + #rev = "master"; + }; + + nativeBuildInputs = [ gtk3 ]; + + dontBuildIconCache = true; + + installPhase = '' + runHook preInstall + mkdir -p $out/share/icons/ # copy everything to the icon directory + cp -r . $out/share/icons/${pname} + runHook postInstall + ''; + + meta = with lib; { + description = "Windows XP icon theme for Linux (B00merang Artwork)"; + homepage = "https://github.com/B00merang-Artwork/Windows-XP"; + license = licenses.gpl3Only; + platforms = platforms.linux; + maintainers = with maintainers; [ ]; + }; +} + + diff --git a/windows-xp-theme.nix b/windows-xp-theme.nix new file mode 100644 index 0000000..e2fb58b --- /dev/null +++ b/windows-xp-theme.nix @@ -0,0 +1,29 @@ +{ stdenv, fetchFromGitHub, lib }: + +stdenv.mkDerivation rec { + pname = "windows-xp-gtk-theme"; + version = "3.1"; + + src = fetchFromGitHub { + owner = "B00merang-Project"; + repo = "Windows-XP"; + rev = version; + sha256 = "sha256-VVNYf2jTa5lqL6RvKT7Hq2NqwUHpdqvjhMCjY3h6Hjs="; + }; + + installPhase = '' + runHook preInstall + mkdir -p $out/share/themes + rm README.md LICENSE.md + cp -r * $out/share/themes/ + runHook postInstall + ''; + + meta = with lib; { + description = "Windows-XP like GTK theme"; + homepage = "https://github.com/B00merang-Project/Windows-XP"; + license = licenses.gpl2Plus; + platforms = platforms.linux; + }; +} +