This commit is contained in:
41666 2024-04-06 14:42:48 -04:00
parent 2a573a8c83
commit 959972262d
4 changed files with 50 additions and 14 deletions

0
akkoma/0000.patch Normal file
View file

27
flake.lock generated Normal file
View file

@ -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
}

View file

@ -12,12 +12,13 @@
in rec {
devShells = forAllSystems (system: let
pkgs = nixpkgs.legacyPackages.${system};
in pkgs.mkShell {
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";
});
});

8
justfile Normal file
View file

@ -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