pixivfe: move to ./pkgs
This commit is contained in:
parent
7a29d71c7f
commit
852b2df205
4 changed files with 24 additions and 16 deletions
|
@ -1,7 +1,8 @@
|
||||||
{
|
{
|
||||||
modulesPath,
|
|
||||||
lib,
|
lib,
|
||||||
config,
|
config,
|
||||||
|
inputs,
|
||||||
|
modulesPath,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
|
@ -230,7 +231,7 @@
|
||||||
href = "https://element.ny4.dev/";
|
href = "https://element.ny4.dev/";
|
||||||
};
|
};
|
||||||
"PixivFE" = {
|
"PixivFE" = {
|
||||||
description = "Privacy respecting frontend for Pixiv";
|
description = getDesc inputs.self.packages.${pkgs.stdenv.hostPlatform.system}.pixivfe;
|
||||||
href = "https://pixiv.ny4.dev";
|
href = "https://pixiv.ny4.dev";
|
||||||
};
|
};
|
||||||
"Uptime Kuma" = {
|
"Uptime Kuma" = {
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
{
|
{
|
||||||
pkgs,
|
|
||||||
config,
|
|
||||||
lib,
|
lib,
|
||||||
|
config,
|
||||||
|
inputs,
|
||||||
|
pkgs,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
cfg = config.services.pixivfe;
|
cfg = config.services.pixivfe;
|
||||||
|
@ -9,10 +10,7 @@ in {
|
||||||
options.services.pixivfe = {
|
options.services.pixivfe = {
|
||||||
enable = lib.mkEnableOption "PixivFE, a privacy respecting frontend for Pixiv";
|
enable = lib.mkEnableOption "PixivFE, a privacy respecting frontend for Pixiv";
|
||||||
|
|
||||||
# package = lib.mkPackageOption pkgs "pixivfe" {};
|
package = lib.mkPackageOption inputs.self.packages.${pkgs.stdenv.hostPlatform.system} "pixivfe" {};
|
||||||
package = lib.mkOption {
|
|
||||||
default = pkgs.callPackage ./pixivfe-pkg.nix {};
|
|
||||||
};
|
|
||||||
|
|
||||||
openFirewall = lib.mkEnableOption "open ports in the firewall needed for the daemon to function";
|
openFirewall = lib.mkEnableOption "open ports in the firewall needed for the daemon to function";
|
||||||
|
|
||||||
|
|
|
@ -1,13 +1,18 @@
|
||||||
# NOTE: 301: All packages are migrated to `github:Guanran928/nur-packages`,
|
# NOTE: 301: All packages are migrated to `github:Guanran928/nur-packages`,
|
||||||
# only keeping some packages that only fits for personal use.
|
# only keeping some packages that only fits for personal use.
|
||||||
pkgs: let
|
pkgs: let
|
||||||
inherit (pkgs) lib;
|
inherit (pkgs) lib callPackage;
|
||||||
|
in {
|
||||||
|
# https://github.com/NixOS/nixpkgs/pull/308720
|
||||||
|
pixivfe = callPackage ./pixivfe.nix {};
|
||||||
|
|
||||||
|
scripts = lib.makeScope pkgs.newScope (self: let
|
||||||
|
inherit (self) callPackage;
|
||||||
in {
|
in {
|
||||||
scripts = lib.makeScope pkgs.newScope (self: {
|
|
||||||
# util
|
# util
|
||||||
makeScript = self.callPackage ./scripts/makeScript.nix {};
|
makeScript = callPackage ./scripts/makeScript.nix {};
|
||||||
|
|
||||||
# scripts
|
# scripts
|
||||||
lofi = self.callPackage ./scripts/lofi.nix {};
|
lofi = callPackage ./scripts/lofi.nix {};
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,18 +18,22 @@ buildGoModule rec {
|
||||||
|
|
||||||
vendorHash = "sha256-QapDR964Tn+RxXdkGqCQXacdmlSapF841Y84n4d/6VI=";
|
vendorHash = "sha256-QapDR964Tn+RxXdkGqCQXacdmlSapF841Y84n4d/6VI=";
|
||||||
|
|
||||||
ldflags = ["-s" "-w"];
|
ldflags = [
|
||||||
|
"-s"
|
||||||
|
"-w"
|
||||||
|
];
|
||||||
|
|
||||||
nativeBuildInputs = [makeBinaryWrapper];
|
nativeBuildInputs = [makeBinaryWrapper];
|
||||||
|
|
||||||
# PixivFE require files from source code
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
|
mkdir -p $out/share/pixivfe
|
||||||
|
cp -r ./views/ $out/share/pixivfe/views
|
||||||
wrapProgram $out/bin/pixivfe \
|
wrapProgram $out/bin/pixivfe \
|
||||||
--chdir ${src}
|
--chdir $out/share/pixivfe
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
description = "A privacy respecting frontend for Pixiv";
|
description = "Privacy respecting frontend for Pixiv";
|
||||||
homepage = "https://codeberg.org/VnPower/PixivFE";
|
homepage = "https://codeberg.org/VnPower/PixivFE";
|
||||||
license = lib.licenses.agpl3Only;
|
license = lib.licenses.agpl3Only;
|
||||||
mainProgram = "pixivfe";
|
mainProgram = "pixivfe";
|
Loading…
Reference in a new issue