diff --git a/.gitea/workflows/publish-attic.yaml b/.gitea/workflows/publish-attic.yaml index a91f6aa..322c579 100644 --- a/.gitea/workflows/publish-attic.yaml +++ b/.gitea/workflows/publish-attic.yaml @@ -68,6 +68,7 @@ jobs: ".#packages.${system}.vintage-story" \ ".#packages.${system}.swaytreesave" \ ".#packages.${system}.archon" \ + ".#packages.${system}.ani-cli-rs" \ | tee built-paths.txt - name: Push packages to Attic diff --git a/.gitea/workflows/update-flake-lock.yaml b/.gitea/workflows/update-flake-lock.yaml new file mode 100644 index 0000000..5509aba --- /dev/null +++ b/.gitea/workflows/update-flake-lock.yaml @@ -0,0 +1,40 @@ +name: Update flake lock + +on: + schedule: + # Gitea cron schedules use UTC. 07:00 UTC is 03:00 EDT. + - cron: "0 7 * * 0" + workflow_dispatch: + +permissions: + contents: write + +jobs: + update-flake-lock: + runs-on: ubuntu-latest + + steps: + - name: Check out repository + uses: actions/checkout@v4 + + - name: Install upstream Nix + uses: cachix/install-nix-action@v31 + + - name: Update flake lock + run: nix flake update + + - name: Commit and push changes + shell: bash + run: | + set -euo pipefail + + if git diff --quiet -- flake.lock; then + echo "flake.lock is already up to date" + exit 0 + fi + + git config user.name "gitea-actions[bot]" + git config user.email "gitea-actions[bot]@noreply.localhost" + git add flake.lock + git commit -m "chore: update flake lock" + git push diff --git a/flake.lock b/flake.lock index 0d4f110..84ca983 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,27 @@ { "nodes": { + "caitsith": { + "inputs": { + "flake-schemas": "flake-schemas", + "nixpkgs": [ + "nixpkgs" + ], + "rust-overlay": "rust-overlay" + }, + "locked": { + "lastModified": 1787710235, + "narHash": "sha256-uWDHHB5Z9m3cXQNjfdWWqp2S/SwosukkJv57ORljCvQ=", + "ref": "refs/heads/master", + "rev": "4afabd4956611ec9213dd8392755dece81688b67", + "revCount": 20, + "type": "git", + "url": "https://scm.wyattjmiller.com/wymiller/caitsith.git" + }, + "original": { + "type": "git", + "url": "https://scm.wyattjmiller.com/wymiller/caitsith.git" + } + }, "darwin": { "inputs": { "nixpkgs": [ @@ -7,11 +29,11 @@ ] }, "locked": { - "lastModified": 1779036909, - "narHash": "sha256-zXcwYQGCT6pzinK+1dBB2ekTVtfxGZAapb3Evdcu4fY=", + "lastModified": 1786845137, + "narHash": "sha256-oQFip+v0luP8NIxJzmiW4Wu8bILsbFWom5l0zonl8hQ=", "owner": "LnL7", "repo": "nix-darwin", - "rev": "56c666e108467d87d13508936aade6d567f2a501", + "rev": "4cff07de74b50e64bdd68cd4e722ab5b6b35ee48", "type": "github" }, "original": { @@ -20,34 +42,68 @@ "type": "github" } }, - "flake-utils": { - "inputs": { - "systems": "systems" - }, + "flake-schemas": { "locked": { - "lastModified": 1731533236, - "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", - "type": "github" + "lastModified": 1761577921, + "narHash": "sha256-eK3/xbUOrxp9fFlei09XNjqcdiHXxndzrTXp7jFpOk8=", + "rev": "47849c7625e223d36766968cc6dc23ba0e135922", + "revCount": 107, + "type": "tarball", + "url": "https://api.flakehub.com/f/pinned/DeterminateSystems/flake-schemas/0.2.0/019a4a84-544d-7c59-b26d-e334e320c932/source.tar.gz" }, "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" + "type": "tarball", + "url": "https://flakehub.com/f/DeterminateSystems/flake-schemas/%2A" + } + }, + "flake-schemas_2": { + "locked": { + "lastModified": 1780327564, + "narHash": "sha256-HiRPtA0spK+Dkgbhz/1zW9glXxNVB+L4Rj2VYmdawb8=", + "rev": "6cc9bd98891b1fc6bb2b8cb3277df8bc72799ca6", + "revCount": 149, + "type": "tarball", + "url": "https://api.flakehub.com/f/pinned/DeterminateSystems/flake-schemas/0.5.0/019e83cf-9af3-78b1-ac5b-70e68ad1efe1/source.tar.gz" + }, + "original": { + "type": "tarball", + "url": "https://flakehub.com/f/DeterminateSystems/flake-schemas/%2A" + } + }, + "hildibrand": { + "inputs": { + "flake-schemas": "flake-schemas_2", + "nixpkgs": [ + "nixpkgs" + ], + "rust-overlay": "rust-overlay_2" + }, + "locked": { + "lastModified": 1785717646, + "narHash": "sha256-j6MlkwaYOLa3bogK4SbOnVI5eMZ9j2GdExSiKMaELPo=", + "ref": "refs/heads/master", + "rev": "9588520925513ed0e47711a5798c6e9958143a0a", + "revCount": 5, + "type": "git", + "url": "https://scm.wyattjmiller.com/wymiller/hildibrand.git" + }, + "original": { + "type": "git", + "url": "https://scm.wyattjmiller.com/wymiller/hildibrand.git" } }, "home-manager": { "inputs": { - "nixpkgs": "nixpkgs" + "nixpkgs": [ + "nixpkgs" + ] }, "locked": { - "lastModified": 1779507042, - "narHash": "sha256-7wOwi8B6D0BYsieZCnHZZj2sNUzgJhLoIVSfkwB7lxQ=", + "lastModified": 1787750582, + "narHash": "sha256-FfIAV44k33i+IjC1+new2KyjyVGUzGtV89VHVP4eK1U=", "owner": "nix-community", "repo": "home-manager", - "rev": "509ed3c603349a9d43de9e2ae6613baea6bd5b34", + "rev": "0a364342a66bcecfc8a00d2fc38c6c29eee7bc5e", "type": "github" }, "original": { @@ -58,27 +114,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1778443072, - "narHash": "sha256-zi7/fsqM/kFdNuED//4WOCUtezGtKKqRNORjMvfwjnA=", + "lastModified": 1787640266, + "narHash": "sha256-MrkfE5hF5xx4L/0h5NyJ3xQkKVftwSuKSkFSrvlTxGY=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "da5ad661ba4e5ef59ba743f0d112cbc30e474f32", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_2": { - "locked": { - "lastModified": 1780902259, - "narHash": "sha256-q8yYEC5f1mFlQO9RGna4LTc9QrcvWunX6FYp83munkQ=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "bd0ff2d3eac24699c3664d5966b9ef36f388e2ca", + "rev": "f4f698677b11021a8f84f452e23ae9ef2427bec3", "type": "github" }, "original": { @@ -90,9 +130,11 @@ }, "root": { "inputs": { + "caitsith": "caitsith", "darwin": "darwin", - "flake-utils": "flake-utils", + "hildibrand": "hildibrand", "home-manager": "home-manager", +<<<<<<< HEAD "nixpkgs": "nixpkgs_2", "rust-overlay": "rust-overlay" } @@ -115,20 +157,50 @@ "owner": "oxalica", "repo": "rust-overlay", "type": "github" +======= + "nixpkgs": "nixpkgs" +>>>>>>> origin } }, - "systems": { + "rust-overlay": { + "inputs": { + "nixpkgs": [ + "caitsith", + "nixpkgs" + ] + }, "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "lastModified": 1771729765, + "narHash": "sha256-HNsDSR5bhLSrIpi9bTb2uTK1qnPo1xFSBxs6YmFyprk=", + "owner": "oxalica", + "repo": "rust-overlay", + "rev": "be926cb1a76e8450ab2b92121b2e88d09fa4d41c", "type": "github" }, "original": { - "owner": "nix-systems", - "repo": "default", + "owner": "oxalica", + "repo": "rust-overlay", + "type": "github" + } + }, + "rust-overlay_2": { + "inputs": { + "nixpkgs": [ + "hildibrand", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1784438913, + "narHash": "sha256-NYF7ZM5ip0u+w1pBFDpIGEbrbgN/wpnLFAmBkWkYMXw=", + "owner": "oxalica", + "repo": "rust-overlay", + "rev": "afacd6819d3765a05814ee8e3de74c77d42ac799", + "type": "github" + }, + "original": { + "owner": "oxalica", + "repo": "rust-overlay", "type": "github" } } diff --git a/flake.nix b/flake.nix index 5b7a7ad..f8b1476 100644 --- a/flake.nix +++ b/flake.nix @@ -3,8 +3,8 @@ inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-26.05"; - flake-utils.url = "github:numtide/flake-utils"; home-manager.url = "github:nix-community/home-manager"; + home-manager.inputs.nixpkgs.follows = "nixpkgs"; darwin.url = "github:LnL7/nix-darwin"; darwin.inputs.nixpkgs.follows = "nixpkgs"; rust-overlay = { @@ -23,13 +23,20 @@ rust-overlay, ... }: + hildibrand.url = "git+https://scm.wyattjmiller.com/wymiller/hildibrand.git"; + hildibrand.inputs.nixpkgs.follows = "nixpkgs"; + caitsith.url = "git+https://scm.wyattjmiller.com/wymiller/caitsith.git"; + caitsith.inputs.nixpkgs.follows = "nixpkgs"; + }; + + outputs = inputs@{ self, nixpkgs, home-manager, darwin, ... }: let - systems = [ + supportedSystems = [ "x86_64-linux" "aarch64-linux" "aarch64-darwin" ]; - forAllSystems = f: nixpkgs.lib.genAttrs systems f; + forAllSystems = f: nixpkgs.lib.genAttrs supportedSystems f; in { packages = forAllSystems ( @@ -40,7 +47,13 @@ overlays = [ self.overlays.default ]; }; in - import ./pkgs { inherit pkgs; } + import ./pkgs { + inherit pkgs; + + # packages that are already built with Nix go here + hildibrand = inputs.hildibrand.packages.${system}.default; + caitsith = inputs.caitsith.packages.${system}.default; + } ); devShells = forAllSystems ( diff --git a/pkgs/default.nix b/pkgs/default.nix index c6ffb55..d28ca60 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -1,10 +1,20 @@ -{ pkgs }: +{ + pkgs, + hildibrand ? null, + caitsith ? null +}: { atuinLatest = pkgs.atuinLatest; + # any packages that are added to pkgs and are inputs, we inherit them here + inherit hildibrand; + inherit caitsith; + + # any packages that build instructions are in this repo, they go here # sable-web = pkgs.callPackage ./common/sable.nix {}; swaytreesave = pkgs.callPackage ./linux/swaytreesave.nix { }; musicpresence = pkgs.callPackage ./linux/musicpresence.nix { }; vintage-story = pkgs.callPackage ./linux/vintage-story.nix { }; archon = pkgs.callPackage ./linux/archon.nix { }; yubilock = pkgs.callPackage ./linux/yubilock/default.nix { }; + ani-cli-rs = pkgs.callPackage ./linux/ani-cli-rs.nix { }; } diff --git a/pkgs/linux/ani-cli-rs.nix b/pkgs/linux/ani-cli-rs.nix new file mode 100644 index 0000000..f07cbba --- /dev/null +++ b/pkgs/linux/ani-cli-rs.nix @@ -0,0 +1,27 @@ +{ pkgs }: +let + pname = "ani-cli-rs"; + version = "0.9.4"; + + src = pkgs.fetchFromGitHub { + owner = "vorlie"; + repo = "ani-cli-rs"; + rev = "${version}"; + sha256 = "sha256-19U/p583B5d/Kd0O1raYhREz6zYMeudyTH7dh9bi/jU="; + }; +in pkgs.rustPlatform.buildRustPackage { + inherit pname version src; + cargoLock = { lockFile = "${src}/Cargo.lock"; }; + + # tests make this package fail to build, this line skips them + doCheck = false; + + meta = { + description = "A cross-platform Rust port of ani-cli with two independent Anikoto catalogs and native MegaPlay/KotoCDN playback"; + mainProgram = "ani-cli-rs"; + homepage = "https://github.com/vorlie/ani-cli-rs"; + maintainers = [ "wymillerlinux" ]; + platforms = [ "x86_64-linux" ]; + changelog = "https://github.com/vorlie/ani-cli-rs/releases/tag/${version}"; + }; +} diff --git a/pkgs/linux/archon.nix b/pkgs/linux/archon.nix index 9d3ad21..0714387 100644 --- a/pkgs/linux/archon.nix +++ b/pkgs/linux/archon.nix @@ -1,11 +1,11 @@ { pkgs }: let pname = "archon"; - version = "9.3.119"; + version = "9.5.8"; src = pkgs.fetchurl { url = "https://github.com/RPGLogs/Uploaders-archon/releases/download/v${version}/${pname}-v${version}.AppImage"; - hash = "sha256-mUsmaIxm3DZ1vvcwxpmDTWTj+UlFSv+jYkBrteL8xQk="; + hash = "sha256-tEMfDK0BCBvNWFlA78FKWcOvU1wzIorBM4ZmLQ+6hzU="; }; appimageContents = pkgs.appimageTools.extract { @@ -17,8 +17,11 @@ pkgs.appimageTools.wrapType2 { nativeBuildInputs = with pkgs; [ makeWrapper ]; extraInstallCommands = '' - install -Dm444 "${appimageContents}/Archon App.desktop" "$out/share/applications/archon.desktop" - install -Dm444 "${appimageContents}/Archon App.png" "$out/share/icons/hicolor/256x256/apps/archon.png" + install -Dm444 "${appimageContents}/archon.desktop" "$out/share/applications/archon.desktop" + install -Dm444 "${appimageContents}/archon.png" "$out/share/icons/hicolor/512x512/apps/archon.png" + + substituteInPlace "$out/share/applications/archon.desktop" \ + --replace-fail "Exec=AppRun --no-sandbox %U" "Exec=archon --no-sandbox %U" ''; meta = with pkgs.lib; { diff --git a/pkgs/linux/vintage-story.nix b/pkgs/linux/vintage-story.nix index 295ff89..86913c2 100644 --- a/pkgs/linux/vintage-story.nix +++ b/pkgs/linux/vintage-story.nix @@ -27,11 +27,11 @@ assert waylandSupport -> libxkbcommon != null; stdenv.mkDerivation (finalAttrs: { pname = "vintagestory"; - version = "1.22.3"; + version = "1.22.6"; src = fetchurl { url = "https://cdn.vintagestory.at/gamefiles/stable/vs_client_linux-x64_${finalAttrs.version}.tar.gz"; - hash = "sha256-sa4Pj1DwT6W6LJCAYznmbyqPtMUTaLSNTkXS1imQp04="; + hash = "sha256-xJPyaYklEq2BeUX9+7hNPI6WC6ibcQDS+sKeqKYSh3A="; }; __structuredAttrs = true;