diff --git a/akkoma/0000.patch b/akkoma/0000.patch new file mode 100644 index 0000000..e69de29 diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..90150d5 --- /dev/null +++ b/flake.lock @@ -0,0 +1,27 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1712388808, + "narHash": "sha256-9ogU4c3vUmuMDoRlbQCeq3OKx0XJmgHcLZ4XywJNYWI=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "fe4295b9ecd88764c1abf6179e03b1a828ca0e9a", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix index 8a5f168..0a14e61 100644 --- a/flake.nix +++ b/flake.nix @@ -12,12 +12,13 @@ in rec { devShells = forAllSystems (system: let pkgs = nixpkgs.legacyPackages.${system}; - in pkgs.mkShell { - buildInputs = with pkgs; [ - just - ]; - } - ); + in { + default = pkgs.mkShell { + buildInputs = with pkgs; [ + just + ]; + }; + }); nixosModules = rec { default = enableTachikoma; @@ -34,16 +35,16 @@ packages = forAllSystems (system: let pkgs = nixpkgs.legacyPackages.${system}; lib = pkgs.lib; - patchSet = dirPath: builtins.filterList (file: lib.strings.hasSuffix ".patch" file) (builtins.attrNames (builtins.readDir dirPath)); + patchSet = dirPath: map (file: builtins.readFile ./${dirPath}/${file}) (builtins.filter (file: lib.strings.hasSuffix ".patch" file) (builtins.attrNames (builtins.readDir dirPath))); in rec { default = akkoma.tachikoma; akkoma.tachikoma = let rev = builtins.readFile ./akkoma/upstream.txt; in pkgs.akkoma.overrideAttrs (final: prev: { - version = "${rev}-tachikoma"; + version = "${rev}+tachikoma"; - src = fetchFromGitea { + src = pkgs.fetchFromGitea { inherit rev; domain = "akkoma.dev"; owner = "AkkomaGang"; @@ -51,16 +52,16 @@ hash = "sha256-MPUZFcIxZ21fe3edwi+/Kt8qpwNBCh40wheC3QMqw2M="; }; - patches = prev.patches ++ patchSet ./akkoma; + patches = patchSet ./akkoma; patchFlags = "-p1 -F5"; }); akkoma-frontends.tachikoma-fe = let rev = builtins.readFile ./akkoma-fe/upstream.txt; - in pkgs.akkoma-frontends.tachikoma-fe.overrideAttrs (final: prev: { - version = "${rev}-tachikoma"; + in pkgs.akkoma-frontends.akkoma-fe.overrideAttrs (final: prev: { + version = "${rev}+tachikoma"; - src = fetchFromGitea { + src = pkgs.fetchFromGitea { inherit rev; domain = "akkoma.dev"; owner = "AkkomaGang"; @@ -68,7 +69,7 @@ hash = "sha256-MPUZFcIxZ21fe3edwi+/Kt8qpwNBCh40wheC3QMqw2M="; }; - patches = prev.patches ++ patchSet ./akkoma-fe; + patches = patchSet ./akkoma-fe; patchFlags = "-p1 -F5"; }); }); diff --git a/justfile b/justfile new file mode 100644 index 0000000..3ab381a --- /dev/null +++ b/justfile @@ -0,0 +1,8 @@ +default: build +build: build-be build-fe + +build-fe: + nix build .#akkoma.tachikoma + +build-be: + nix build .#akkoma-frontends.tachikoma-fe \ No newline at end of file