nixpkgs/pkgs/applications/misc/kaufkauflist/default.nix
2023-02-04 00:20:20 -05:00

52 lines
1.5 KiB
Nix

{ lib, buildPackages, buildGoModule, fetchFromGitHub, esbuild, buildNpmPackage, fetchFromGitea }:
let
esbuild' = buildPackages.esbuild.override {
buildGoModule = args: buildPackages.buildGoModule (args // rec {
version = "0.16.15";
src = fetchFromGitHub {
owner = "evanw";
repo = "esbuild";
rev = "v${version}";
hash = "sha256-iTAtPHjrBvHweSIiAbkkbBLgjF3v68jipJEzc0I4G04=";
};
vendorHash = "sha256-+BfxCyg0KkDQpHt/wycy/8CTG6YBA/VJvJFhhzUnSiQ=";
});
};
in buildNpmPackage rec {
pname = "kaufkauflist";
version = "2.0.0";
src = fetchFromGitea {
domain = "codeberg.org";
owner = "annaaurora";
repo = "kaufkauflist";
rev = "v${version}";
hash = "sha256-oXrb6n1oD27bHt/zPWP0REQyCyZXI8BB57pdR/q42gY=";
};
npmDepsHash = "sha256-lSnGLK7+ac/wEpAxlpkZS/kgr9F+8WK+nRjCzkrPJt0=";
ESBUILD_BINARY_PATH = "${lib.getExe esbuild'}";
installPhase = ''
runHook preInstall
mkdir -p $out/share/kaufkauflist $out/share/pocketbase
cp -vr build/* $out/share/kaufkauflist/
cp -v pb_schema.json $out/share/pocketbase/
runHook postInstall
'';
# Uncomment this when nix-update-script supports Gitea.
#passthru.updateScript = nix-update-script { };
meta = with lib; {
homepage = "https://codeberg.org/annaaurora/kaufkauflist";
description = "A to-do list for shopping or other use cases";
license = licenses.mit;
maintainers = with maintainers; [ annaaurora ];
};
}